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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
941 net::URLRequestContextGetter* context = | 941 net::URLRequestContextGetter* context = |
942 host->GetStoragePartition()->GetURLRequestContext(); | 942 host->GetStoragePartition()->GetURLRequestContext(); |
943 | 943 |
944 host->AddFilter(new ChromeRenderMessageFilter(id, profile)); | 944 host->AddFilter(new ChromeRenderMessageFilter(id, profile)); |
945 #if defined(ENABLE_EXTENSIONS) | 945 #if defined(ENABLE_EXTENSIONS) |
946 host->AddFilter(new cast::CastTransportHostFilter); | 946 host->AddFilter(new cast::CastTransportHostFilter); |
947 #endif | 947 #endif |
948 #if defined(ENABLE_PRINTING) | 948 #if defined(ENABLE_PRINTING) |
949 host->AddFilter(new printing::PrintingMessageFilter(id, profile)); | 949 host->AddFilter(new printing::PrintingMessageFilter(id, profile)); |
950 #endif | 950 #endif |
951 host->AddFilter(new SearchProviderInstallStateMessageFilter(id, profile)); | 951 auto* search_provider = new SearchProviderInstallStateMessageFilterAdapter( |
952 new SearchProviderInstallStateMessageFilter(id, profile)); | |
953 host->GetServiceRegistry()->AddService<mojom::SearchProviderInstallState>( | |
954 base::Bind(&SearchProviderInstallStateMessageFilter::Bind, | |
955 base::Unretained(search_provider->Get())), | |
956 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | |
957 host->SetUserData( | |
958 SearchProviderInstallStateMessageFilter::kRenderProcessHostKey, | |
959 search_provider); | |
952 #if defined(ENABLE_SPELLCHECK) | 960 #if defined(ENABLE_SPELLCHECK) |
953 host->AddFilter(new SpellCheckMessageFilter(id)); | 961 host->AddFilter(new SpellCheckMessageFilter(id)); |
954 #endif | 962 #endif |
955 #if defined(USE_BROWSER_SPELLCHECKER) | 963 #if defined(USE_BROWSER_SPELLCHECKER) |
956 host->AddFilter(new SpellCheckMessageFilterPlatform(id)); | 964 host->AddFilter(new SpellCheckMessageFilterPlatform(id)); |
957 #endif | 965 #endif |
958 host->AddFilter(new ChromeNetBenchmarkingMessageFilter(profile, context)); | 966 host->AddFilter(new ChromeNetBenchmarkingMessageFilter(profile, context)); |
959 host->AddFilter(new prerender::PrerenderMessageFilter(id, profile)); | 967 host->AddFilter(new prerender::PrerenderMessageFilter(id, profile)); |
960 host->AddFilter(new TtsMessageFilter(host->GetBrowserContext())); | 968 host->AddFilter(new TtsMessageFilter(host->GetBrowserContext())); |
961 #if defined(ENABLE_WEBRTC) | 969 #if defined(ENABLE_WEBRTC) |
(...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2715 | 2723 |
2716 return false; | 2724 return false; |
2717 } | 2725 } |
2718 #endif // defined(OS_WIN) | 2726 #endif // defined(OS_WIN) |
2719 | 2727 |
2720 void ChromeContentBrowserClient::RegisterRenderProcessMojoServices( | 2728 void ChromeContentBrowserClient::RegisterRenderProcessMojoServices( |
2721 content::ServiceRegistry* registry, | 2729 content::ServiceRegistry* registry, |
2722 content::RenderProcessHost* render_process_host) { | 2730 content::RenderProcessHost* render_process_host) { |
2723 registry->AddService( | 2731 registry->AddService( |
2724 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create)); | 2732 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create)); |
2733 registry->AddService( | |
2734 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create)); | |
Sam McNally
2016/06/20 01:27:11
Remove.
tibell
2016/06/20 03:19:55
Done.
| |
2725 } | 2735 } |
2726 | 2736 |
2727 void ChromeContentBrowserClient::RegisterFrameMojoShellServices( | 2737 void ChromeContentBrowserClient::RegisterFrameMojoShellServices( |
2728 content::ServiceRegistry* registry, | 2738 content::ServiceRegistry* registry, |
2729 content::RenderFrameHost* render_frame_host) { | 2739 content::RenderFrameHost* render_frame_host) { |
2730 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. | 2740 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. |
2731 #if defined(OS_CHROMEOS) | 2741 #if defined(OS_CHROMEOS) |
2732 registry->AddService( | 2742 registry->AddService( |
2733 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, | 2743 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, |
2734 render_frame_host)); | 2744 render_frame_host)); |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2959 if (channel <= kMaxDisableEncryptionChannel) { | 2969 if (channel <= kMaxDisableEncryptionChannel) { |
2960 static const char* const kWebRtcDevSwitchNames[] = { | 2970 static const char* const kWebRtcDevSwitchNames[] = { |
2961 switches::kDisableWebRtcEncryption, | 2971 switches::kDisableWebRtcEncryption, |
2962 }; | 2972 }; |
2963 to_command_line->CopySwitchesFrom(from_command_line, | 2973 to_command_line->CopySwitchesFrom(from_command_line, |
2964 kWebRtcDevSwitchNames, | 2974 kWebRtcDevSwitchNames, |
2965 arraysize(kWebRtcDevSwitchNames)); | 2975 arraysize(kWebRtcDevSwitchNames)); |
2966 } | 2976 } |
2967 } | 2977 } |
2968 #endif // defined(ENABLE_WEBRTC) | 2978 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |