summaryrefslogtreecommitdiffstats
path: root/content/test/test_render_view_host.h
diff options
context:
space:
mode:
authornoel <noel@chromium.org>2015-08-26 07:52:37 -0700
committerCommit bot <commit-bot@chromium.org>2015-08-26 14:53:20 +0000
commit746236525b8e9df986636972442e9a0cf6e2cbd5 (patch)
tree0a361b5f6b63ee677d4cb39fb3003b7c96528643 /content/test/test_render_view_host.h
parent9fa8b48a9dfd1ce12fa80b78e6ade585e7d49394 (diff)
downloadchromium_src-746236525b8e9df986636972442e9a0cf6e2cbd5.zip
chromium_src-746236525b8e9df986636972442e9a0cf6e2cbd5.tar.gz
chromium_src-746236525b8e9df986636972442e9a0cf6e2cbd5.tar.bz2
IPC send the screen color profile from the browser to the renderer
views in the WasResized() IPC flow. The color profile is sent when a tab is first added to the browser, and subsequently when the tab changes monitor, via NotifyScreenInfoChanged(), which is driven by windowDidChangeBackingProperties on mac and by gfx::Display change monitoring on the Aura ports (win, linux). On mac, the windowDidChangeBackingProperties message also fires if a user changes screen color profile via configuration dialogs. The Aura ports have no such configuration message, a problem that will need to be solved some other way, perhaps via UI support. The color profile of a renderer host view is fetched from its top- level native window (the browser window). And yes, it's indeed odd that a host view on mac must ask its WebContents for its top-level native window. The profile update requires two helpers DispatchColorProfile() and SendColorProfile() because the win port may read disk, and is sent in a separate IPC so the WasResized() IPC is never blocked waiting on a disk read. Background pages of extensions and similar have 0x0 size and never participate in the NotifyScreenInfoChanged() WasResized() flow and do not need the color profile besides (such pages do not paint). A DCHECK in SendColorProfile() checks that condition: the view_ must have non-zero size. A stub implementation is provided for Android for compilation, but color profile support on Android (mobile) is not recommended. This work is guarded by the --enable-image-color-profiles flag. BUG=368663 Review URL: https://codereview.chromium.org/1267123003 Cr-Commit-Position: refs/heads/master@{#345609}
Diffstat (limited to 'content/test/test_render_view_host.h')
-rw-r--r--content/test/test_render_view_host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/content/test/test_render_view_host.h b/content/test/test_render_view_host.h
index 0e0a579..bf056fb 100644
--- a/content/test/test_render_view_host.h
+++ b/content/test/test_render_view_host.h
@@ -132,6 +132,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostViewBase {
void UnlockCompositingSurface() override {}
#endif
void GetScreenInfo(blink::WebScreenInfo* results) override {}
+ bool GetScreenColorProfile(std::vector<char>* color_profile) override;
gfx::Rect GetBoundsInRootWindow() override;
gfx::GLSurfaceHandle GetCompositingSurface() override;
bool LockMouse() override;