Index: chrome/browser/ui/views/frame/contents_web_view.cc |
diff --git a/chrome/browser/ui/views/frame/contents_web_view.cc b/chrome/browser/ui/views/frame/contents_web_view.cc |
index f77f34515dd190739e49d64309bea88f202821c0..151823ad34a7d75b21e0648aed23847077a88832 100644 |
--- a/chrome/browser/ui/views/frame/contents_web_view.cc |
+++ b/chrome/browser/ui/views/frame/contents_web_view.cc |
@@ -6,6 +6,7 @@ |
#include "chrome/browser/themes/theme_properties.h" |
#include "chrome/browser/ui/views/status_bubble_views.h" |
+#include "content/public/browser/render_widget_host_view.h" |
#include "content/public/browser/web_contents.h" |
#include "ui/base/theme_provider.h" |
#include "ui/compositor/layer_tree_owner.h" |
@@ -64,6 +65,14 @@ void ContentsWebView::OnThemeChanged() { |
SkColorGetG(ntp_background) * kBackgroundBrightness / 0xFF, |
SkColorGetB(ntp_background) * kBackgroundBrightness / 0xFF, |
SkColorGetA(ntp_background))); |
+ |
+ |
+ if (web_contents()) { |
+ content::RenderWidgetHostView* rwhv = |
+ web_contents()->GetRenderWidgetHostView(); |
+ if (rwhv) |
+ rwhv->SetBackgroundColor(ntp_background); |
+ } |
} |
void ContentsWebView::OnLayerRecreated(ui::Layer* old_layer, |
@@ -114,3 +123,9 @@ void ContentsWebView::DestroyClonedLayer() { |
SetPaintToLayer(false); |
set_layer_owner_delegate(nullptr); |
} |
+ |
+void ContentsWebView::RenderViewReady() { |
+ // Apply the theme color to be the default background on startup. |
+ OnThemeChanged(); |
+ WebView::RenderViewReady(); |
+} |