| 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 | |
| 7 #include <memory> | 6 #include <memory> |
| 8 #include <utility> | 7 #include <utility> |
| 9 | 8 |
| 10 #include "base/bind.h" | 9 #include "base/bind.h" |
| 11 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 12 #include "base/debug/crash_logging.h" | 11 #include "base/debug/crash_logging.h" |
| 13 #include "base/logging.h" | 12 #include "base/logging.h" |
| 14 #include "base/macros.h" | 13 #include "base/macros.h" |
| 15 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
| 16 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 39 #include "chrome/grit/chromium_strings.h" | 38 #include "chrome/grit/chromium_strings.h" |
| 40 #include "chrome/grit/generated_resources.h" | 39 #include "chrome/grit/generated_resources.h" |
| 41 #include "chrome/grit/renderer_resources.h" | 40 #include "chrome/grit/renderer_resources.h" |
| 42 #include "chrome/renderer/app_categorizer.h" | 41 #include "chrome/renderer/app_categorizer.h" |
| 43 #include "chrome/renderer/benchmarking_extension.h" | 42 #include "chrome/renderer/benchmarking_extension.h" |
| 44 #include "chrome/renderer/chrome_render_frame_observer.h" | 43 #include "chrome/renderer/chrome_render_frame_observer.h" |
| 45 #include "chrome/renderer/chrome_render_thread_observer.h" | 44 #include "chrome/renderer/chrome_render_thread_observer.h" |
| 46 #include "chrome/renderer/chrome_render_view_observer.h" | 45 #include "chrome/renderer/chrome_render_view_observer.h" |
| 47 #include "chrome/renderer/content_settings_observer.h" | 46 #include "chrome/renderer/content_settings_observer.h" |
| 48 #include "chrome/renderer/loadtimes_extension_bindings.h" | 47 #include "chrome/renderer/loadtimes_extension_bindings.h" |
| 48 #include "chrome/renderer/media/media_iph_impl.h" |
| 49 #include "chrome/renderer/net/net_error_helper.h" | 49 #include "chrome/renderer/net/net_error_helper.h" |
| 50 #include "chrome/renderer/net_benchmarking_extension.h" | 50 #include "chrome/renderer/net_benchmarking_extension.h" |
| 51 #include "chrome/renderer/page_load_metrics/metrics_render_frame_observer.h" | 51 #include "chrome/renderer/page_load_metrics/metrics_render_frame_observer.h" |
| 52 #include "chrome/renderer/pepper/pepper_helper.h" | 52 #include "chrome/renderer/pepper/pepper_helper.h" |
| 53 #include "chrome/renderer/plugins/non_loadable_plugin_placeholder.h" | 53 #include "chrome/renderer/plugins/non_loadable_plugin_placeholder.h" |
| 54 #include "chrome/renderer/plugins/plugin_preroller.h" | 54 #include "chrome/renderer/plugins/plugin_preroller.h" |
| 55 #include "chrome/renderer/plugins/plugin_uma.h" | 55 #include "chrome/renderer/plugins/plugin_uma.h" |
| 56 #include "chrome/renderer/prerender/prerender_dispatcher.h" | 56 #include "chrome/renderer/prerender/prerender_dispatcher.h" |
| 57 #include "chrome/renderer/prerender/prerender_helper.h" | 57 #include "chrome/renderer/prerender/prerender_helper.h" |
| 58 #include "chrome/renderer/prerender/prerenderer_client.h" | 58 #include "chrome/renderer/prerender/prerenderer_client.h" |
| 59 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" | 59 #include "chrome/renderer/safe_browsing/phishing_classifier_delegate.h" |
| 60 #include "chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.h" | 60 #include "chrome/renderer/safe_browsing/safe_browsing_url_loader_throttle.h" |
| 61 #include "chrome/renderer/searchbox/search_bouncer.h" | 61 #include "chrome/renderer/searchbox/search_bouncer.h" |
| 62 #include "chrome/renderer/searchbox/searchbox.h" | 62 #include "chrome/renderer/searchbox/searchbox.h" |
| 63 #include "chrome/renderer/searchbox/searchbox_extension.h" | 63 #include "chrome/renderer/searchbox/searchbox_extension.h" |
| 64 #include "chrome/renderer/tts_dispatcher.h" | 64 #include "chrome/renderer/tts_dispatcher.h" |
| 65 #include "chrome/renderer/worker_content_settings_client.h" | 65 #include "chrome/renderer/worker_content_settings_client.h" |
| 66 #include "components/autofill/content/renderer/autofill_agent.h" | 66 #include "components/autofill/content/renderer/autofill_agent.h" |
| 67 #include "components/autofill/content/renderer/password_autofill_agent.h" | 67 #include "components/autofill/content/renderer/password_autofill_agent.h" |
| 68 #include "components/autofill/content/renderer/password_generation_agent.h" | 68 #include "components/autofill/content/renderer/password_generation_agent.h" |
| 69 #include "components/content_settings/core/common/content_settings_pattern.h" | 69 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 70 #include "components/contextual_search/renderer/overlay_js_render_frame_observer
.h" | 70 #include "components/contextual_search/renderer/overlay_js_render_frame_observer
.h" |
| 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/feature_engagement_tracker/public/feature_list.h" |
| 77 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" | 78 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" |
| 78 #include "components/password_manager/content/renderer/credential_manager_client
.h" | 79 #include "components/password_manager/content/renderer/credential_manager_client
.h" |
| 79 #include "components/pdf/renderer/pepper_pdf_host.h" | 80 #include "components/pdf/renderer/pepper_pdf_host.h" |
| 80 #include "components/safe_browsing/renderer/threat_dom_details.h" | 81 #include "components/safe_browsing/renderer/threat_dom_details.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" |
| (...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1593 | 1594 |
| 1594 RecordYouTubeRewriteUMA(result); | 1595 RecordYouTubeRewriteUMA(result); |
| 1595 return corrected_url.ReplaceComponents(r); | 1596 return corrected_url.ReplaceComponents(r); |
| 1596 } | 1597 } |
| 1597 | 1598 |
| 1598 std::unique_ptr<base::TaskScheduler::InitParams> | 1599 std::unique_ptr<base::TaskScheduler::InitParams> |
| 1599 ChromeContentRendererClient::GetTaskSchedulerInitParams() { | 1600 ChromeContentRendererClient::GetTaskSchedulerInitParams() { |
| 1600 return task_scheduler_util:: | 1601 return task_scheduler_util:: |
| 1601 GetRendererTaskSchedulerInitParamsFromCommandLine(); | 1602 GetRendererTaskSchedulerInitParamsFromCommandLine(); |
| 1602 } | 1603 } |
| 1604 |
| 1605 std::unique_ptr<blink::WebMediaIPH> |
| 1606 ChromeContentRendererClient::CreateWebMediaIPH( |
| 1607 content::RenderFrame* render_frame) { |
| 1608 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1609 feature_engagement_tracker::kEnableMediaDownloadIPH)) { |
| 1610 return nullptr; |
| 1611 } |
| 1612 |
| 1613 return base::MakeUnique<MediaIPHImpl>(render_frame); |
| 1614 } |
| OLD | NEW |