diff options
author | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-02 21:29:36 +0000 |
---|---|---|
committer | xiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-02 21:29:36 +0000 |
commit | 1138ccee095823e0c05ec084f19fbabe96b8f0a3 (patch) | |
tree | 3e456a5aa0a97f5bf0a430e2dacb24eea59101db /chrome/renderer/chrome_render_view_observer.h | |
parent | 70f48c0a4cfc3675313ad7e8262a6e6b72583690 (diff) | |
download | chromium_src-1138ccee095823e0c05ec084f19fbabe96b8f0a3.zip chromium_src-1138ccee095823e0c05ec084f19fbabe96b8f0a3.tar.gz chromium_src-1138ccee095823e0c05ec084f19fbabe96b8f0a3.tar.bz2 |
Implement SetVisuallyDeemphasized in ChromeRenderViewObserver.
Implement SetVisuallyDeemphasized in ChromeRenderViewObserver
- Add a ChromeViewMsg_SetVisuallyDeemphasized and use it to toggle background dimming on web contents via ChromeRenderViewObserver;
- Derive WebViewColorOverlay from WebKit::WebPageOverlay and add to web view when need to dimming the background;
- Remove RWHV SetVisuallyDeemphasized since it's no longer used;
BUG=103386
TEST=Verify fix for 103386, dimming should show up even when accelerated compositing is on.
Review URL: http://codereview.chromium.org/8730001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112787 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/chrome_render_view_observer.h')
-rw-r--r-- | chrome/renderer/chrome_render_view_observer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/renderer/chrome_render_view_observer.h b/chrome/renderer/chrome_render_view_observer.h index 4f995b1..bbaa13e 100644 --- a/chrome/renderer/chrome_render_view_observer.h +++ b/chrome/renderer/chrome_render_view_observer.h @@ -25,10 +25,12 @@ class ExternalHostBindings; class SkBitmap; class TranslateHelper; struct ThumbnailScore; +class WebViewColorOverlay; namespace WebKit { class WebView; } + namespace safe_browsing { class PhishingClassifierDelegate; } @@ -127,6 +129,7 @@ class ChromeRenderViewObserver : public content::RenderViewObserver, void OnSetAllowDisplayingInsecureContent(bool allow); void OnSetAllowRunningInsecureContent(bool allow); void OnSetClientSidePhishingDetection(bool enable_phishing_detection); + void OnSetVisuallyDeemphasized(bool deemphasized); void OnStartFrameSniffer(const string16& frame_name); void OnGetFPS(); void OnAddStrictSecurityHost(const std::string& host); @@ -220,6 +223,9 @@ class ChromeRenderViewObserver : public content::RenderViewObserver, // ImageResourceFetchers schedule via DownloadImage. ImageResourceFetcherList image_fetchers_; + // A color page overlay when visually de-emaphasized. + scoped_ptr<WebViewColorOverlay> dimmed_color_overlay_; + DISALLOW_COPY_AND_ASSIGN(ChromeRenderViewObserver); }; |