Chromium Code Reviews| Index: chrome/renderer/content_settings_observer.h |
| diff --git a/chrome/renderer/content_settings_observer.h b/chrome/renderer/content_settings_observer.h |
| index 45f2125a1b9e88a800a36e89ed1fbe7a0a77348d..44ae873e391e26a9ec94ee4afb718f32ae4e0dd4 100644 |
| --- a/chrome/renderer/content_settings_observer.h |
| +++ b/chrome/renderer/content_settings_observer.h |
| @@ -27,14 +27,19 @@ class ContentSettingsObserver |
| explicit ContentSettingsObserver(content::RenderView* render_view); |
| virtual ~ContentSettingsObserver(); |
| - // Sets the content settings that back allowScripts(), allowImages(), and |
| - // allowPlugins(). |
| + // Sets the content settings that back allowScripts() and allowPlugins(). |
| void SetContentSettings(const ContentSettings& settings); |
| - // Sets the default content settings that back allowScripts(), |
| - // allowImages(), and allowPlugins(). |
| + // Sets the default content settings that back allowScripts() and |
| + // allowPlugins(). |
| static void SetDefaultContentSettings(const ContentSettings& settings); |
| + // Sets the image setting rules which back |allowImage()|. |
| + // |ContentSettingObserver| does not take the ownership of the |
|
Bernhard Bauer
2011/10/20 09:21:53
Nit: Can you add a comment that state that callers
marja
2011/10/20 11:44:22
Done.
|
| + // pointer. |
| + void SetImageSettingRules( |
| + const ContentSettingsForOneType* image_setting_rules); |
| + |
| // Returns the setting for the given type. |
| ContentSetting GetContentSetting(ContentSettingsType type); |
| @@ -90,11 +95,17 @@ class ContentSettingsObserver |
| HostContentSettings host_content_settings_; |
| // Stores our most up-to-date view of the default content settings. |
| + // TODO(marja): Store default settings in |ChromeRenderProcessObserver|. |
| static ContentSettings default_settings_; |
| - // Stores if loading of images, scripts, and plugins is allowed. |
| + // Stores if loading of scripts and plugins is allowed. |
| ContentSettings current_content_settings_; |
| + // Stores the rules for image content settings. Normally, they are owned by |
| + // |ChromeRenderProcessObserver|; in the tests they are owned by the caller of |
| + // |SetImageSettingRules|. |
| + const ContentSettingsForOneType* image_setting_rules_; |
| + |
| // Stores if images, scripts, and plugins have actually been blocked. |
| bool content_blocked_[CONTENT_SETTINGS_NUM_TYPES]; |