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

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

Issue 2734193002: memory-infra: Finish moving to Mojo (2nd attempt) (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « chrome/browser/DEPS ('k') | components/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 #include "net/base/mime_util.h" 190 #include "net/base/mime_util.h"
191 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 191 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
192 #include "net/cookies/canonical_cookie.h" 192 #include "net/cookies/canonical_cookie.h"
193 #include "net/cookies/cookie_options.h" 193 #include "net/cookies/cookie_options.h"
194 #include "net/ssl/ssl_cert_request_info.h" 194 #include "net/ssl/ssl_cert_request_info.h"
195 #include "ppapi/features/features.h" 195 #include "ppapi/features/features.h"
196 #include "ppapi/host/ppapi_host.h" 196 #include "ppapi/host/ppapi_host.h"
197 #include "printing/features/features.h" 197 #include "printing/features/features.h"
198 #include "services/image_decoder/public/interfaces/constants.mojom.h" 198 #include "services/image_decoder/public/interfaces/constants.mojom.h"
199 #include "services/preferences/public/interfaces/preferences.mojom.h" 199 #include "services/preferences/public/interfaces/preferences.mojom.h"
200 #include "services/resource_coordinator/memory/coordinator/coordinator_impl.h"
200 #include "services/service_manager/public/cpp/interface_provider.h" 201 #include "services/service_manager/public/cpp/interface_provider.h"
201 #include "services/service_manager/public/cpp/interface_registry.h" 202 #include "services/service_manager/public/cpp/interface_registry.h"
202 #include "services/service_manager/public/cpp/service.h" 203 #include "services/service_manager/public/cpp/service.h"
203 #include "storage/browser/fileapi/external_mount_points.h" 204 #include "storage/browser/fileapi/external_mount_points.h"
204 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h" 205 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h"
205 #include "ui/base/l10n/l10n_util.h" 206 #include "ui/base/l10n/l10n_util.h"
206 #include "ui/base/resource/resource_bundle.h" 207 #include "ui/base/resource/resource_bundle.h"
207 #include "ui/resources/grit/ui_resources.h" 208 #include "ui/resources/grit/ui_resources.h"
208 #include "url/gurl.h" 209 #include "url/gurl.h"
209 #include "url/origin.h" 210 #include "url/origin.h"
(...skipping 2887 matching lines...) Expand 10 before | Expand all | Expand 10 after
3097 base::Unretained(ModuleDatabase::GetInstance())), 3098 base::Unretained(ModuleDatabase::GetInstance())),
3098 ui_task_runner); 3099 ui_task_runner);
3099 } 3100 }
3100 #endif 3101 #endif
3101 3102
3102 #if defined(OS_CHROMEOS) 3103 #if defined(OS_CHROMEOS)
3103 registry->AddInterface<metrics::mojom::LeakDetector>( 3104 registry->AddInterface<metrics::mojom::LeakDetector>(
3104 base::Bind(&metrics::LeakDetectorRemoteController::Create), 3105 base::Bind(&metrics::LeakDetectorRemoteController::Create),
3105 ui_task_runner); 3106 ui_task_runner);
3106 #endif 3107 #endif
3108
3109 registry->AddInterface(
3110 base::Bind(
3111 &memory_instrumentation::CoordinatorImpl::BindCoordinatorRequest,
3112 base::Unretained(
3113 memory_instrumentation::CoordinatorImpl::GetInstance())),
3114 ui_task_runner);
3107 } 3115 }
3108 3116
3109 void ChromeContentBrowserClient::ExposeInterfacesToMediaService( 3117 void ChromeContentBrowserClient::ExposeInterfacesToMediaService(
3110 service_manager::InterfaceRegistry* registry, 3118 service_manager::InterfaceRegistry* registry,
3111 content::RenderFrameHost* render_frame_host) { 3119 content::RenderFrameHost* render_frame_host) {
3112 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. 3120 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA.
3113 #if defined(OS_CHROMEOS) 3121 #if defined(OS_CHROMEOS)
3114 registry->AddInterface( 3122 registry->AddInterface(
3115 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, 3123 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create,
3116 render_frame_host)); 3124 render_frame_host));
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
3194 } 3202 }
3195 #endif 3203 #endif
3196 } 3204 }
3197 3205
3198 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess( 3206 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess(
3199 service_manager::InterfaceRegistry* registry, 3207 service_manager::InterfaceRegistry* registry,
3200 content::GpuProcessHost* render_process_host) { 3208 content::GpuProcessHost* render_process_host) {
3201 registry->AddInterface( 3209 registry->AddInterface(
3202 base::Bind(&metrics::CallStackProfileCollector::Create, 3210 base::Bind(&metrics::CallStackProfileCollector::Create,
3203 metrics::CallStackProfileParams::GPU_PROCESS)); 3211 metrics::CallStackProfileParams::GPU_PROCESS));
3212
3213 auto ui_task_runner = content::BrowserThread::GetTaskRunnerForThread(
3214 content::BrowserThread::UI);
3215 registry->AddInterface(
3216 base::Bind(
3217 &memory_instrumentation::CoordinatorImpl::BindCoordinatorRequest,
3218 base::Unretained(
3219 memory_instrumentation::CoordinatorImpl::GetInstance())),
3220 ui_task_runner);
3204 } 3221 }
3205 3222
3206 void ChromeContentBrowserClient::RegisterInProcessServices( 3223 void ChromeContentBrowserClient::RegisterInProcessServices(
3207 StaticServiceMap* services) { 3224 StaticServiceMap* services) {
3208 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) 3225 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
3209 content::ServiceInfo info; 3226 content::ServiceInfo info;
3210 info.factory = base::Bind(&media::CreateMediaService); 3227 info.factory = base::Bind(&media::CreateMediaService);
3211 services->insert(std::make_pair("media", info)); 3228 services->insert(std::make_pair("media", info));
3212 #endif 3229 #endif
3213 #if defined(OS_CHROMEOS) 3230 #if defined(OS_CHROMEOS)
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
3553 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3570 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3554 return variations::GetVariationParamValue( 3571 return variations::GetVariationParamValue(
3555 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3572 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3556 } 3573 }
3557 3574
3558 // static 3575 // static
3559 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3576 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3560 const storage::QuotaSettings* settings) { 3577 const storage::QuotaSettings* settings) {
3561 g_default_quota_settings = settings; 3578 g_default_quota_settings = settings;
3562 } 3579 }
OLDNEW
« no previous file with comments | « chrome/browser/DEPS ('k') | components/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698