OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #if defined(ENABLE_PLUGINS) | 11 #if defined(ENABLE_PLUGINS) |
12 #include <set> | 12 #include <set> |
13 #endif | 13 #endif |
14 | 14 |
15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
18 #include "content/public/renderer/content_renderer_client.h" | 18 #include "content/public/renderer/content_renderer_client.h" |
19 | 19 |
20 class ChromeRenderProcessObserver; | 20 class ChromeRenderProcessObserver; |
21 class ExtensionSet; | 21 class ExtensionSet; |
22 class PrescientNetworkingDispatcher; | 22 class PrescientNetworkingDispatcher; |
23 class RendererNetPredictor; | 23 class RendererNetPredictor; |
| 24 #if defined(ENABLE_SPELLCHECK) |
24 class SpellCheck; | 25 class SpellCheck; |
25 class SpellCheckProvider; | 26 class SpellCheckProvider; |
| 27 #endif |
26 | 28 |
27 struct ChromeViewHostMsg_GetPluginInfo_Output; | 29 struct ChromeViewHostMsg_GetPluginInfo_Output; |
28 | 30 |
29 namespace content { | 31 namespace content { |
30 struct WebPluginInfo; | 32 struct WebPluginInfo; |
31 } | 33 } |
32 | 34 |
33 namespace extensions { | 35 namespace extensions { |
34 class Dispatcher; | 36 class Dispatcher; |
35 class Extension; | 37 class Extension; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // PPAPI FileIO host to browser. | 134 // PPAPI FileIO host to browser. |
133 virtual bool IsPluginAllowedToCallRequestOSFileHandle( | 135 virtual bool IsPluginAllowedToCallRequestOSFileHandle( |
134 WebKit::WebPluginContainer* container) const OVERRIDE; | 136 WebKit::WebPluginContainer* container) const OVERRIDE; |
135 virtual WebKit::WebSpeechSynthesizer* OverrideSpeechSynthesizer( | 137 virtual WebKit::WebSpeechSynthesizer* OverrideSpeechSynthesizer( |
136 WebKit::WebSpeechSynthesizerClient* client) OVERRIDE; | 138 WebKit::WebSpeechSynthesizerClient* client) OVERRIDE; |
137 virtual bool AllowPepperMediaStreamAPI(const GURL& url) const OVERRIDE; | 139 virtual bool AllowPepperMediaStreamAPI(const GURL& url) const OVERRIDE; |
138 | 140 |
139 // For testing. | 141 // For testing. |
140 void SetExtensionDispatcher(extensions::Dispatcher* extension_dispatcher); | 142 void SetExtensionDispatcher(extensions::Dispatcher* extension_dispatcher); |
141 | 143 |
| 144 #if defined(ENABLE_SPELLCHECK) |
142 // Sets a new |spellcheck|. Used for low-mem restart and testing only. | 145 // Sets a new |spellcheck|. Used for low-mem restart and testing only. |
143 // Takes ownership of |spellcheck|. | 146 // Takes ownership of |spellcheck|. |
144 void SetSpellcheck(SpellCheck* spellcheck); | 147 void SetSpellcheck(SpellCheck* spellcheck); |
| 148 #endif |
145 | 149 |
146 // Called in low-memory conditions to dump the memory used by the spellchecker | 150 // Called in low-memory conditions to dump the memory used by the spellchecker |
147 // and start over. | 151 // and start over. |
148 void OnPurgeMemory(); | 152 void OnPurgeMemory(); |
149 | 153 |
150 static WebKit::WebPlugin* CreatePlugin( | 154 static WebKit::WebPlugin* CreatePlugin( |
151 content::RenderView* render_view, | 155 content::RenderView* render_view, |
152 WebKit::WebFrame* frame, | 156 WebKit::WebFrame* frame, |
153 const WebKit::WebPluginParams& params, | 157 const WebKit::WebPluginParams& params, |
154 const ChromeViewHostMsg_GetPluginInfo_Output& output); | 158 const ChromeViewHostMsg_GetPluginInfo_Output& output); |
(...skipping 27 matching lines...) Expand all Loading... |
182 bool is_nacl_unrestricted, | 186 bool is_nacl_unrestricted, |
183 const extensions::Extension* extension, | 187 const extensions::Extension* extension, |
184 WebKit::WebPluginParams* params); | 188 WebKit::WebPluginParams* params); |
185 | 189 |
186 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_; | 190 scoped_ptr<ChromeRenderProcessObserver> chrome_observer_; |
187 scoped_ptr<extensions::Dispatcher> extension_dispatcher_; | 191 scoped_ptr<extensions::Dispatcher> extension_dispatcher_; |
188 scoped_ptr<extensions::RendererPermissionsPolicyDelegate> | 192 scoped_ptr<extensions::RendererPermissionsPolicyDelegate> |
189 permissions_policy_delegate_; | 193 permissions_policy_delegate_; |
190 scoped_ptr<PrescientNetworkingDispatcher> prescient_networking_dispatcher_; | 194 scoped_ptr<PrescientNetworkingDispatcher> prescient_networking_dispatcher_; |
191 scoped_ptr<RendererNetPredictor> net_predictor_; | 195 scoped_ptr<RendererNetPredictor> net_predictor_; |
| 196 #if defined(ENABLE_SPELLCHECK) |
192 scoped_ptr<SpellCheck> spellcheck_; | 197 scoped_ptr<SpellCheck> spellcheck_; |
| 198 #endif |
193 scoped_ptr<visitedlink::VisitedLinkSlave> visited_link_slave_; | 199 scoped_ptr<visitedlink::VisitedLinkSlave> visited_link_slave_; |
194 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; | 200 scoped_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; |
195 scoped_ptr<prerender::PrerenderDispatcher> prerender_dispatcher_; | 201 scoped_ptr<prerender::PrerenderDispatcher> prerender_dispatcher_; |
196 #if defined(ENABLE_WEBRTC) | 202 #if defined(ENABLE_WEBRTC) |
197 scoped_refptr<WebRtcLoggingMessageFilter> webrtc_logging_message_filter_; | 203 scoped_refptr<WebRtcLoggingMessageFilter> webrtc_logging_message_filter_; |
198 #endif | 204 #endif |
199 | 205 |
200 #if defined(ENABLE_PLUGINS) | 206 #if defined(ENABLE_PLUGINS) |
201 std::set<std::string> allowed_file_handle_origins_; | 207 std::set<std::string> allowed_file_handle_origins_; |
202 #endif | 208 #endif |
203 }; | 209 }; |
204 | 210 |
205 } // namespace chrome | 211 } // namespace chrome |
206 | 212 |
207 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 213 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |