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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/compiler_specific.h" | 16 #include "base/compiler_specific.h" |
17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
18 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
19 #include "components/rappor/public/interfaces/rappor_recorder.mojom.h" | 19 #include "components/rappor/public/interfaces/rappor_recorder.mojom.h" |
| 20 #include "components/spellcheck/spellcheck_build_features.h" |
20 #include "content/public/renderer/content_renderer_client.h" | 21 #include "content/public/renderer/content_renderer_client.h" |
21 #include "extensions/features/features.h" | 22 #include "extensions/features/features.h" |
22 #include "ipc/ipc_channel_proxy.h" | 23 #include "ipc/ipc_channel_proxy.h" |
23 #include "printing/features/features.h" | 24 #include "printing/features/features.h" |
24 #include "v8/include/v8.h" | 25 #include "v8/include/v8.h" |
25 | 26 |
26 #if defined (OS_CHROMEOS) | 27 #if defined (OS_CHROMEOS) |
27 #include "chrome/renderer/leak_detector/leak_detector_remote_client.h" | 28 #include "chrome/renderer/leak_detector/leak_detector_remote_client.h" |
28 #endif | 29 #endif |
29 | 30 |
30 class ChromeRenderThreadObserver; | 31 class ChromeRenderThreadObserver; |
31 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 32 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
32 class ChromePDFPrintClient; | 33 class ChromePDFPrintClient; |
33 #endif | 34 #endif |
34 class PrescientNetworkingDispatcher; | 35 class PrescientNetworkingDispatcher; |
35 #if defined(ENABLE_SPELLCHECK) | 36 #if BUILDFLAG(ENABLE_SPELLCHECK) |
36 class SpellCheck; | 37 class SpellCheck; |
37 class SpellCheckProvider; | 38 class SpellCheckProvider; |
38 #endif | 39 #endif |
39 | 40 |
40 struct ChromeViewHostMsg_GetPluginInfo_Output; | 41 struct ChromeViewHostMsg_GetPluginInfo_Output; |
41 | 42 |
42 namespace content { | 43 namespace content { |
43 class BrowserPluginDelegate; | 44 class BrowserPluginDelegate; |
44 struct WebPluginInfo; | 45 struct WebPluginInfo; |
45 } | 46 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 v8::Local<v8::Context> context, | 180 v8::Local<v8::Context> context, |
180 int64_t service_worker_version_id, | 181 int64_t service_worker_version_id, |
181 const GURL& url) override; | 182 const GURL& url) override; |
182 void WillDestroyServiceWorkerContextOnWorkerThread( | 183 void WillDestroyServiceWorkerContextOnWorkerThread( |
183 v8::Local<v8::Context> context, | 184 v8::Local<v8::Context> context, |
184 int64_t service_worker_version_id, | 185 int64_t service_worker_version_id, |
185 const GURL& url) override; | 186 const GURL& url) override; |
186 bool ShouldEnforceWebRTCRoutingPreferences() override; | 187 bool ShouldEnforceWebRTCRoutingPreferences() override; |
187 GURL OverrideFlashEmbedWithHTML(const GURL& url) override; | 188 GURL OverrideFlashEmbedWithHTML(const GURL& url) override; |
188 | 189 |
189 #if defined(ENABLE_SPELLCHECK) | 190 #if BUILDFLAG(ENABLE_SPELLCHECK) |
190 // Sets a new |spellcheck|. Used for testing only. | 191 // Sets a new |spellcheck|. Used for testing only. |
191 // Takes ownership of |spellcheck|. | 192 // Takes ownership of |spellcheck|. |
192 void SetSpellcheck(SpellCheck* spellcheck); | 193 void SetSpellcheck(SpellCheck* spellcheck); |
193 #endif | 194 #endif |
194 | 195 |
195 #if defined(ENABLE_PLUGINS) | 196 #if defined(ENABLE_PLUGINS) |
196 static blink::WebPlugin* CreatePlugin( | 197 static blink::WebPlugin* CreatePlugin( |
197 content::RenderFrame* render_frame, | 198 content::RenderFrame* render_frame, |
198 blink::WebLocalFrame* frame, | 199 blink::WebLocalFrame* frame, |
199 const blink::WebPluginParams& params, | 200 const blink::WebPluginParams& params, |
(...skipping 28 matching lines...) Expand all Loading... |
228 #endif | 229 #endif |
229 | 230 |
230 rappor::mojom::RapporRecorderPtr rappor_recorder_; | 231 rappor::mojom::RapporRecorderPtr rappor_recorder_; |
231 | 232 |
232 std::unique_ptr<ChromeRenderThreadObserver> chrome_observer_; | 233 std::unique_ptr<ChromeRenderThreadObserver> chrome_observer_; |
233 std::unique_ptr<web_cache::WebCacheImpl> web_cache_impl_; | 234 std::unique_ptr<web_cache::WebCacheImpl> web_cache_impl_; |
234 | 235 |
235 std::unique_ptr<network_hints::PrescientNetworkingDispatcher> | 236 std::unique_ptr<network_hints::PrescientNetworkingDispatcher> |
236 prescient_networking_dispatcher_; | 237 prescient_networking_dispatcher_; |
237 | 238 |
238 #if defined(ENABLE_SPELLCHECK) | 239 #if BUILDFLAG(ENABLE_SPELLCHECK) |
239 std::unique_ptr<SpellCheck> spellcheck_; | 240 std::unique_ptr<SpellCheck> spellcheck_; |
240 #endif | 241 #endif |
241 std::unique_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; | 242 std::unique_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; |
242 std::unique_ptr<subresource_filter::RulesetDealer> | 243 std::unique_ptr<subresource_filter::RulesetDealer> |
243 subresource_filter_ruleset_dealer_; | 244 subresource_filter_ruleset_dealer_; |
244 std::unique_ptr<prerender::PrerenderDispatcher> prerender_dispatcher_; | 245 std::unique_ptr<prerender::PrerenderDispatcher> prerender_dispatcher_; |
245 #if defined(ENABLE_WEBRTC) | 246 #if defined(ENABLE_WEBRTC) |
246 scoped_refptr<WebRtcLoggingMessageFilter> webrtc_logging_message_filter_; | 247 scoped_refptr<WebRtcLoggingMessageFilter> webrtc_logging_message_filter_; |
247 #endif | 248 #endif |
248 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 249 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
249 std::unique_ptr<ChromePDFPrintClient> pdf_print_client_; | 250 std::unique_ptr<ChromePDFPrintClient> pdf_print_client_; |
250 #endif | 251 #endif |
251 #if defined(ENABLE_PLUGINS) | 252 #if defined(ENABLE_PLUGINS) |
252 std::set<std::string> allowed_camera_device_origins_; | 253 std::set<std::string> allowed_camera_device_origins_; |
253 std::set<std::string> allowed_compositor_origins_; | 254 std::set<std::string> allowed_compositor_origins_; |
254 #endif | 255 #endif |
255 | 256 |
256 #if defined(OS_CHROMEOS) | 257 #if defined(OS_CHROMEOS) |
257 std::unique_ptr<LeakDetectorRemoteClient> leak_detector_remote_client_; | 258 std::unique_ptr<LeakDetectorRemoteClient> leak_detector_remote_client_; |
258 #endif | 259 #endif |
259 | 260 |
260 DISALLOW_COPY_AND_ASSIGN(ChromeContentRendererClient); | 261 DISALLOW_COPY_AND_ASSIGN(ChromeContentRendererClient); |
261 }; | 262 }; |
262 | 263 |
263 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 264 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |