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

Unified Diff: chrome/renderer/chrome_render_process_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: Updated contentSettings.html. 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/chrome_render_process_observer.h
diff --git a/chrome/renderer/chrome_render_process_observer.h b/chrome/renderer/chrome_render_process_observer.h
index 7c14c247bb1311ad3ab9105c36a37d7d902802ab..7e770d8eef6b66af90fb09b7c4e84a55ee187765 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,11 @@ 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 stored by
+ // |ChromeRenderProcessObserver|. The caller does not take the ownership of
+ // the pointer.
+ const ContentSettingsForOneType* image_setting_rules() const;
+
private:
// RenderProcessObserver implementation.
virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
@@ -49,6 +55,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 +76,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);
};

Powered by Google App Engine
This is Rietveld 408576698