• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 The Chromium Embedded Framework Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "libcef/browser/native/browser_platform_delegate_native.h"
6 
7 #include "libcef/browser/alloy/alloy_browser_host_impl.h"
8 
9 #include "content/public/browser/render_view_host.h"
10 #include "content/public/browser/render_widget_host.h"
11 #include "third_party/blink/public/common/input/web_mouse_event.h"
12 
CefBrowserPlatformDelegateNative(const CefWindowInfo & window_info,SkColor background_color)13 CefBrowserPlatformDelegateNative::CefBrowserPlatformDelegateNative(
14     const CefWindowInfo& window_info,
15     SkColor background_color)
16     : window_info_(window_info),
17       background_color_(background_color),
18       windowless_handler_(nullptr) {}
19 
GetBackgroundColor() const20 SkColor CefBrowserPlatformDelegateNative::GetBackgroundColor() const {
21   return background_color_;
22 }
23 
WasResized()24 void CefBrowserPlatformDelegateNative::WasResized() {
25   content::RenderViewHost* host = web_contents_->GetRenderViewHost();
26   if (host) {
27     host->GetWidget()->SynchronizeVisualProperties();
28   }
29 }
30