Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: extensions/browser/guest_view/web_view/web_view_guest.cc

Issue 637083002: Sets the default background color of inline signin and user manager to grey (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/browser/guest_view/web_view/web_view_guest.cc
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc
index 02e7fb2e100a17b513b6ac036f46de4c7042a1f1..50b8dbcb28ef29c92b96d3e2c102994d3cc4cf09 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -380,8 +380,15 @@ void WebViewGuest::GuestReady() {
// WebContents::GetRenderWidgetHostView will return the RWHV of an
// interstitial page if one is showing at this time. We only want opacity
// to apply to web pages.
- web_contents()->GetRenderViewHost()->GetView()->
- SetBackgroundOpaque(guest_opaque_);
+ if (guest_opaque_) {
+ web_contents()
+ ->GetRenderViewHost()
+ ->GetView()
+ ->SetBackgroundColorToDefault();
+ } else {
+ web_contents()->GetRenderViewHost()->GetView()->SetBackgroundColor(
+ SK_ColorTRANSPARENT);
+ }
if (web_view_guest_delegate_)
web_view_guest_delegate_->OnGuestReady();
}
@@ -1035,7 +1042,15 @@ void WebViewGuest::SetAllowTransparency(bool allow) {
if (!web_contents()->GetRenderViewHost()->GetView())
return;
- web_contents()->GetRenderViewHost()->GetView()->SetBackgroundOpaque(!allow);
+ if (guest_opaque_) {
+ web_contents()
+ ->GetRenderViewHost()
+ ->GetView()
+ ->SetBackgroundColorToDefault();
+ } else {
+ web_contents()->GetRenderViewHost()->GetView()->SetBackgroundColor(
+ SK_ColorTRANSPARENT);
+ }
}
bool WebViewGuest::LoadDataWithBaseURL(const std::string& data_url,
« no previous file with comments | « content/public/browser/render_widget_host_view.h ('k') | extensions/components/native_app_window/native_app_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698