| 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 SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_CONTEXT_H_ | 5 #ifndef SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_CONTEXT_H_ |
| 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_CONTEXT_H_ | 6 #define SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 private: | 105 private: |
| 106 using InterfaceRegistryMap = | 106 using InterfaceRegistryMap = |
| 107 std::map<InterfaceRegistry*, std::unique_ptr<InterfaceRegistry>>; | 107 std::map<InterfaceRegistry*, std::unique_ptr<InterfaceRegistry>>; |
| 108 | 108 |
| 109 // mojom::Service: | 109 // mojom::Service: |
| 110 void OnStart(const ServiceInfo& info, | 110 void OnStart(const ServiceInfo& info, |
| 111 const OnStartCallback& callback) override; | 111 const OnStartCallback& callback) override; |
| 112 void OnConnect(const ServiceInfo& source_info, | 112 void OnConnect(const ServiceInfo& source_info, |
| 113 mojom::InterfaceProviderRequest interfaces, | 113 mojom::InterfaceProviderRequest interfaces, |
| 114 const OnConnectCallback& callback) override; | 114 const OnConnectCallback& callback) override; |
| 115 void OnBindInterface( |
| 116 const ServiceInfo& source_info, |
| 117 const std::string& interface_name, |
| 118 mojo::ScopedMessagePipeHandle interface_pipe, |
| 119 const OnBindInterfaceCallback& callback) override; |
| 120 |
| 121 void CallOnConnect(const ServiceInfo& source_info, |
| 122 const InterfaceProviderSpec& source_spec, |
| 123 const InterfaceProviderSpec& target_spec, |
| 124 mojom::InterfaceProviderRequest request); |
| 115 | 125 |
| 116 void OnConnectionError(); | 126 void OnConnectionError(); |
| 117 void OnRegistryConnectionError(InterfaceRegistry* registry); | 127 void OnRegistryConnectionError(InterfaceRegistry* registry); |
| 118 void DestroyConnectionInterfaceRegistry(InterfaceRegistry* registry); | 128 void DestroyConnectionInterfaceRegistry(InterfaceRegistry* registry); |
| 119 | 129 |
| 120 // We track the lifetime of incoming connection registries as a convenience | 130 // We track the lifetime of incoming connection registries as a convenience |
| 121 // for the client. | 131 // for the client. |
| 122 InterfaceRegistryMap connection_interface_registries_; | 132 InterfaceRegistryMap connection_interface_registries_; |
| 123 | 133 |
| 124 // A pending Connector request which will eventually be passed to the Service | 134 // A pending Connector request which will eventually be passed to the Service |
| (...skipping 14 matching lines...) Expand all Loading... |
| 139 base::Closure connection_lost_closure_; | 149 base::Closure connection_lost_closure_; |
| 140 | 150 |
| 141 base::WeakPtrFactory<ServiceContext> weak_factory_; | 151 base::WeakPtrFactory<ServiceContext> weak_factory_; |
| 142 | 152 |
| 143 DISALLOW_COPY_AND_ASSIGN(ServiceContext); | 153 DISALLOW_COPY_AND_ASSIGN(ServiceContext); |
| 144 }; | 154 }; |
| 145 | 155 |
| 146 } // namespace service_manager | 156 } // namespace service_manager |
| 147 | 157 |
| 148 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_CONTEXT_H_ | 158 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_CONTEXT_H_ |
| OLD | NEW |