| 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 11 matching lines...) Expand all Loading... |
| 22 class ServiceRegistry : public ServiceProvider, public ApplicationConnection { | 22 class ServiceRegistry : public ServiceProvider, public ApplicationConnection { |
| 23 public: | 23 public: |
| 24 ServiceRegistry(); | 24 ServiceRegistry(); |
| 25 ServiceRegistry(const ConnectionContext& connection_context, | 25 ServiceRegistry(const ConnectionContext& connection_context, |
| 26 InterfaceRequest<ServiceProvider> local_services); | 26 InterfaceRequest<ServiceProvider> local_services); |
| 27 ~ServiceRegistry() override; | 27 ~ServiceRegistry() override; |
| 28 | 28 |
| 29 // ApplicationConnection overrides. | 29 // ApplicationConnection overrides. |
| 30 void SetServiceConnectorForName(ServiceConnector* service_connector, | 30 void SetServiceConnectorForName(ServiceConnector* service_connector, |
| 31 const std::string& interface_name) override; | 31 const std::string& interface_name) override; |
| 32 const ConnectionContext& GetConnectionContext() const override; |
| 32 const std::string& GetConnectionURL() override; | 33 const std::string& GetConnectionURL() override; |
| 33 const std::string& GetRemoteApplicationURL() override; | 34 const std::string& GetRemoteApplicationURL() override; |
| 34 | 35 |
| 35 void RemoveServiceConnectorForName(const std::string& interface_name); | 36 void RemoveServiceConnectorForName(const std::string& interface_name); |
| 36 | 37 |
| 37 private: | 38 private: |
| 38 // ServiceProvider method. | 39 // ServiceProvider method. |
| 39 void ConnectToService(const String& service_name, | 40 void ConnectToService(const String& service_name, |
| 40 ScopedMessagePipeHandle client_handle) override; | 41 ScopedMessagePipeHandle client_handle) override; |
| 41 | 42 |
| 42 ConnectionContext connection_context_; | 43 ConnectionContext connection_context_; |
| 43 Binding<ServiceProvider> local_binding_; | 44 Binding<ServiceProvider> local_binding_; |
| 44 ServiceConnectorRegistry service_connector_registry_; | 45 ServiceConnectorRegistry service_connector_registry_; |
| 45 | 46 |
| 46 MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceRegistry); | 47 MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceRegistry); |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 } // namespace internal | 50 } // namespace internal |
| 50 } // namespace mojo | 51 } // namespace mojo |
| 51 | 52 |
| 52 #endif // MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ | 53 #endif // MOJO_PUBLIC_CPP_APPLICATION_LIB_SERVICE_REGISTRY_H_ |
| OLD | NEW |