2015-11-17 13:20:13 -05: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.
|
|
|
|
|
2024-04-30 11:45:07 -04:00
|
|
|
#include "cef/libcef/browser/native/browser_platform_delegate_native.h"
|
2015-11-17 13:20:13 -05:00
|
|
|
|
2024-04-30 11:45:07 -04:00
|
|
|
#include "cef/libcef/browser/alloy/alloy_browser_host_impl.h"
|
2015-11-17 13:20:13 -05:00
|
|
|
#include "content/public/browser/render_view_host.h"
|
|
|
|
#include "content/public/browser/render_widget_host.h"
|
2020-03-03 19:29:39 -05:00
|
|
|
#include "third_party/blink/public/common/input/web_mouse_event.h"
|
2015-11-17 13:20:13 -05:00
|
|
|
|
|
|
|
CefBrowserPlatformDelegateNative::CefBrowserPlatformDelegateNative(
|
2017-04-20 15:28:17 -04:00
|
|
|
const CefWindowInfo& window_info,
|
2020-07-04 14:21:34 -04:00
|
|
|
SkColor background_color)
|
2024-01-20 17:48:57 -05:00
|
|
|
: window_info_(window_info), background_color_(background_color) {}
|
2015-11-17 13:20:13 -05:00
|
|
|
|
2017-04-20 15:28:17 -04:00
|
|
|
SkColor CefBrowserPlatformDelegateNative::GetBackgroundColor() const {
|
|
|
|
return background_color_;
|
|
|
|
}
|
|
|
|
|
2020-01-31 17:54:26 -05:00
|
|
|
void CefBrowserPlatformDelegateNative::WasResized() {
|
2020-09-24 21:40:47 -04:00
|
|
|
content::RenderViewHost* host = web_contents_->GetRenderViewHost();
|
|
|
|
if (host) {
|
2018-05-17 11:58:21 +03:00
|
|
|
host->GetWidget()->SynchronizeVisualProperties();
|
2020-09-24 21:40:47 -04:00
|
|
|
}
|
2016-01-19 15:09:01 -05:00
|
|
|
}
|