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

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

Issue 2694083005: memory-infra: Finish moving memory_infra from TracingController (Closed)
Patch Set: style: auto must not deduce to raw pointer 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 2880 matching lines...) Expand 10 before | Expand all | Expand 10 after
3090 base::Unretained(ModuleDatabase::GetInstance())), 3091 base::Unretained(ModuleDatabase::GetInstance())),
3091 ui_task_runner); 3092 ui_task_runner);
3092 } 3093 }
3093 #endif 3094 #endif
3094 3095
3095 #if defined(OS_CHROMEOS) 3096 #if defined(OS_CHROMEOS)
3096 registry->AddInterface<metrics::mojom::LeakDetector>( 3097 registry->AddInterface<metrics::mojom::LeakDetector>(
3097 base::Bind(&metrics::LeakDetectorRemoteController::Create), 3098 base::Bind(&metrics::LeakDetectorRemoteController::Create),
3098 ui_task_runner); 3099 ui_task_runner);
3099 #endif 3100 #endif
3101
3102 registry->AddInterface(
3103 base::Bind(
3104 &memory_instrumentation::CoordinatorImpl::BindCoordinatorRequest,
3105 base::Unretained(memory_instrumentation::CoordinatorImpl::GetInstance(
3106 ui_task_runner))),
3107 ui_task_runner);
3100 } 3108 }
3101 3109
3102 void ChromeContentBrowserClient::ExposeInterfacesToMediaService( 3110 void ChromeContentBrowserClient::ExposeInterfacesToMediaService(
3103 service_manager::InterfaceRegistry* registry, 3111 service_manager::InterfaceRegistry* registry,
3104 content::RenderFrameHost* render_frame_host) { 3112 content::RenderFrameHost* render_frame_host) {
3105 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. 3113 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA.
3106 #if defined(OS_CHROMEOS) 3114 #if defined(OS_CHROMEOS)
3107 registry->AddInterface( 3115 registry->AddInterface(
3108 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, 3116 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create,
3109 render_frame_host)); 3117 render_frame_host));
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
3186 } 3194 }
3187 #endif 3195 #endif
3188 } 3196 }
3189 3197
3190 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess( 3198 void ChromeContentBrowserClient::ExposeInterfacesToGpuProcess(
3191 service_manager::InterfaceRegistry* registry, 3199 service_manager::InterfaceRegistry* registry,
3192 content::GpuProcessHost* render_process_host) { 3200 content::GpuProcessHost* render_process_host) {
3193 registry->AddInterface( 3201 registry->AddInterface(
3194 base::Bind(&metrics::CallStackProfileCollector::Create, 3202 base::Bind(&metrics::CallStackProfileCollector::Create,
3195 metrics::CallStackProfileParams::GPU_PROCESS)); 3203 metrics::CallStackProfileParams::GPU_PROCESS));
3204
3205 auto ui_task_runner = content::BrowserThread::GetTaskRunnerForThread(
3206 content::BrowserThread::UI);
3207 registry->AddInterface(
3208 base::Bind(
3209 &memory_instrumentation::CoordinatorImpl::BindCoordinatorRequest,
3210 base::Unretained(memory_instrumentation::CoordinatorImpl::GetInstance(
3211 ui_task_runner))),
3212 ui_task_runner);
3196 } 3213 }
3197 3214
3198 void ChromeContentBrowserClient::RegisterInProcessServices( 3215 void ChromeContentBrowserClient::RegisterInProcessServices(
3199 StaticServiceMap* services) { 3216 StaticServiceMap* services) {
3200 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS) 3217 #if defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
3201 content::ServiceInfo info; 3218 content::ServiceInfo info;
3202 info.factory = base::Bind(&media::CreateMediaService); 3219 info.factory = base::Bind(&media::CreateMediaService);
3203 services->insert(std::make_pair("media", info)); 3220 services->insert(std::make_pair("media", info));
3204 #endif 3221 #endif
3205 #if defined(OS_CHROMEOS) 3222 #if defined(OS_CHROMEOS)
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
3544 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3561 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3545 return variations::GetVariationParamValue( 3562 return variations::GetVariationParamValue(
3546 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3563 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3547 } 3564 }
3548 3565
3549 // static 3566 // static
3550 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3567 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3551 const storage::QuotaSettings* settings) { 3568 const storage::QuotaSettings* settings) {
3552 g_default_quota_settings = settings; 3569 g_default_quota_settings = settings;
3553 } 3570 }
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