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); | |
125 | 115 |
126 void OnConnectionError(); | 116 void OnConnectionError(); |
127 void OnRegistryConnectionError(InterfaceRegistry* registry); | 117 void OnRegistryConnectionError(InterfaceRegistry* registry); |
128 void DestroyConnectionInterfaceRegistry(InterfaceRegistry* registry); | 118 void DestroyConnectionInterfaceRegistry(InterfaceRegistry* registry); |
129 | 119 |
130 // We track the lifetime of incoming connection registries as a convenience | 120 // We track the lifetime of incoming connection registries as a convenience |
131 // for the client. | 121 // for the client. |
132 InterfaceRegistryMap connection_interface_registries_; | 122 InterfaceRegistryMap connection_interface_registries_; |
133 | 123 |
134 // A pending Connector request which will eventually be passed to the Service | 124 // A pending Connector request which will eventually be passed to the Service |
(...skipping 14 matching lines...) Expand all Loading... |
149 base::Closure connection_lost_closure_; | 139 base::Closure connection_lost_closure_; |
150 | 140 |
151 base::WeakPtrFactory<ServiceContext> weak_factory_; | 141 base::WeakPtrFactory<ServiceContext> weak_factory_; |
152 | 142 |
153 DISALLOW_COPY_AND_ASSIGN(ServiceContext); | 143 DISALLOW_COPY_AND_ASSIGN(ServiceContext); |
154 }; | 144 }; |
155 | 145 |
156 } // namespace service_manager | 146 } // namespace service_manager |
157 | 147 |
158 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_CONTEXT_H_ | 148 #endif // SERVICES_SERVICE_MANAGER_PUBLIC_CPP_SERVICE_CONTEXT_H_ |
OLD | NEW |