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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.mm

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: content/browser/renderer_host/render_widget_host_view_mac.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index ddd7a2adfbf496ca15d505ea91cc951c3b9f8015..e8281909a0c7e67db43726b17a1256d2bdf14930 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -58,6 +58,7 @@
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "skia/ext/platform_canvas.h"
+#include "skia/ext/skia_utils_mac.h"
#include "third_party/WebKit/public/platform/WebScreenInfo.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "third_party/WebKit/public/web/mac/WebInputEventFactory.h"
@@ -531,11 +532,11 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
cocoa_view_ = [[[RenderWidgetHostViewCocoa alloc]
initWithRenderWidgetHostViewMac:this] autorelease];
- // Make this view host a solid white layer when there is no content ready to
- // draw.
+ // Paint this view host with |background_color_| when there is no content
+ // ready to draw.
background_layer_.reset([[CALayer alloc] init]);
[background_layer_
- setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
+ setBackgroundColor:gfx::CGColorCreateFromSkColor(background_color_)];
[cocoa_view_ setLayer:background_layer_];
[cocoa_view_ setWantsLayer:YES];
@@ -1532,10 +1533,15 @@ void RenderWidgetHostViewMac::ShowDefinitionForSelection() {
helper.ShowDefinitionForSelection();
}
-void RenderWidgetHostViewMac::SetBackgroundOpaque(bool opaque) {
- RenderWidgetHostViewBase::SetBackgroundOpaque(opaque);
+void RenderWidgetHostViewMac::SetBackgroundColor(SkColor color) {
+ RenderWidgetHostViewBase::SetBackgroundColor(color);
if (render_widget_host_)
- render_widget_host_->SetBackgroundOpaque(opaque);
+ render_widget_host_->SetBackgroundOpaque(GetBackgroundOpaque());
+
+ if (background_layer_) {
+ [background_layer_
+ setBackgroundColor:gfx::CGColorCreateFromSkColor(background_color_)];
+ }
}
BrowserAccessibilityManager*
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.h ('k') | content/public/browser/render_widget_host_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698