| 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/bind.h" | 10 #include "base/bind.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade
rs.h" | 71 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade
rs.h" |
| 72 #include "components/dom_distiller/content/renderer/distillability_agent.h" | 72 #include "components/dom_distiller/content/renderer/distillability_agent.h" |
| 73 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob
server.h" | 73 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob
server.h" |
| 74 #include "components/dom_distiller/core/dom_distiller_switches.h" | 74 #include "components/dom_distiller/core/dom_distiller_switches.h" |
| 75 #include "components/dom_distiller/core/url_constants.h" | 75 #include "components/dom_distiller/core/url_constants.h" |
| 76 #include "components/error_page/common/localized_error.h" | 76 #include "components/error_page/common/localized_error.h" |
| 77 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" | 77 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" |
| 78 #include "components/password_manager/content/renderer/credential_manager_client
.h" | 78 #include "components/password_manager/content/renderer/credential_manager_client
.h" |
| 79 #include "components/pdf/renderer/pepper_pdf_host.h" | 79 #include "components/pdf/renderer/pepper_pdf_host.h" |
| 80 #include "components/safe_browsing/renderer/threat_dom_details.h" | 80 #include "components/safe_browsing/renderer/threat_dom_details.h" |
| 81 #include "components/safe_browsing/renderer/websocket_sb_handshake_throttle.h" |
| 81 #include "components/signin/core/common/profile_management_switches.h" | 82 #include "components/signin/core/common/profile_management_switches.h" |
| 82 #include "components/spellcheck/spellcheck_build_features.h" | 83 #include "components/spellcheck/spellcheck_build_features.h" |
| 83 #include "components/startup_metric_utils/common/startup_metric.mojom.h" | 84 #include "components/startup_metric_utils/common/startup_metric.mojom.h" |
| 84 #include "components/subresource_filter/content/renderer/subresource_filter_agen
t.h" | 85 #include "components/subresource_filter/content/renderer/subresource_filter_agen
t.h" |
| 85 #include "components/subresource_filter/content/renderer/unverified_ruleset_deal
er.h" | 86 #include "components/subresource_filter/content/renderer/unverified_ruleset_deal
er.h" |
| 86 #include "components/task_scheduler_util/renderer/initialization.h" | 87 #include "components/task_scheduler_util/renderer/initialization.h" |
| 87 #include "components/version_info/version_info.h" | 88 #include "components/version_info/version_info.h" |
| 88 #include "components/visitedlink/renderer/visitedlink_slave.h" | 89 #include "components/visitedlink/renderer/visitedlink_slave.h" |
| 89 #include "components/web_cache/renderer/web_cache_impl.h" | 90 #include "components/web_cache/renderer/web_cache_impl.h" |
| 90 #include "content/public/common/content_constants.h" | 91 #include "content/public/common/content_constants.h" |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 #if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) | 1304 #if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) |
| 1304 bool ChromeContentRendererClient::IsExtensionOrSharedModuleWhitelisted( | 1305 bool ChromeContentRendererClient::IsExtensionOrSharedModuleWhitelisted( |
| 1305 const GURL& url, const std::set<std::string>& whitelist) { | 1306 const GURL& url, const std::set<std::string>& whitelist) { |
| 1306 const extensions::ExtensionSet* extension_set = | 1307 const extensions::ExtensionSet* extension_set = |
| 1307 extensions::RendererExtensionRegistry::Get()->GetMainThreadExtensionSet(); | 1308 extensions::RendererExtensionRegistry::Get()->GetMainThreadExtensionSet(); |
| 1308 return chrome::IsExtensionOrSharedModuleWhitelisted(url, extension_set, | 1309 return chrome::IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
| 1309 whitelist); | 1310 whitelist); |
| 1310 } | 1311 } |
| 1311 #endif | 1312 #endif |
| 1312 | 1313 |
| 1314 std::unique_ptr<blink::WebSocketHandshakeThrottle> |
| 1315 ChromeContentRendererClient::CreateWebSocketHandshakeThrottle() { |
| 1316 return safe_browsing::WebSocketSBHandshakeThrottle::MaybeCreate(); |
| 1317 } |
| 1318 |
| 1313 std::unique_ptr<blink::WebSpeechSynthesizer> | 1319 std::unique_ptr<blink::WebSpeechSynthesizer> |
| 1314 ChromeContentRendererClient::OverrideSpeechSynthesizer( | 1320 ChromeContentRendererClient::OverrideSpeechSynthesizer( |
| 1315 blink::WebSpeechSynthesizerClient* client) { | 1321 blink::WebSpeechSynthesizerClient* client) { |
| 1316 return base::MakeUnique<TtsDispatcher>(client); | 1322 return base::MakeUnique<TtsDispatcher>(client); |
| 1317 } | 1323 } |
| 1318 | 1324 |
| 1319 bool ChromeContentRendererClient::AllowPepperMediaStreamAPI( | 1325 bool ChromeContentRendererClient::AllowPepperMediaStreamAPI( |
| 1320 const GURL& url) { | 1326 const GURL& url) { |
| 1321 #if defined(OS_ANDROID) | 1327 #if defined(OS_ANDROID) |
| 1322 return false; | 1328 return false; |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1593 | 1599 |
| 1594 RecordYouTubeRewriteUMA(result); | 1600 RecordYouTubeRewriteUMA(result); |
| 1595 return corrected_url.ReplaceComponents(r); | 1601 return corrected_url.ReplaceComponents(r); |
| 1596 } | 1602 } |
| 1597 | 1603 |
| 1598 std::unique_ptr<base::TaskScheduler::InitParams> | 1604 std::unique_ptr<base::TaskScheduler::InitParams> |
| 1599 ChromeContentRendererClient::GetTaskSchedulerInitParams() { | 1605 ChromeContentRendererClient::GetTaskSchedulerInitParams() { |
| 1600 return task_scheduler_util:: | 1606 return task_scheduler_util:: |
| 1601 GetRendererTaskSchedulerInitParamsFromCommandLine(); | 1607 GetRendererTaskSchedulerInitParamsFromCommandLine(); |
| 1602 } | 1608 } |
| OLD | NEW |