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

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

Issue 2702153003: [content] Fix background color update handling in RWHVAura. (Closed)
Patch Set: rebase: employ same mechanism in RWHVMac. Created 3 years, 8 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.h
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 97e927fd734c8519c8f17f52bea8eb1e02b53484..d72039dccd7adef47a5c6a2fb5bf2be5a4a44d77 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -277,6 +277,7 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
bool IsSpeaking() const override;
void StopSpeaking() override;
void SetBackgroundColor(SkColor color) override;
+ SkColor background_color() const override;
void SetNeedsBeginFrames(bool needs_begin_frames) override;
// Implementation of RenderWidgetHostViewBase.
@@ -405,6 +406,10 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
WebContents* GetWebContents();
+ // Applies background color without notifying the RenderWidget about
+ // opaqueness changes.
+ void UpdateBackgroundColorFromRenderer(SkColor color);
+
// These member variables should be private, but the associated ObjC class
// needs access to them and can't be made a friend.
@@ -552,6 +557,9 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// Whether a request to flush input has been issued.
bool needs_flush_input_;
+ // The background color of the web content.
+ SkColor background_color_;
+
// Factory used to safely scope delayed calls to ShutdownHost().
base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698