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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.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/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 339fec9359479b8e4d1c9ffaf578260748595c82..3507006c21351568998dfe9edae709674c8610a5 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -361,6 +361,7 @@ RenderWidgetHostViewAndroid::RenderWidgetHostViewAndroid(
content_view_core_(NULL),
ime_adapter_android_(this),
cached_background_color_(SK_ColorWHITE),
+ cached_theme_color_(SK_ColorWHITE),
last_output_surface_id_(kUndefinedOutputSurfaceId),
gesture_provider_(CreateGestureProviderConfig(), this),
stylus_text_selector_(this),
@@ -937,6 +938,14 @@ void RenderWidgetHostViewAndroid::SetBackgroundColor(SkColor color) {
OnDidChangeBodyBackgroundColor(color);
}
+void RenderWidgetHostViewAndroid::SetThemeColor(SkColor color) {
+ cached_theme_color_ = color;
+}
+
+SkColor RenderWidgetHostViewAndroid::GetThemeColor() const {
+ return cached_theme_color_;
+}
+
void RenderWidgetHostViewAndroid::CopyFromCompositingSurface(
const gfx::Rect& src_subrect,
const gfx::Size& dst_size,

Powered by Google App Engine
This is Rietveld 408576698