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

Unified Diff: chrome/renderer/content_settings_observer.h

Issue 7831075: Delegating the "are images allowed" decision to renderer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Transmit image settings to the renderer. Draft. Created 9 years, 3 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: chrome/renderer/content_settings_observer.h
diff --git a/chrome/renderer/content_settings_observer.h b/chrome/renderer/content_settings_observer.h
index d28deb8be5899eda6df73c289ea613ec8499fa8c..ead0f411c541ba76075d093806153474fac11037 100644
--- a/chrome/renderer/content_settings_observer.h
+++ b/chrome/renderer/content_settings_observer.h
@@ -26,14 +26,16 @@ class ContentSettingsObserver
explicit ContentSettingsObserver(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 content setting rules that back allowImages().
+ static void SetImageSettingRules(const ContentSettingRules& rules);
+
// Returns the setting for the given type.
ContentSetting GetContentSetting(ContentSettingsType type);
@@ -85,7 +87,10 @@ class ContentSettingsObserver
// Stores our most up-to-date view of the default content settings.
static ContentSettings default_settings_;
- // Stores if loading of images, scripts, and plugins is allowed.
+ // Stores the rules for image content settings.
+ static ContentSettingRules image_setting_rules_;
Bernhard Bauer 2011/09/13 17:38:11 I'd really like to avoid adding even more static i
marja 2011/09/15 12:02:00 I made ChromeContentRendererClient own the image_s
+
+ // Stores if loading of scripts, and plugins is allowed.
ContentSettings current_content_settings_;
// Stores if images, scripts, and plugins have actually been blocked.

Powered by Google App Engine
This is Rietveld 408576698