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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2099063002: Migrate RenderProcessHost, ChildThread to InterfaceRegistry/Provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 29ec66a21ddbc36ddf05f9f17e35e6c8d78fb311..f859866b27795aadc62590287556e4b35e4f7702 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1025,35 +1025,35 @@ void RenderProcessHostImpl::CreateMessageFilters() {
void RenderProcessHostImpl::RegisterMojoInterfaces() {
#if !defined(OS_ANDROID)
- mojo_application_host_->service_registry()->AddService(
+ GetInterfaceRegistry()->AddInterface(
base::Bind(&device::BatteryMonitorImpl::Create));
#endif
- mojo_application_host_->service_registry()->AddService(
+ GetInterfaceRegistry()->AddInterface(
base::Bind(&PermissionServiceContext::CreateService,
base::Unretained(permission_service_context_.get())));
// TODO(mcasas): finalize arguments.
- mojo_application_host_->service_registry()->AddService(
+ GetInterfaceRegistry()->AddInterface(
base::Bind(&ImageCaptureImpl::Create));
- mojo_application_host_->service_registry()->AddService(
+ GetInterfaceRegistry()->AddInterface(
base::Bind(&OffscreenCanvasSurfaceImpl::Create));
- mojo_application_host_->service_registry()->AddService(base::Bind(
+ GetInterfaceRegistry()->AddInterface(base::Bind(
&BackgroundSyncContext::CreateService,
base::Unretained(storage_partition_impl_->GetBackgroundSyncContext())));
- mojo_application_host_->service_registry()->AddService(base::Bind(
+ GetInterfaceRegistry()->AddInterface(base::Bind(
&PlatformNotificationContextImpl::CreateService,
base::Unretained(
storage_partition_impl_->GetPlatformNotificationContext()), GetID()));
- mojo_application_host_->service_registry()->AddService(
+ GetInterfaceRegistry()->AddInterface(
base::Bind(&RenderProcessHostImpl::CreateStoragePartitionService,
base::Unretained(this)));
- mojo_application_host_->service_registry()->AddService(
+ GetInterfaceRegistry()->AddInterface(
base::Bind(&MimeRegistryImpl::Create),
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
@@ -1062,8 +1062,8 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
mojo_application_host_->service_registry_android());
#endif
- GetContentClient()->browser()->RegisterRenderProcessMojoServices(
- mojo_application_host_->service_registry(), this);
+ GetContentClient()->browser()->ExposeInterfacesToRenderer(
+ mojo_application_host_->interface_registry(), this);
}
void RenderProcessHostImpl::CreateStoragePartitionService(
@@ -1088,9 +1088,14 @@ void RenderProcessHostImpl::NotifyTimezoneChange(const std::string& zone_id) {
Send(new ViewMsg_TimezoneChange(zone_id));
}
-ServiceRegistry* RenderProcessHostImpl::GetServiceRegistry() {
+shell::InterfaceRegistry* RenderProcessHostImpl::GetInterfaceRegistry() {
DCHECK(mojo_application_host_);
- return mojo_application_host_->service_registry();
+ return mojo_application_host_->interface_registry();
+}
+
+shell::InterfaceProvider* RenderProcessHostImpl::GetRemoteInterfaces() {
+ DCHECK(mojo_application_host_);
+ return mojo_application_host_->remote_interfaces();
}
shell::Connection* RenderProcessHostImpl::GetChildConnection() {
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.h ('k') | content/browser/service_worker/embedded_worker_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698