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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.h

Issue 7831075: Delegating the "are images allowed" decision to renderer. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Code review comments. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ 5 #ifndef CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_
6 #define CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ 6 #define CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "chrome/common/content_settings.h"
13 #include "content/renderer/content_renderer_client.h" 14 #include "content/renderer/content_renderer_client.h"
14 15
15 class ChromeRenderProcessObserver; 16 class ChromeRenderProcessObserver;
16 class ExtensionDispatcher; 17 class ExtensionDispatcher;
17 class RendererHistogramSnapshots; 18 class RendererHistogramSnapshots;
18 class RendererNetPredictor; 19 class RendererNetPredictor;
19 class SpellCheck; 20 class SpellCheck;
20 class SpellCheckProvider; 21 class SpellCheckProvider;
21 class VisitedLinkSlave; 22 class VisitedLinkSlave;
22 23
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 WebKit::WebPageVisibilityState* override_state) const OVERRIDE; 78 WebKit::WebPageVisibilityState* override_state) const OVERRIDE;
78 virtual bool HandleGetCookieRequest(RenderView* sender, 79 virtual bool HandleGetCookieRequest(RenderView* sender,
79 const GURL& url, 80 const GURL& url,
80 const GURL& first_party_for_cookies, 81 const GURL& first_party_for_cookies,
81 std::string* cookies) OVERRIDE; 82 std::string* cookies) OVERRIDE;
82 virtual bool HandleSetCookieRequest(RenderView* sender, 83 virtual bool HandleSetCookieRequest(RenderView* sender,
83 const GURL& url, 84 const GURL& url,
84 const GURL& first_party_for_cookies, 85 const GURL& first_party_for_cookies,
85 const std::string& value) OVERRIDE; 86 const std::string& value) OVERRIDE;
86 87
88 void SetImageSettingRules(const ContentSettingRules& image_setting_rules);
89
87 // For testing. 90 // For testing.
88 void SetExtensionDispatcher(ExtensionDispatcher* extension_dispatcher); 91 void SetExtensionDispatcher(ExtensionDispatcher* extension_dispatcher);
89 92
90 // Called in low-memory conditions to dump the memory used by the spellchecker 93 // Called in low-memory conditions to dump the memory used by the spellchecker
91 // and start over. 94 // and start over.
92 void OnPurgeMemory(); 95 void OnPurgeMemory();
93 96
94 private: 97 private:
95 WebKit::WebPlugin* CreatePluginImpl( 98 WebKit::WebPlugin* CreatePluginImpl(
96 RenderView* render_view, 99 RenderView* render_view,
(...skipping 20 matching lines...) Expand all
117 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_; 120 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_;
118 scoped_ptr<ExtensionDispatcher> extension_dispatcher_; 121 scoped_ptr<ExtensionDispatcher> extension_dispatcher_;
119 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; 122 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_;
120 scoped_ptr<RendererNetPredictor> net_predictor_; 123 scoped_ptr<RendererNetPredictor> net_predictor_;
121 scoped_ptr<SpellCheck> spellcheck_; 124 scoped_ptr<SpellCheck> spellcheck_;
122 // The SpellCheckProvider is a RenderViewObserver, and handles its own 125 // The SpellCheckProvider is a RenderViewObserver, and handles its own
123 // destruction. 126 // destruction.
124 SpellCheckProvider* spellcheck_provider_; 127 SpellCheckProvider* spellcheck_provider_;
125 scoped_ptr<VisitedLinkSlave> visited_link_slave_; 128 scoped_ptr<VisitedLinkSlave> visited_link_slave_;
126 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; 129 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_;
130
131 ContentSettingRules image_setting_rules_;
127 }; 132 };
128 133
129 } // namespace chrome 134 } // namespace chrome
130 135
131 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ 136 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698