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_SHELL_SERVICE_MANAGER_H_ | 5 #ifndef SERVICES_SHELL_SERVICE_MANAGER_H_ |
6 #define SERVICES_SHELL_SERVICE_MANAGER_H_ | 6 #define SERVICES_SHELL_SERVICE_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // If |service| is not null, there must not be an instance of the target | 102 // If |service| is not null, there must not be an instance of the target |
103 // application already running. The Service Manager will create a new instance | 103 // application already running. The Service Manager will create a new instance |
104 // and use |service| to control it. | 104 // and use |service| to control it. |
105 void Connect(std::unique_ptr<ConnectParams> params, | 105 void Connect(std::unique_ptr<ConnectParams> params, |
106 mojom::ServicePtr service); | 106 mojom::ServicePtr service); |
107 | 107 |
108 // Returns a running instance matching |identity|. This might be an instance | 108 // Returns a running instance matching |identity|. This might be an instance |
109 // running as a different user if one is available that services all users. | 109 // running as a different user if one is available that services all users. |
110 Instance* GetExistingInstance(const Identity& identity) const; | 110 Instance* GetExistingInstance(const Identity& identity) const; |
111 | 111 |
112 void NotifyPIDAvailable(uint32_t id, base::ProcessId pid); | 112 void NotifyPIDAvailable(const Identity& identity, base::ProcessId pid); |
113 | 113 |
114 // Attempt to complete the connection requested by |params| by connecting to | 114 // Attempt to complete the connection requested by |params| by connecting to |
115 // an existing instance. If there is an existing instance, |params| is taken, | 115 // an existing instance. If there is an existing instance, |params| is taken, |
116 // and this function returns true. | 116 // and this function returns true. |
117 bool ConnectToExistingInstance(std::unique_ptr<ConnectParams>* params); | 117 bool ConnectToExistingInstance(std::unique_ptr<ConnectParams>* params); |
118 | 118 |
119 Instance* CreateInstance(const Identity& source, | 119 Instance* CreateInstance(const Identity& source, |
120 const Identity& target, | 120 const Identity& target, |
121 const CapabilitySpec& spec); | 121 const CapabilitySpec& spec); |
122 | 122 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 base::WeakPtrFactory<ServiceManager> weak_ptr_factory_; | 158 base::WeakPtrFactory<ServiceManager> weak_ptr_factory_; |
159 | 159 |
160 DISALLOW_COPY_AND_ASSIGN(ServiceManager); | 160 DISALLOW_COPY_AND_ASSIGN(ServiceManager); |
161 }; | 161 }; |
162 | 162 |
163 mojom::Connector::ConnectCallback EmptyConnectCallback(); | 163 mojom::Connector::ConnectCallback EmptyConnectCallback(); |
164 | 164 |
165 } // namespace shell | 165 } // namespace shell |
166 | 166 |
167 #endif // SERVICES_SHELL_SERVICE_MANAGER_H_ | 167 #endif // SERVICES_SHELL_SERVICE_MANAGER_H_ |
OLD | NEW |