2015-11-17 19:20:13 +01:00
|
|
|
// Copyright 2015 The Chromium Embedded Framework Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#include "libcef/browser/native/browser_platform_delegate_native.h"
|
|
|
|
|
2020-09-22 21:54:02 +02:00
|
|
|
#include "libcef/browser/alloy/alloy_browser_host_impl.h"
|
2015-11-17 19:20:13 +01:00
|
|
|
|
|
|
|
#include "content/public/browser/render_view_host.h"
|
|
|
|
#include "content/public/browser/render_widget_host.h"
|
2020-03-04 01:29:39 +01:00
|
|
|
#include "third_party/blink/public/common/input/web_mouse_event.h"
|
2015-11-17 19:20:13 +01:00
|
|
|
|
|
|
|
CefBrowserPlatformDelegateNative::CefBrowserPlatformDelegateNative(
|
2017-04-20 21:28:17 +02:00
|
|
|
const CefWindowInfo& window_info,
|
2020-07-04 20:21:34 +02:00
|
|
|
SkColor background_color)
|
2024-01-20 23:48:57 +01:00
|
|
|
: window_info_(window_info), background_color_(background_color) {}
|
2015-11-17 19:20:13 +01:00
|
|
|
|
2017-04-20 21:28:17 +02:00
|
|
|
SkColor CefBrowserPlatformDelegateNative::GetBackgroundColor() const {
|
|
|
|
return background_color_;
|
|
|
|
}
|
|
|
|
|
2020-01-31 23:54:26 +01:00
|
|
|
void CefBrowserPlatformDelegateNative::WasResized() {
|
2020-09-25 03:40:47 +02:00
|
|
|
content::RenderViewHost* host = web_contents_->GetRenderViewHost();
|
|
|
|
if (host) {
|
2018-05-17 10:58:21 +02:00
|
|
|
host->GetWidget()->SynchronizeVisualProperties();
|
2020-09-25 03:40:47 +02:00
|
|
|
}
|
2016-01-19 21:09:01 +01:00
|
|
|
}
|