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

Unified Diff: content/child/mojo/mojo_application.cc

Issue 2079943002: Change RenderFrame to use InterfaceRegistry et al. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2
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
« no previous file with comments | « content/child/mojo/mojo_application.h ('k') | content/child/permissions/permission_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/mojo/mojo_application.cc
diff --git a/content/child/mojo/mojo_application.cc b/content/child/mojo/mojo_application.cc
index ffa285f8e5cf1a24295fe41df906294702c6a1ca..a09352bd8bb35f4595005519a3764c00f478c184 100644
--- a/content/child/mojo/mojo_application.cc
+++ b/content/child/mojo/mojo_application.cc
@@ -19,6 +19,7 @@ MojoApplication::~MojoApplication() {
}
void MojoApplication::InitWithToken(const std::string& token) {
+ DCHECK(!interface_registry_.get());
mojo::ScopedMessagePipeHandle handle =
mojo::edk::CreateChildMessagePipe(token);
DCHECK(handle.is_valid());
@@ -27,12 +28,18 @@ void MojoApplication::InitWithToken(const std::string& token) {
application_setup.Bind(
mojo::InterfacePtrInfo<mojom::ApplicationSetup>(std::move(handle), 0u));
- shell::mojom::InterfaceProviderPtr services;
- shell::mojom::InterfaceProviderPtr exposed_services;
- service_registry_.Bind(GetProxy(&exposed_services));
+ interface_registry_.reset(new shell::InterfaceRegistry(nullptr));
+ shell::mojom::InterfaceProviderPtr exposed_interfaces;
+ interface_registry_->Bind(GetProxy(&exposed_interfaces));
+
+ shell::mojom::InterfaceProviderPtr remote_interfaces;
+ shell::mojom::InterfaceProviderRequest remote_interfaces_request =
+ GetProxy(&remote_interfaces);
+ remote_interfaces_.reset(
+ new shell::InterfaceProvider(std::move(remote_interfaces)));
application_setup->ExchangeInterfaceProviders(
- service_registry_.TakeRemoteRequest(),
- std::move(exposed_services));
+ std::move(remote_interfaces_request),
+ std::move(exposed_interfaces));
}
} // namespace content
« no previous file with comments | « content/child/mojo/mojo_application.h ('k') | content/child/permissions/permission_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698