| 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 #ifndef MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ | 5 #ifndef MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ |
| 6 #define MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ | 6 #define MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "mojo/public/cpp/application/application_connection.h" | 10 #include "mojo/public/cpp/application/application_connection.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 const std::string& remote_url, | 30 const std::string& remote_url, |
| 31 InterfaceHandle<ServiceProvider> remote_services, | 31 InterfaceHandle<ServiceProvider> remote_services, |
| 32 InterfaceRequest<ServiceProvider> local_services); | 32 InterfaceRequest<ServiceProvider> local_services); |
| 33 ~ServiceRegistry() override; | 33 ~ServiceRegistry() override; |
| 34 | 34 |
| 35 // ApplicationConnection overrides. | 35 // ApplicationConnection overrides. |
| 36 void SetServiceConnectorForName(ServiceConnector* service_connector, | 36 void SetServiceConnectorForName(ServiceConnector* service_connector, |
| 37 const std::string& interface_name) override; | 37 const std::string& interface_name) override; |
| 38 const std::string& GetConnectionURL() override; | 38 const std::string& GetConnectionURL() override; |
| 39 const std::string& GetRemoteApplicationURL() override; | 39 const std::string& GetRemoteApplicationURL() override; |
| 40 ServiceProvider* GetServiceProvider() override; | |
| 41 | 40 |
| 42 void RemoveServiceConnectorForName(const std::string& interface_name); | 41 void RemoveServiceConnectorForName(const std::string& interface_name); |
| 43 | 42 |
| 44 private: | 43 private: |
| 45 // ServiceProvider method. | 44 // ServiceProvider method. |
| 46 void ConnectToService(const mojo::String& service_name, | 45 void ConnectToService(const mojo::String& service_name, |
| 47 ScopedMessagePipeHandle client_handle) override; | 46 ScopedMessagePipeHandle client_handle) override; |
| 48 | 47 |
| 49 ApplicationImpl* application_impl_; | 48 ApplicationImpl* application_impl_; |
| 50 const std::string connection_url_; | 49 const std::string connection_url_; |
| 51 const std::string remote_url_; | 50 const std::string remote_url_; |
| 52 | 51 |
| 53 private: | 52 private: |
| 54 void RemoveServiceConnectorForNameInternal(const std::string& interface_name); | 53 void RemoveServiceConnectorForNameInternal(const std::string& interface_name); |
| 55 | 54 |
| 56 Application* application_; | 55 Application* application_; |
| 57 Binding<ServiceProvider> local_binding_; | 56 Binding<ServiceProvider> local_binding_; |
| 58 ServiceProviderPtr remote_service_provider_; | 57 ServiceProviderPtr remote_service_provider_; |
| 59 ServiceConnectorRegistry service_connector_registry_; | 58 ServiceConnectorRegistry service_connector_registry_; |
| 60 | 59 |
| 61 MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceRegistry); | 60 MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceRegistry); |
| 62 }; | 61 }; |
| 63 | 62 |
| 64 } // namespace internal | 63 } // namespace internal |
| 65 } // namespace mojo | 64 } // namespace mojo |
| 66 | 65 |
| 67 #endif // MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ | 66 #endif // MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ |
| OLD | NEW |