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

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: Rebased. Created 9 years, 2 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 afe0bb9e54909e461e32e11fcb11709cd625fbe6..2374542c5102d534f7f800ceb46c7e3d2f3b96d3 100644
--- a/chrome/renderer/content_settings_observer.h
+++ b/chrome/renderer/content_settings_observer.h
@@ -24,15 +24,15 @@ class ContentSettingsObserver
: public content::RenderViewObserver,
public content::RenderViewObserverTracker<ContentSettingsObserver> {
public:
- explicit ContentSettingsObserver(content::RenderView* render_view);
+ ContentSettingsObserver(content::RenderView* render_view,
+ const ContentSettingsForOneType* image_setting_rules);
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);
// Returns the setting for the given type.
@@ -88,9 +88,13 @@ class ContentSettingsObserver
// Stores our most up-to-date view of the default content settings.
static ContentSettings default_settings_;
Bernhard Bauer 2011/10/17 13:13:19 If we're storing image settings globally, we could
marja 2011/10/18 12:23:02 Done.
- // 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. Owned by
+ // ChromeContentRendererClient.
+ const ContentSettingsForOneType* image_setting_rules_;
+
// Stores if images, scripts, and plugins have actually been blocked.
bool content_blocked_[CONTENT_SETTINGS_NUM_TYPES];

Powered by Google App Engine
This is Rietveld 408576698