2019-04-16 16:38:48 +02:00
|
|
|
diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc
|
2023-10-19 20:08:48 +02:00
|
|
|
index a2459f3137633..ad29bed6db43a 100644
|
2019-04-16 16:38:48 +02:00
|
|
|
--- ui/views/controls/webview/webview.cc
|
|
|
|
+++ ui/views/controls/webview/webview.cc
|
2023-10-19 20:08:48 +02:00
|
|
|
@@ -160,6 +160,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
|
2023-09-15 21:51:43 +02:00
|
|
|
}
|
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) {
|
2023-09-15 21:51:43 +02:00
|
|
|
if (crashed_overlay_view_.view() == crashed_overlay_view) {
|
2019-04-16 16:38:48 +02:00
|
|
|
return;
|
|
|
|
diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h
|
2023-10-19 20:08:48 +02:00
|
|
|
index ff8755f0cfa28..0c7d3e22b863a 100644
|
2019-04-16 16:38:48 +02:00
|
|
|
--- ui/views/controls/webview/webview.h
|
|
|
|
+++ ui/views/controls/webview/webview.h
|
2023-10-19 20:08:48 +02:00
|
|
|
@@ -91,6 +91,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
|
2023-09-15 21:51:43 +02:00
|
|
|
// if the web contents is changed. The passed-in overlay view must be owned by
|