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

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: nits fixed 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 eb1bd4eddcc31c93cd784335ea52ee3c75f69002..e0308594a35d34451afded31dfffca9c2890fe17 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -377,8 +377,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()
+ ->FillBackgroundWithDefaultColor();
+ } else {
+ web_contents()->GetRenderViewHost()->GetView()->SetBackgroundColor(
+ SK_ColorTRANSPARENT);
+ }
}
void WebViewGuest::GuestSizeChangedDueToAutoSize(const gfx::Size& old_size,
@@ -1025,7 +1032,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()
+ ->FillBackgroundWithDefaultColor();
+ } else {
+ web_contents()->GetRenderViewHost()->GetView()->SetBackgroundColor(
+ SK_ColorTRANSPARENT);
+ }
}
bool WebViewGuest::LoadDataWithBaseURL(const std::string& data_url,

Powered by Google App Engine
This is Rietveld 408576698