OLD | NEW |
---|---|
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 "base/string16.h" | 13 #include "base/string16.h" |
14 #include "chrome/common/content_settings.h" | |
14 #include "content/public/renderer/content_renderer_client.h" | 15 #include "content/public/renderer/content_renderer_client.h" |
15 | 16 |
16 class ChromeRenderProcessObserver; | 17 class ChromeRenderProcessObserver; |
17 class ExtensionDispatcher; | 18 class ExtensionDispatcher; |
18 class RendererHistogramSnapshots; | 19 class RendererHistogramSnapshots; |
19 class RendererNetPredictor; | 20 class RendererNetPredictor; |
20 class SpellCheck; | 21 class SpellCheck; |
21 class SpellCheckProvider; | 22 class SpellCheckProvider; |
22 class VisitedLinkSlave; | 23 class VisitedLinkSlave; |
23 | 24 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
90 const std::string& value) OVERRIDE; | 91 const std::string& value) OVERRIDE; |
91 virtual bool IsProtocolSupportedForMedia(const GURL& url) OVERRIDE; | 92 virtual bool IsProtocolSupportedForMedia(const GURL& url) OVERRIDE; |
92 | 93 |
93 // TODO(mpcomplete): remove after we collect histogram data. | 94 // TODO(mpcomplete): remove after we collect histogram data. |
94 // http://crbug.com/100411 | 95 // http://crbug.com/100411 |
95 bool IsAdblockInstalled(); | 96 bool IsAdblockInstalled(); |
96 bool IsAdblockPlusInstalled(); | 97 bool IsAdblockPlusInstalled(); |
97 bool IsAdblockWithWebRequestInstalled(); | 98 bool IsAdblockWithWebRequestInstalled(); |
98 bool IsAdblockPlusWithWebRequestInstalled(); | 99 bool IsAdblockPlusWithWebRequestInstalled(); |
99 | 100 |
101 void SetImageSettingRules( | |
102 const ContentSettingsForOneType& image_setting_rules); | |
103 | |
100 // For testing. | 104 // For testing. |
101 void SetExtensionDispatcher(ExtensionDispatcher* extension_dispatcher); | 105 void SetExtensionDispatcher(ExtensionDispatcher* extension_dispatcher); |
102 | 106 |
103 // Called in low-memory conditions to dump the memory used by the spellchecker | 107 // Called in low-memory conditions to dump the memory used by the spellchecker |
104 // and start over. | 108 // and start over. |
105 void OnPurgeMemory(); | 109 void OnPurgeMemory(); |
106 | 110 |
107 private: | 111 private: |
108 WebKit::WebPlugin* CreatePlugin( | 112 WebKit::WebPlugin* CreatePlugin( |
109 content::RenderView* render_view, | 113 content::RenderView* render_view, |
(...skipping 20 matching lines...) Expand all Loading... | |
130 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_; | 134 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_; |
131 scoped_ptr<ExtensionDispatcher> extension_dispatcher_; | 135 scoped_ptr<ExtensionDispatcher> extension_dispatcher_; |
132 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; | 136 scoped_ptr<RendererHistogramSnapshots> histogram_snapshots_; |
133 scoped_ptr<RendererNetPredictor> net_predictor_; | 137 scoped_ptr<RendererNetPredictor> net_predictor_; |
134 scoped_ptr<SpellCheck> spellcheck_; | 138 scoped_ptr<SpellCheck> spellcheck_; |
135 // The SpellCheckProvider is a RenderViewObserver, and handles its own | 139 // The SpellCheckProvider is a RenderViewObserver, and handles its own |
136 // destruction. | 140 // destruction. |
137 SpellCheckProvider* spellcheck_provider_; | 141 SpellCheckProvider* spellcheck_provider_; |
138 scoped_ptr<VisitedLinkSlave> visited_link_slave_; | 142 scoped_ptr<VisitedLinkSlave> visited_link_slave_; |
139 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; | 143 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; |
144 ContentSettingsForOneType image_setting_rules_; | |
Bernhard Bauer
2011/10/17 13:13:19
The content client should be the glue between the
marja
2011/10/18 12:23:02
Done. But, the ChromeRenderProcessObserver is not
| |
140 }; | 145 }; |
141 | 146 |
142 } // namespace chrome | 147 } // namespace chrome |
143 | 148 |
144 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 149 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |