Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: services/service_manager/service_manager.h

Issue 2440903002: Make "all user" services work when packaged. (Closed)
Patch Set: Addressed latest comments and synced. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_SERVICE_MANAGER_H_ 5 #ifndef SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_
6 #define SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_ 6 #define SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // bounded by that of |instance|. The connection will be cancelled dropped if 115 // bounded by that of |instance|. The connection will be cancelled dropped if
116 // |instance| is destroyed. 116 // |instance| is destroyed.
117 void Connect(std::unique_ptr<ConnectParams> params, 117 void Connect(std::unique_ptr<ConnectParams> params,
118 mojom::ServicePtr service, 118 mojom::ServicePtr service,
119 base::WeakPtr<Instance> source_instance); 119 base::WeakPtr<Instance> source_instance);
120 120
121 // Returns a running instance matching |identity|. This might be an instance 121 // Returns a running instance matching |identity|. This might be an instance
122 // running as a different user if one is available that services all users. 122 // running as a different user if one is available that services all users.
123 Instance* GetExistingInstance(const Identity& identity) const; 123 Instance* GetExistingInstance(const Identity& identity) const;
124 124
125 void NotifyPIDAvailable(const Identity& identity, base::ProcessId pid); 125 void NotifyServiceStarted(const Identity& identity, base::ProcessId pid);
126 void NotifyServiceFailedToStart(const Identity& identity);
126 127
127 // Attempt to complete the connection requested by |params| by connecting to 128 // Attempt to complete the connection requested by |params| by connecting to
128 // an existing instance. If there is an existing instance, |params| is taken, 129 // an existing instance. If there is an existing instance, |params| is taken,
129 // and this function returns true. 130 // and this function returns true.
130 bool ConnectToExistingInstance(std::unique_ptr<ConnectParams>* params); 131 bool ConnectToExistingInstance(std::unique_ptr<ConnectParams>* params);
131 132
132 Instance* CreateInstance(const Identity& source, 133 Instance* CreateInstance(const Identity& source,
133 const Identity& target, 134 const Identity& target,
134 const InterfaceProviderSpecMap& specs); 135 const InterfaceProviderSpecMap& specs);
135 136
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 base::WeakPtrFactory<ServiceManager> weak_ptr_factory_; 187 base::WeakPtrFactory<ServiceManager> weak_ptr_factory_;
187 188
188 DISALLOW_COPY_AND_ASSIGN(ServiceManager); 189 DISALLOW_COPY_AND_ASSIGN(ServiceManager);
189 }; 190 };
190 191
191 mojom::Connector::ConnectCallback EmptyConnectCallback(); 192 mojom::Connector::ConnectCallback EmptyConnectCallback();
192 193
193 } // namespace service_manager 194 } // namespace service_manager
194 195
195 #endif // SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_ 196 #endif // SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_H_
OLDNEW
« no previous file with comments | « services/service_manager/public/interfaces/service_manager.mojom ('k') | services/service_manager/service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698