Chromium Code Reviews| 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..7a7c32d43c6e8f022c88cf09873ac694de19f93d 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,19 @@ 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)); |
| + // TODO(beng): null Connection. |
|
Ken Rockot(use gerrit already)
2016/06/21 16:16:23
What does this mean?
|
| + 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 |