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 "components/spellcheck/spellcheck_build_features.h" |
21 #include "content/public/renderer/content_renderer_client.h" | 21 #include "content/public/renderer/content_renderer_client.h" |
22 #include "extensions/features/features.h" | 22 #include "extensions/features/features.h" |
23 #include "ipc/ipc_channel_proxy.h" | 23 #include "ipc/ipc_channel_proxy.h" |
| 24 #include "ppapi/features/features.h" |
24 #include "printing/features/features.h" | 25 #include "printing/features/features.h" |
25 #include "v8/include/v8.h" | 26 #include "v8/include/v8.h" |
26 | 27 |
27 #if defined (OS_CHROMEOS) | 28 #if defined (OS_CHROMEOS) |
28 #include "chrome/renderer/leak_detector/leak_detector_remote_client.h" | 29 #include "chrome/renderer/leak_detector/leak_detector_remote_client.h" |
29 #endif | 30 #endif |
30 | 31 |
31 class ChromeRenderThreadObserver; | 32 class ChromeRenderThreadObserver; |
32 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 33 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
33 class ChromePDFPrintClient; | 34 class ChromePDFPrintClient; |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 const GURL& url) override; | 187 const GURL& url) override; |
187 bool ShouldEnforceWebRTCRoutingPreferences() override; | 188 bool ShouldEnforceWebRTCRoutingPreferences() override; |
188 GURL OverrideFlashEmbedWithHTML(const GURL& url) override; | 189 GURL OverrideFlashEmbedWithHTML(const GURL& url) override; |
189 | 190 |
190 #if BUILDFLAG(ENABLE_SPELLCHECK) | 191 #if BUILDFLAG(ENABLE_SPELLCHECK) |
191 // Sets a new |spellcheck|. Used for testing only. | 192 // Sets a new |spellcheck|. Used for testing only. |
192 // Takes ownership of |spellcheck|. | 193 // Takes ownership of |spellcheck|. |
193 void SetSpellcheck(SpellCheck* spellcheck); | 194 void SetSpellcheck(SpellCheck* spellcheck); |
194 #endif | 195 #endif |
195 | 196 |
196 #if defined(ENABLE_PLUGINS) | 197 #if BUILDFLAG(ENABLE_PLUGINS) |
197 static blink::WebPlugin* CreatePlugin( | 198 static blink::WebPlugin* CreatePlugin( |
198 content::RenderFrame* render_frame, | 199 content::RenderFrame* render_frame, |
199 blink::WebLocalFrame* frame, | 200 blink::WebLocalFrame* frame, |
200 const blink::WebPluginParams& params, | 201 const blink::WebPluginParams& params, |
201 const ChromeViewHostMsg_GetPluginInfo_Output& output); | 202 const ChromeViewHostMsg_GetPluginInfo_Output& output); |
202 #endif | 203 #endif |
203 | 204 |
204 #if defined(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) | 205 #if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) |
205 static bool IsExtensionOrSharedModuleWhitelisted( | 206 static bool IsExtensionOrSharedModuleWhitelisted( |
206 const GURL& url, const std::set<std::string>& whitelist); | 207 const GURL& url, const std::set<std::string>& whitelist); |
207 #endif | 208 #endif |
208 | 209 |
209 private: | 210 private: |
210 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, NaClRestriction); | 211 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, NaClRestriction); |
211 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, | 212 FRIEND_TEST_ALL_PREFIXES(ChromeContentRendererClientTest, |
212 ShouldSuppressErrorPage); | 213 ShouldSuppressErrorPage); |
213 | 214 |
214 static GURL GetNaClContentHandlerURL(const std::string& actual_mime_type, | 215 static GURL GetNaClContentHandlerURL(const std::string& actual_mime_type, |
(...skipping 27 matching lines...) Expand all Loading... |
242 std::unique_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; | 243 std::unique_ptr<safe_browsing::PhishingClassifierFilter> phishing_classifier_; |
243 std::unique_ptr<subresource_filter::RulesetDealer> | 244 std::unique_ptr<subresource_filter::RulesetDealer> |
244 subresource_filter_ruleset_dealer_; | 245 subresource_filter_ruleset_dealer_; |
245 std::unique_ptr<prerender::PrerenderDispatcher> prerender_dispatcher_; | 246 std::unique_ptr<prerender::PrerenderDispatcher> prerender_dispatcher_; |
246 #if defined(ENABLE_WEBRTC) | 247 #if defined(ENABLE_WEBRTC) |
247 scoped_refptr<WebRtcLoggingMessageFilter> webrtc_logging_message_filter_; | 248 scoped_refptr<WebRtcLoggingMessageFilter> webrtc_logging_message_filter_; |
248 #endif | 249 #endif |
249 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) | 250 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
250 std::unique_ptr<ChromePDFPrintClient> pdf_print_client_; | 251 std::unique_ptr<ChromePDFPrintClient> pdf_print_client_; |
251 #endif | 252 #endif |
252 #if defined(ENABLE_PLUGINS) | 253 #if BUILDFLAG(ENABLE_PLUGINS) |
253 std::set<std::string> allowed_camera_device_origins_; | 254 std::set<std::string> allowed_camera_device_origins_; |
254 std::set<std::string> allowed_compositor_origins_; | 255 std::set<std::string> allowed_compositor_origins_; |
255 #endif | 256 #endif |
256 | 257 |
257 #if defined(OS_CHROMEOS) | 258 #if defined(OS_CHROMEOS) |
258 std::unique_ptr<LeakDetectorRemoteClient> leak_detector_remote_client_; | 259 std::unique_ptr<LeakDetectorRemoteClient> leak_detector_remote_client_; |
259 #endif | 260 #endif |
260 | 261 |
261 DISALLOW_COPY_AND_ASSIGN(ChromeContentRendererClient); | 262 DISALLOW_COPY_AND_ASSIGN(ChromeContentRendererClient); |
262 }; | 263 }; |
263 | 264 |
264 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ | 265 #endif // CHROME_RENDERER_CHROME_CONTENT_RENDERER_CLIENT_H_ |
OLD | NEW |