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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 975293004: Start caching the theme color in web_contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 5d51ed15e1126ee4cc38385cde2171e82d2739d3..0e5cfa696a5bb74cee5764bdda602c9149e804e6 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2769,6 +2769,9 @@ bool WebContentsImpl::CanOverscrollContent() const {
void WebContentsImpl::OnThemeColorChanged(SkColor theme_color) {
FOR_EACH_OBSERVER(WebContentsObserver, observers_,
DidChangeThemeColor(theme_color));
+ RenderWidgetHostView* rwhv = GetRenderWidgetHostView();
+ if (rwhv)
+ rwhv->SetThemeColor(theme_color);
no sievers 2015/03/04 23:00:46 Why don't you just cache it in here? Esp. since th
Yusuf 2015/03/04 23:26:29 Then wouldn't we have to refresh it explicitly whe
no sievers 2015/03/04 23:37:42 Wait, isn't the bug then that we don't get a notif
Yusuf 2015/03/04 23:38:56 We only get notified if there is a color, but don'
}
void WebContentsImpl::OnDidLoadResourceFromMemoryCache(

Powered by Google App Engine
This is Rietveld 408576698