Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2064463002: Mojo interface/service for Leak Detector on remote process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Create BUILD.gn for chrome/renderer/leak_detector Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 #endif 317 #endif
318 318
319 #if defined(ENABLE_MOJO_MEDIA) 319 #if defined(ENABLE_MOJO_MEDIA)
320 #include "chrome/browser/media/output_protection_impl.h" 320 #include "chrome/browser/media/output_protection_impl.h"
321 #endif 321 #endif
322 322
323 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) 323 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
324 #include "media/mojo/services/mojo_media_application_factory.h" // nogncheck 324 #include "media/mojo/services/mojo_media_application_factory.h" // nogncheck
325 #endif 325 #endif
326 326
327 #if defined(OS_CHROMEOS)
328 #include "chrome/browser/metrics/leak_detector/leak_detector_remote_controller.h "
329 #endif
330
327 using base::FileDescriptor; 331 using base::FileDescriptor;
328 using blink::WebWindowFeatures; 332 using blink::WebWindowFeatures;
329 using content::AccessTokenStore; 333 using content::AccessTokenStore;
330 using content::BrowserThread; 334 using content::BrowserThread;
331 using content::BrowserURLHandler; 335 using content::BrowserURLHandler;
332 using content::ChildProcessSecurityPolicy; 336 using content::ChildProcessSecurityPolicy;
333 using content::QuotaPermissionContext; 337 using content::QuotaPermissionContext;
334 using content::RenderFrameHost; 338 using content::RenderFrameHost;
335 using content::RenderViewHost; 339 using content::RenderViewHost;
336 using content::ResourceType; 340 using content::ResourceType;
(...skipping 2442 matching lines...) Expand 10 before | Expand all | Expand 10 after
2779 2783
2780 return false; 2784 return false;
2781 } 2785 }
2782 #endif // defined(OS_WIN) 2786 #endif // defined(OS_WIN)
2783 2787
2784 void ChromeContentBrowserClient::ExposeInterfacesToRenderer( 2788 void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
2785 shell::InterfaceRegistry* registry, 2789 shell::InterfaceRegistry* registry,
2786 content::RenderProcessHost* render_process_host) { 2790 content::RenderProcessHost* render_process_host) {
2787 registry->AddInterface( 2791 registry->AddInterface(
2788 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create)); 2792 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create));
2793
2794 #if defined(OS_CHROMEOS)
2795 registry->AddInterface<metrics::mojom::LeakDetector>(
2796 base::Bind(&metrics::LeakDetectorRemoteController::Create));
2797 #endif
2789 } 2798 }
2790 2799
2791 void ChromeContentBrowserClient::RegisterFrameMojoShellInterfaces( 2800 void ChromeContentBrowserClient::RegisterFrameMojoShellInterfaces(
2792 shell::InterfaceRegistry* registry, 2801 shell::InterfaceRegistry* registry,
2793 content::RenderFrameHost* render_frame_host) { 2802 content::RenderFrameHost* render_frame_host) {
2794 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. 2803 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA.
2795 #if defined(OS_CHROMEOS) 2804 #if defined(OS_CHROMEOS)
2796 registry->AddInterface( 2805 registry->AddInterface(
2797 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, 2806 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create,
2798 render_frame_host)); 2807 render_frame_host));
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
3046 if (channel <= kMaxDisableEncryptionChannel) { 3055 if (channel <= kMaxDisableEncryptionChannel) {
3047 static const char* const kWebRtcDevSwitchNames[] = { 3056 static const char* const kWebRtcDevSwitchNames[] = {
3048 switches::kDisableWebRtcEncryption, 3057 switches::kDisableWebRtcEncryption,
3049 }; 3058 };
3050 to_command_line->CopySwitchesFrom(from_command_line, 3059 to_command_line->CopySwitchesFrom(from_command_line,
3051 kWebRtcDevSwitchNames, 3060 kWebRtcDevSwitchNames,
3052 arraysize(kWebRtcDevSwitchNames)); 3061 arraysize(kWebRtcDevSwitchNames));
3053 } 3062 }
3054 } 3063 }
3055 #endif // defined(ENABLE_WEBRTC) 3064 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698