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

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

Issue 2157143002: Move interface registration to OnConnect in RPH (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2766 while (tokenizer.GetNext()) { 2766 while (tokenizer.GetNext()) {
2767 if (tokenizer.token() == mime_type) 2767 if (tokenizer.token() == mime_type)
2768 return true; 2768 return true;
2769 } 2769 }
2770 2770
2771 return false; 2771 return false;
2772 } 2772 }
2773 #endif // defined(OS_WIN) 2773 #endif // defined(OS_WIN)
2774 2774
2775 void ChromeContentBrowserClient::ExposeInterfacesToRenderer( 2775 void ChromeContentBrowserClient::ExposeInterfacesToRenderer(
2776 shell::InterfaceRegistry* registry, 2776 shell::Connection* connection) {
2777 content::RenderProcessHost* render_process_host) { 2777 connection->GetInterfaceRegistry()->AddInterface(
2778 registry->AddInterface( 2778 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create),
2779 content::BrowserThread::GetTaskRunnerForThread(
2780 content::BrowserThread::UI));
2781 connection->GetInterfaceRegistry()->AddInterface(
2779 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create)); 2782 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create));
2780 2783
2781 #if defined(OS_CHROMEOS) 2784 #if defined(OS_CHROMEOS)
2782 registry->AddInterface<metrics::mojom::LeakDetector>( 2785 connection->GetInterfaceRegistry()->
2783 base::Bind(&metrics::LeakDetectorRemoteController::Create)); 2786 AddInterface<metrics::mojom::LeakDetector>(
2787 base::Bind(&metrics::LeakDetectorRemoteController::Create));
2784 #endif 2788 #endif
2785 } 2789 }
2786 2790
2787 void ChromeContentBrowserClient::ExposeInterfacesToMediaService( 2791 void ChromeContentBrowserClient::ExposeInterfacesToMediaService(
2788 shell::InterfaceRegistry* registry, 2792 shell::InterfaceRegistry* registry,
2789 content::RenderFrameHost* render_frame_host) { 2793 content::RenderFrameHost* render_frame_host) {
2790 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. 2794 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA.
2791 #if defined(OS_CHROMEOS) 2795 #if defined(OS_CHROMEOS)
2792 registry->AddInterface( 2796 registry->AddInterface(
2793 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, 2797 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create,
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
3057 if (channel <= kMaxDisableEncryptionChannel) { 3061 if (channel <= kMaxDisableEncryptionChannel) {
3058 static const char* const kWebRtcDevSwitchNames[] = { 3062 static const char* const kWebRtcDevSwitchNames[] = {
3059 switches::kDisableWebRtcEncryption, 3063 switches::kDisableWebRtcEncryption,
3060 }; 3064 };
3061 to_command_line->CopySwitchesFrom(from_command_line, 3065 to_command_line->CopySwitchesFrom(from_command_line,
3062 kWebRtcDevSwitchNames, 3066 kWebRtcDevSwitchNames,
3063 arraysize(kWebRtcDevSwitchNames)); 3067 arraysize(kWebRtcDevSwitchNames));
3064 } 3068 }
3065 } 3069 }
3066 #endif // defined(ENABLE_WEBRTC) 3070 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698