2019-04-16 16:38:48 +02:00
|
|
|
diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc
|
2023-05-30 10:55:32 +02:00
|
|
|
index ee170d7984eb3..f45d171d15ea3 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-05-30 10:55:32 +02:00
|
|
|
index 42ccdb874b455..0142d75b381d5 100644
|
2019-04-16 16:38:48 +02:00
|
|
|
--- ui/views/controls/webview/webview.h
|
|
|
|
+++ ui/views/controls/webview/webview.h
|
2023-05-30 10:55:32 +02:00
|
|
|
@@ -88,6 +88,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.
|