| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/mojo/mojo_application_host.h" | 5 #include "content/browser/mojo/mojo_application_host.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 #include "content/common/mojo/mojo_messages.h" | 10 #include "content/common/mojo/mojo_messages.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 ApplicationSetupImpl(ServiceRegistryImpl* service_registry, | 29 ApplicationSetupImpl(ServiceRegistryImpl* service_registry, |
| 30 mojo::InterfaceRequest<ApplicationSetup> request) | 30 mojo::InterfaceRequest<ApplicationSetup> request) |
| 31 : binding_(this, std::move(request)), | 31 : binding_(this, std::move(request)), |
| 32 service_registry_(service_registry) {} | 32 service_registry_(service_registry) {} |
| 33 | 33 |
| 34 ~ApplicationSetupImpl() override { | 34 ~ApplicationSetupImpl() override { |
| 35 } | 35 } |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 // ApplicationSetup implementation. | 38 // ApplicationSetup implementation. |
| 39 void ExchangeServiceProviders( | 39 void ExchangeInterfaceProviders( |
| 40 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 40 mojo::InterfaceRequest<mojo::InterfaceProvider> services, |
| 41 mojo::ServiceProviderPtr exposed_services) override { | 41 mojo::InterfaceProviderPtr exposed_services) override { |
| 42 service_registry_->Bind(std::move(services)); | 42 service_registry_->Bind(std::move(services)); |
| 43 service_registry_->BindRemoteServiceProvider(std::move(exposed_services)); | 43 service_registry_->BindRemoteServiceProvider(std::move(exposed_services)); |
| 44 } | 44 } |
| 45 | 45 |
| 46 mojo::Binding<ApplicationSetup> binding_; | 46 mojo::Binding<ApplicationSetup> binding_; |
| 47 ServiceRegistryImpl* service_registry_; | 47 ServiceRegistryImpl* service_registry_; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace | 50 } // namespace |
| 51 | 51 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 void MojoApplicationHost::OnMessagePipeCreated( | 109 void MojoApplicationHost::OnMessagePipeCreated( |
| 110 mojo::ScopedMessagePipeHandle pipe) { | 110 mojo::ScopedMessagePipeHandle pipe) { |
| 111 DCHECK(pipe.is_valid()); | 111 DCHECK(pipe.is_valid()); |
| 112 application_setup_.reset(new ApplicationSetupImpl( | 112 application_setup_.reset(new ApplicationSetupImpl( |
| 113 &service_registry_, | 113 &service_registry_, |
| 114 mojo::MakeRequest<ApplicationSetup>(std::move(pipe)))); | 114 mojo::MakeRequest<ApplicationSetup>(std::move(pipe)))); |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace content | 117 } // namespace content |
| OLD | NEW |