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 #include "chrome/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob server.h" | 68 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob server.h" |
69 #include "components/dom_distiller/core/url_constants.h" | 69 #include "components/dom_distiller/core/url_constants.h" |
70 #include "components/error_page/common/localized_error.h" | 70 #include "components/error_page/common/localized_error.h" |
71 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" | 71 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" |
72 #include "components/page_load_metrics/renderer/metrics_render_frame_observer.h" | 72 #include "components/page_load_metrics/renderer/metrics_render_frame_observer.h" |
73 #include "components/password_manager/content/renderer/credential_manager_client .h" | 73 #include "components/password_manager/content/renderer/credential_manager_client .h" |
74 #include "components/pdf/renderer/pepper_pdf_host.h" | 74 #include "components/pdf/renderer/pepper_pdf_host.h" |
75 #include "components/plugins/renderer/mobile_youtube_plugin.h" | 75 #include "components/plugins/renderer/mobile_youtube_plugin.h" |
76 #include "components/signin/core/common/profile_management_switches.h" | 76 #include "components/signin/core/common/profile_management_switches.h" |
77 #include "components/startup_metric_utils/common/startup_metric_messages.h" | 77 #include "components/startup_metric_utils/common/startup_metric_messages.h" |
78 #include "components/subresource_filter/content/renderer/subresource_filter_agen t.h" | |
78 #include "components/version_info/version_info.h" | 79 #include "components/version_info/version_info.h" |
79 #include "components/visitedlink/renderer/visitedlink_slave.h" | 80 #include "components/visitedlink/renderer/visitedlink_slave.h" |
80 #include "components/web_cache/renderer/web_cache_impl.h" | 81 #include "components/web_cache/renderer/web_cache_impl.h" |
81 #include "content/public/common/content_constants.h" | 82 #include "content/public/common/content_constants.h" |
82 #include "content/public/common/content_switches.h" | 83 #include "content/public/common/content_switches.h" |
83 #include "content/public/common/url_constants.h" | 84 #include "content/public/common/url_constants.h" |
84 #include "content/public/renderer/plugin_instance_throttler.h" | 85 #include "content/public/renderer/plugin_instance_throttler.h" |
85 #include "content/public/renderer/render_frame.h" | 86 #include "content/public/renderer/render_frame.h" |
86 #include "content/public/renderer/render_thread.h" | 87 #include "content/public/renderer/render_thread.h" |
87 #include "content/public/renderer/render_view.h" | 88 #include "content/public/renderer/render_view.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 using blink::WebURL; | 176 using blink::WebURL; |
176 using blink::WebURLError; | 177 using blink::WebURLError; |
177 using blink::WebURLRequest; | 178 using blink::WebURLRequest; |
178 using blink::WebURLResponse; | 179 using blink::WebURLResponse; |
179 using blink::WebVector; | 180 using blink::WebVector; |
180 using content::PluginInstanceThrottler; | 181 using content::PluginInstanceThrottler; |
181 using content::RenderFrame; | 182 using content::RenderFrame; |
182 using content::RenderThread; | 183 using content::RenderThread; |
183 using content::WebPluginInfo; | 184 using content::WebPluginInfo; |
184 using extensions::Extension; | 185 using extensions::Extension; |
186 using subresource_filter::SubresourceFilterAgent; | |
185 | 187 |
186 namespace { | 188 namespace { |
187 | 189 |
188 // Whitelist PPAPI for Android Runtime for Chromium. (See crbug.com/383937) | 190 // Whitelist PPAPI for Android Runtime for Chromium. (See crbug.com/383937) |
189 #if defined(ENABLE_PLUGINS) | 191 #if defined(ENABLE_PLUGINS) |
190 const char* const kPredefinedAllowedCameraDeviceOrigins[] = { | 192 const char* const kPredefinedAllowedCameraDeviceOrigins[] = { |
191 "6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", | 193 "6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", |
192 "4EB74897CB187C7633357C2FE832E0AD6A44883A" | 194 "4EB74897CB187C7633357C2FE832E0AD6A44883A" |
193 }; | 195 }; |
194 | 196 |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
507 | 509 |
508 // Set up a mojo service to test if this page is a contextual search page. | 510 // Set up a mojo service to test if this page is a contextual search page. |
509 new contextual_search::OverlayJsRenderFrameObserver(render_frame); | 511 new contextual_search::OverlayJsRenderFrameObserver(render_frame); |
510 | 512 |
511 PasswordAutofillAgent* password_autofill_agent = | 513 PasswordAutofillAgent* password_autofill_agent = |
512 new PasswordAutofillAgent(render_frame); | 514 new PasswordAutofillAgent(render_frame); |
513 PasswordGenerationAgent* password_generation_agent = | 515 PasswordGenerationAgent* password_generation_agent = |
514 new PasswordGenerationAgent(render_frame, password_autofill_agent); | 516 new PasswordGenerationAgent(render_frame, password_autofill_agent); |
515 new AutofillAgent(render_frame, password_autofill_agent, | 517 new AutofillAgent(render_frame, password_autofill_agent, |
516 password_generation_agent); | 518 password_generation_agent); |
519 | |
520 new subresource_filter::SubresourceFilterAgent(render_frame); | |
battre
2016/05/30 15:29:25
nit: drop namespace if you have a using above?
engedy
2016/05/30 20:54:00
Done. Dropped the using because the class is refer
| |
517 } | 521 } |
518 | 522 |
519 void ChromeContentRendererClient::RenderViewCreated( | 523 void ChromeContentRendererClient::RenderViewCreated( |
520 content::RenderView* render_view) { | 524 content::RenderView* render_view) { |
521 #if defined(ENABLE_EXTENSIONS) | 525 #if defined(ENABLE_EXTENSIONS) |
522 ChromeExtensionsRendererClient::GetInstance()->RenderViewCreated(render_view); | 526 ChromeExtensionsRendererClient::GetInstance()->RenderViewCreated(render_view); |
523 #endif | 527 #endif |
524 new PageLoadHistograms(render_view); | 528 new PageLoadHistograms(render_view); |
525 #if defined(ENABLE_PRINTING) | 529 #if defined(ENABLE_PRINTING) |
526 new printing::PrintWebViewHelper( | 530 new printing::PrintWebViewHelper( |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1410 // chrome.system.network.getNetworkInterfaces provides the same | 1414 // chrome.system.network.getNetworkInterfaces provides the same |
1411 // information. Also, the enforcement of sending and binding UDP is already done | 1415 // information. Also, the enforcement of sending and binding UDP is already done |
1412 // by chrome extension permission model. | 1416 // by chrome extension permission model. |
1413 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1417 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
1414 #if defined(ENABLE_EXTENSIONS) | 1418 #if defined(ENABLE_EXTENSIONS) |
1415 return !IsStandaloneExtensionProcess(); | 1419 return !IsStandaloneExtensionProcess(); |
1416 #else | 1420 #else |
1417 return true; | 1421 return true; |
1418 #endif | 1422 #endif |
1419 } | 1423 } |
OLD | NEW |