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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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.mojom.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" |
96 #include "ppapi/shared_impl/ppapi_switches.h" | 95 #include "ppapi/shared_impl/ppapi_switches.h" |
| 96 #include "services/shell/public/cpp/interface_provider.h" |
97 #include "third_party/WebKit/public/platform/URLConversion.h" | 97 #include "third_party/WebKit/public/platform/URLConversion.h" |
98 #include "third_party/WebKit/public/platform/WebCachePolicy.h" | 98 #include "third_party/WebKit/public/platform/WebCachePolicy.h" |
99 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 99 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
100 #include "third_party/WebKit/public/platform/WebURL.h" | 100 #include "third_party/WebKit/public/platform/WebURL.h" |
101 #include "third_party/WebKit/public/platform/WebURLError.h" | 101 #include "third_party/WebKit/public/platform/WebURLError.h" |
102 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 102 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
103 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 103 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
104 #include "third_party/WebKit/public/web/WebCache.h" | 104 #include "third_party/WebKit/public/web/WebCache.h" |
105 #include "third_party/WebKit/public/web/WebDataSource.h" | 105 #include "third_party/WebKit/public/web/WebDataSource.h" |
106 #include "third_party/WebKit/public/web/WebDocument.h" | 106 #include "third_party/WebKit/public/web/WebDocument.h" |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 } | 323 } |
324 | 324 |
325 ChromeContentRendererClient::~ChromeContentRendererClient() { | 325 ChromeContentRendererClient::~ChromeContentRendererClient() { |
326 } | 326 } |
327 | 327 |
328 void ChromeContentRendererClient::RenderThreadStarted() { | 328 void ChromeContentRendererClient::RenderThreadStarted() { |
329 RenderThread* thread = RenderThread::Get(); | 329 RenderThread* thread = RenderThread::Get(); |
330 | 330 |
331 { | 331 { |
332 startup_metric_utils::mojom::StartupMetricHostPtr startup_metric_host; | 332 startup_metric_utils::mojom::StartupMetricHostPtr startup_metric_host; |
333 thread->GetServiceRegistry()->ConnectToRemoteService( | 333 thread->GetRemoteInterfaces()->GetInterface(&startup_metric_host); |
334 mojo::GetProxy(&startup_metric_host)); | |
335 startup_metric_host->RecordRendererMainEntryTime(main_entry_time_); | 334 startup_metric_host->RecordRendererMainEntryTime(main_entry_time_); |
336 } | 335 } |
337 | 336 |
338 chrome_observer_.reset(new ChromeRenderThreadObserver()); | 337 chrome_observer_.reset(new ChromeRenderThreadObserver()); |
339 web_cache_impl_.reset(new web_cache::WebCacheImpl()); | 338 web_cache_impl_.reset(new web_cache::WebCacheImpl()); |
340 | 339 |
341 #if defined(ENABLE_EXTENSIONS) | 340 #if defined(ENABLE_EXTENSIONS) |
342 ChromeExtensionsRendererClient::GetInstance()->RenderThreadStarted(); | 341 ChromeExtensionsRendererClient::GetInstance()->RenderThreadStarted(); |
343 #endif | 342 #endif |
344 | 343 |
(...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1379 // chrome.system.network.getNetworkInterfaces provides the same | 1378 // chrome.system.network.getNetworkInterfaces provides the same |
1380 // information. Also, the enforcement of sending and binding UDP is already done | 1379 // information. Also, the enforcement of sending and binding UDP is already done |
1381 // by chrome extension permission model. | 1380 // by chrome extension permission model. |
1382 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { | 1381 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { |
1383 #if defined(ENABLE_EXTENSIONS) | 1382 #if defined(ENABLE_EXTENSIONS) |
1384 return !IsStandaloneExtensionProcess(); | 1383 return !IsStandaloneExtensionProcess(); |
1385 #else | 1384 #else |
1386 return true; | 1385 return true; |
1387 #endif | 1386 #endif |
1388 } | 1387 } |
OLD | NEW |