cef/patch/patches/set_resize_background_color...

31 lines
1.4 KiB
Diff
Raw Normal View History

diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc
index 12f1c58c28a91..07cc49d755630 100644
--- ui/views/controls/webview/webview.cc
+++ ui/views/controls/webview/webview.cc
@@ -144,6 +144,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
MaybeEnableAutoResize(web_contents()->GetPrimaryMainFrame());
}
+void WebView::SetResizeBackgroundColor(SkColor resize_background_color) {
+ holder_->SetBackgroundColorWhenClipped(resize_background_color);
+}
+
void WebView::SetCrashedOverlayView(View* crashed_overlay_view) {
if (crashed_overlay_view_ == crashed_overlay_view)
return;
diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h
index 2c69bd3f2b62a..06c9ca5846c77 100644
--- ui/views/controls/webview/webview.h
+++ ui/views/controls/webview/webview.h
@@ -88,6 +88,10 @@ class WEBVIEW_EXPORT WebView : public View,
void EnableSizingFromWebContents(const gfx::Size& min_size,
const gfx::Size& max_size);
+ // Set the background color to use while resizing with a clip. This is white
+ // by default.
+ void SetResizeBackgroundColor(SkColor resize_background_color);
+
// If provided, this View will be shown in place of the web contents
// when the web contents is in a crashed state. This is cleared automatically
// if the web contents is changed.