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_APPLICATION_SERVICE_PROVIDER_IMPL_H_ | 5 #ifndef MOJO_PUBLIC_APPLICATION_SERVICE_PROVIDER_IMPL_H_ |
6 #define MOJO_PUBLIC_APPLICATION_SERVICE_PROVIDER_IMPL_H_ | 6 #define MOJO_PUBLIC_APPLICATION_SERVICE_PROVIDER_IMPL_H_ |
7 | 7 |
8 #include "mojo/public/cpp/application/lib/service_connector.h" | 8 #include "mojo/public/cpp/application/lib/service_connector.h" |
9 #include "mojo/public/interfaces/application/service_provider.mojom.h" | 9 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 // This method must only be called once per ServiceProviderImpl. | 35 // This method must only be called once per ServiceProviderImpl. |
36 ServiceProvider* CreateRemoteServiceProvider(); | 36 ServiceProvider* CreateRemoteServiceProvider(); |
37 | 37 |
38 private: | 38 private: |
39 typedef std::map<std::string, internal::ServiceConnectorBase*> | 39 typedef std::map<std::string, internal::ServiceConnectorBase*> |
40 NameToServiceConnectorMap; | 40 NameToServiceConnectorMap; |
41 | 41 |
42 friend class internal::WeakServiceProvider; | 42 friend class internal::WeakServiceProvider; |
43 | 43 |
44 // Overridden from ServiceProvider: | 44 // Overridden from ServiceProvider: |
45 virtual void ConnectToService( | 45 virtual void ConnectToService(const String& service_name, |
46 const String& service_name, | 46 ScopedMessagePipeHandle client_handle) override; |
47 ScopedMessagePipeHandle client_handle) MOJO_OVERRIDE; | |
48 | 47 |
49 // Overridden from InterfaceImpl: | 48 // Overridden from InterfaceImpl: |
50 virtual void OnConnectionError() MOJO_OVERRIDE; | 49 virtual void OnConnectionError() override; |
51 | 50 |
52 void AddServiceConnector( | 51 void AddServiceConnector( |
53 internal::ServiceConnectorBase* service_connector); | 52 internal::ServiceConnectorBase* service_connector); |
54 void RemoveServiceConnector( | 53 void RemoveServiceConnector( |
55 internal::ServiceConnectorBase* service_connector); | 54 internal::ServiceConnectorBase* service_connector); |
56 | 55 |
57 void ClearRemote(); | 56 void ClearRemote(); |
58 | 57 |
59 NameToServiceConnectorMap service_connectors_; | 58 NameToServiceConnectorMap service_connectors_; |
60 | 59 |
61 internal::WeakServiceProvider* remote_; | 60 internal::WeakServiceProvider* remote_; |
62 | 61 |
63 MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceProviderImpl); | 62 MOJO_DISALLOW_COPY_AND_ASSIGN(ServiceProviderImpl); |
64 }; | 63 }; |
65 | 64 |
66 } // namespace mojo | 65 } // namespace mojo |
67 | 66 |
68 #endif // MOJO_PUBLIC_APPLICATION_SERVICE_PROVIDER_IMPL_H_ | 67 #endif // MOJO_PUBLIC_APPLICATION_SERVICE_PROVIDER_IMPL_H_ |
OLD | NEW |