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/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 #endif | 313 #endif |
314 | 314 |
315 #if defined(ENABLE_MOJO_MEDIA) | 315 #if defined(ENABLE_MOJO_MEDIA) |
316 #include "chrome/browser/media/output_protection_impl.h" | 316 #include "chrome/browser/media/output_protection_impl.h" |
317 #endif | 317 #endif |
318 | 318 |
319 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) | 319 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) |
320 #include "media/mojo/services/mojo_media_application_factory.h" // nogncheck | 320 #include "media/mojo/services/mojo_media_application_factory.h" // nogncheck |
321 #endif | 321 #endif |
322 | 322 |
| 323 #if defined(OS_CHROMEOS) |
| 324 #include "chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h
" |
| 325 #endif |
| 326 |
323 using base::FileDescriptor; | 327 using base::FileDescriptor; |
324 using blink::WebWindowFeatures; | 328 using blink::WebWindowFeatures; |
325 using content::AccessTokenStore; | 329 using content::AccessTokenStore; |
326 using content::BrowserThread; | 330 using content::BrowserThread; |
327 using content::BrowserURLHandler; | 331 using content::BrowserURLHandler; |
328 using content::ChildProcessSecurityPolicy; | 332 using content::ChildProcessSecurityPolicy; |
329 using content::QuotaPermissionContext; | 333 using content::QuotaPermissionContext; |
330 using content::RenderFrameHost; | 334 using content::RenderFrameHost; |
331 using content::RenderViewHost; | 335 using content::RenderViewHost; |
332 using content::ResourceType; | 336 using content::ResourceType; |
(...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2721 bool ChromeContentBrowserClient::ShouldUseWindowsPrefetchArgument() const { | 2725 bool ChromeContentBrowserClient::ShouldUseWindowsPrefetchArgument() const { |
2722 return startup_metric_utils::GetPreReadOptions().use_prefetch_argument; | 2726 return startup_metric_utils::GetPreReadOptions().use_prefetch_argument; |
2723 } | 2727 } |
2724 #endif // defined(OS_WIN) | 2728 #endif // defined(OS_WIN) |
2725 | 2729 |
2726 void ChromeContentBrowserClient::RegisterRenderProcessMojoServices( | 2730 void ChromeContentBrowserClient::RegisterRenderProcessMojoServices( |
2727 content::ServiceRegistry* registry, | 2731 content::ServiceRegistry* registry, |
2728 content::RenderProcessHost* render_process_host) { | 2732 content::RenderProcessHost* render_process_host) { |
2729 registry->AddService( | 2733 registry->AddService( |
2730 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create)); | 2734 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create)); |
| 2735 |
| 2736 #if defined(OS_CHROMEOS) |
| 2737 registry->AddService<metrics::LeakDetectorRemote>( |
| 2738 base::Bind(&metrics::LeakDetectorRemoteController::Create)); |
| 2739 #endif |
2731 } | 2740 } |
2732 | 2741 |
2733 void ChromeContentBrowserClient::RegisterFrameMojoShellServices( | 2742 void ChromeContentBrowserClient::RegisterFrameMojoShellServices( |
2734 content::ServiceRegistry* registry, | 2743 content::ServiceRegistry* registry, |
2735 content::RenderFrameHost* render_frame_host) { | 2744 content::RenderFrameHost* render_frame_host) { |
2736 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. | 2745 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. |
2737 #if defined(OS_CHROMEOS) | 2746 #if defined(OS_CHROMEOS) |
2738 registry->AddService( | 2747 registry->AddService( |
2739 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, | 2748 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, |
2740 render_frame_host)); | 2749 render_frame_host)); |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2965 if (channel <= kMaxDisableEncryptionChannel) { | 2974 if (channel <= kMaxDisableEncryptionChannel) { |
2966 static const char* const kWebRtcDevSwitchNames[] = { | 2975 static const char* const kWebRtcDevSwitchNames[] = { |
2967 switches::kDisableWebRtcEncryption, | 2976 switches::kDisableWebRtcEncryption, |
2968 }; | 2977 }; |
2969 to_command_line->CopySwitchesFrom(from_command_line, | 2978 to_command_line->CopySwitchesFrom(from_command_line, |
2970 kWebRtcDevSwitchNames, | 2979 kWebRtcDevSwitchNames, |
2971 arraysize(kWebRtcDevSwitchNames)); | 2980 arraysize(kWebRtcDevSwitchNames)); |
2972 } | 2981 } |
2973 } | 2982 } |
2974 #endif // defined(ENABLE_WEBRTC) | 2983 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |