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/distillability_agent.h" | 68 #include "components/dom_distiller/content/renderer/distillability_agent.h" |
69 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob
server.h" | 69 #include "components/dom_distiller/content/renderer/distiller_js_render_frame_ob
server.h" |
70 #include "components/dom_distiller/core/url_constants.h" | 70 #include "components/dom_distiller/core/url_constants.h" |
71 #include "components/error_page/common/localized_error.h" | 71 #include "components/error_page/common/localized_error.h" |
72 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" | 72 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" |
73 #include "components/page_load_metrics/renderer/metrics_render_frame_observer.h" | 73 #include "components/page_load_metrics/renderer/metrics_render_frame_observer.h" |
74 #include "components/password_manager/content/renderer/credential_manager_client
.h" | 74 #include "components/password_manager/content/renderer/credential_manager_client
.h" |
75 #include "components/pdf/renderer/pepper_pdf_host.h" | 75 #include "components/pdf/renderer/pepper_pdf_host.h" |
76 #include "components/plugins/renderer/mobile_youtube_plugin.h" | 76 #include "components/plugins/renderer/mobile_youtube_plugin.h" |
77 #include "components/signin/core/common/profile_management_switches.h" | 77 #include "components/signin/core/common/profile_management_switches.h" |
78 #include "components/startup_metric_utils/common/startup_metric.mojom.h" | 78 #include "components/startup_metric_utils/common/startup_metric_messages.h" |
79 #include "components/subresource_filter/content/renderer/subresource_filter_agen
t.h" | 79 #include "components/subresource_filter/content/renderer/subresource_filter_agen
t.h" |
80 #include "components/version_info/version_info.h" | 80 #include "components/version_info/version_info.h" |
81 #include "components/visitedlink/renderer/visitedlink_slave.h" | 81 #include "components/visitedlink/renderer/visitedlink_slave.h" |
82 #include "components/web_cache/renderer/web_cache_impl.h" | 82 #include "components/web_cache/renderer/web_cache_impl.h" |
83 #include "content/public/common/content_constants.h" | 83 #include "content/public/common/content_constants.h" |
84 #include "content/public/common/content_switches.h" | 84 #include "content/public/common/content_switches.h" |
85 #include "content/public/common/service_registry.h" | |
86 #include "content/public/common/url_constants.h" | 85 #include "content/public/common/url_constants.h" |
87 #include "content/public/renderer/plugin_instance_throttler.h" | 86 #include "content/public/renderer/plugin_instance_throttler.h" |
88 #include "content/public/renderer/render_frame.h" | 87 #include "content/public/renderer/render_frame.h" |
89 #include "content/public/renderer/render_thread.h" | 88 #include "content/public/renderer/render_thread.h" |
90 #include "content/public/renderer/render_view.h" | 89 #include "content/public/renderer/render_view.h" |
91 #include "content/public/renderer/render_view_visitor.h" | 90 #include "content/public/renderer/render_view_visitor.h" |
92 #include "extensions/common/constants.h" | 91 #include "extensions/common/constants.h" |
93 #include "ipc/ipc_sync_channel.h" | 92 #include "ipc/ipc_sync_channel.h" |
94 #include "net/base/net_errors.h" | 93 #include "net/base/net_errors.h" |
95 #include "ppapi/c/private/ppb_pdf.h" | 94 #include "ppapi/c/private/ppb_pdf.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 printing::SetAgent(GetUserAgent()); | 320 printing::SetAgent(GetUserAgent()); |
322 #endif | 321 #endif |
323 } | 322 } |
324 | 323 |
325 ChromeContentRendererClient::~ChromeContentRendererClient() { | 324 ChromeContentRendererClient::~ChromeContentRendererClient() { |
326 } | 325 } |
327 | 326 |
328 void ChromeContentRendererClient::RenderThreadStarted() { | 327 void ChromeContentRendererClient::RenderThreadStarted() { |
329 RenderThread* thread = RenderThread::Get(); | 328 RenderThread* thread = RenderThread::Get(); |
330 | 329 |
331 { | 330 thread->Send(new StartupMetricHostMsg_RecordRendererMainEntryTime( |
332 startup_metric_utils::mojom::StartupMetricHostPtr startup_metric_host; | 331 main_entry_time_)); |
333 thread->GetServiceRegistry()->ConnectToRemoteService( | |
334 mojo::GetProxy(&startup_metric_host)); | |
335 startup_metric_host->RecordRendererMainEntryTime(main_entry_time_); | |
336 } | |
337 | 332 |
338 chrome_observer_.reset(new ChromeRenderThreadObserver()); | 333 chrome_observer_.reset(new ChromeRenderThreadObserver()); |
339 web_cache_impl_.reset(new web_cache::WebCacheImpl()); | 334 web_cache_impl_.reset(new web_cache::WebCacheImpl()); |
340 | 335 |
341 #if defined(ENABLE_EXTENSIONS) | 336 #if defined(ENABLE_EXTENSIONS) |
342 ChromeExtensionsRendererClient::GetInstance()->RenderThreadStarted(); | 337 ChromeExtensionsRendererClient::GetInstance()->RenderThreadStarted(); |
343 #endif | 338 #endif |
344 | 339 |
345 prescient_networking_dispatcher_.reset( | 340 prescient_networking_dispatcher_.reset( |
346 new network_hints::PrescientNetworkingDispatcher()); | 341 new network_hints::PrescientNetworkingDispatcher()); |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 // chrome.system.network.getNetworkInterfaces provides the same | 1374 // chrome.system.network.getNetworkInterfaces provides the same |
1380 // information. Also, the enforcement of sending and binding UDP is already done | 1375 // information. Also, the enforcement of sending and binding UDP is already done |
1381 // by chrome extension permission model. | 1376 // by chrome extension permission model. |
1382 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1377 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
1383 #if defined(ENABLE_EXTENSIONS) | 1378 #if defined(ENABLE_EXTENSIONS) |
1384 return !IsStandaloneExtensionProcess(); | 1379 return !IsStandaloneExtensionProcess(); |
1385 #else | 1380 #else |
1386 return true; | 1381 return true; |
1387 #endif | 1382 #endif |
1388 } | 1383 } |
OLD | NEW |