2019-04-16 16:38:48 +02:00
|
|
|
diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc
|
2022-11-15 18:50:53 +01:00
|
|
|
index fd325017d2347..84ab42c78c1fd 100644
|
2019-04-16 16:38:48 +02:00
|
|
|
--- ui/views/controls/webview/webview.cc
|
|
|
|
+++ ui/views/controls/webview/webview.cc
|
2022-06-17 15:28:55 +02:00
|
|
|
@@ -143,6 +143,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
|
|
|
|
MaybeEnableAutoResize(web_contents()->GetPrimaryMainFrame());
|
2019-04-16 16:38:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
+void WebView::SetResizeBackgroundColor(SkColor resize_background_color) {
|
2021-11-10 22:57:31 +01:00
|
|
|
+ holder_->SetBackgroundColorWhenClipped(resize_background_color);
|
2019-04-16 16:38:48 +02:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
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
|
2023-01-30 18:43:54 +01:00
|
|
|
index 33e93fd257574..b25e00d6b4f48 100644
|
2019-04-16 16:38:48 +02:00
|
|
|
--- ui/views/controls/webview/webview.h
|
|
|
|
+++ ui/views/controls/webview/webview.h
|
2021-12-16 23:35:54 +01:00
|
|
|
@@ -85,6 +85,10 @@ class WEBVIEW_EXPORT WebView : public View,
|
2019-04-16 16:38:48 +02:00
|
|
|
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.
|