diff options
author | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-27 13:43:42 +0000 |
---|---|---|
committer | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-27 13:43:42 +0000 |
commit | c144060968bce7873e4079bd2293272fe03b520f (patch) | |
tree | 6d1f7cc551e53d2626ff522ec46adb18da6c991c /chrome/renderer/chrome_render_process_observer.h | |
parent | 78d4939cf2732a79ff823a0b00938e6aef77cf97 (diff) | |
download | chromium_src-c144060968bce7873e4079bd2293272fe03b520f.zip chromium_src-c144060968bce7873e4079bd2293272fe03b520f.tar.gz chromium_src-c144060968bce7873e4079bd2293272fe03b520f.tar.bz2 |
Delegating the "are images allowed" decision to renderer.
This enables making the decision based on both image url and the page url. E.g., blocking third-party images.
BUG=81179
TEST=RenderViewTest.ImagesBlockedByDefault, RenderViewTest.ImagesAllowedByDefault
Review URL: http://codereview.chromium.org/7831075
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/chrome_render_process_observer.h')
-rw-r--r-- | chrome/renderer/chrome_render_process_observer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/renderer/chrome_render_process_observer.h b/chrome/renderer/chrome_render_process_observer.h index 7c14c24..44477b8 100644 --- a/chrome/renderer/chrome_render_process_observer.h +++ b/chrome/renderer/chrome_render_process_observer.h @@ -11,6 +11,7 @@ #include "base/compiler_specific.h" #include "base/file_path.h" #include "base/memory/scoped_ptr.h" +#include "chrome/common/content_settings.h" #include "content/public/renderer/render_process_observer.h" class GURL; @@ -40,6 +41,10 @@ class ChromeRenderProcessObserver : public content::RenderProcessObserver { // any 'clear cache' commands that were delayed until the next navigation. void ExecutePendingClearCache(); + // Returns a pointer to the image setting rules owned by + // |ChromeRenderProcessObserver|. + const ContentSettingsForOneType* image_setting_rules() const; + private: // RenderProcessObserver implementation. virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; @@ -49,6 +54,7 @@ class ChromeRenderProcessObserver : public content::RenderProcessObserver { void OnSetContentSettingsForCurrentURL( const GURL& url, const ContentSettings& content_settings); void OnSetDefaultContentSettings(const ContentSettings& content_settings); + void OnSetImageSettingRules(const ContentSettingsForOneType& settings); void OnSetCacheCapacities(size_t min_dead_capacity, size_t max_dead_capacity, size_t capacity); @@ -69,6 +75,7 @@ class ChromeRenderProcessObserver : public content::RenderProcessObserver { chrome::ChromeContentRendererClient* client_; // If true, the web cache shall be cleared before the next navigation event. bool clear_cache_pending_; + ContentSettingsForOneType image_setting_rules_; DISALLOW_COPY_AND_ASSIGN(ChromeRenderProcessObserver); }; |