OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ |
6 #define CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ | 6 #define CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 // Used for GetArcStartTime. Takes a boolean indicating whether the | 206 // Used for GetArcStartTime. Takes a boolean indicating whether the |
207 // operation was successful or not and the ticks of ARC start time if it | 207 // operation was successful or not and the ticks of ARC start time if it |
208 // is successful. | 208 // is successful. |
209 typedef base::Callback<void(bool success, base::TimeTicks ticks)> | 209 typedef base::Callback<void(bool success, base::TimeTicks ticks)> |
210 GetArcStartTimeCallback; | 210 GetArcStartTimeCallback; |
211 | 211 |
212 // Asynchronously checks if starting the ARC instance is available. | 212 // Asynchronously checks if starting the ARC instance is available. |
213 // The result of the operation is reported through |callback|. | 213 // The result of the operation is reported through |callback|. |
214 virtual void CheckArcAvailability(const ArcCallback& callback) = 0; | 214 virtual void CheckArcAvailability(const ArcCallback& callback) = 0; |
215 | 215 |
216 // Asynchronously starts the ARC instance using |socket_path| as the IPC | 216 // Asynchronously starts the ARC instance for the user whose cryptohome is |
217 // socket for communication with the instance. Upon completion, invokes | 217 // located by |cryptohome_id|. Upon completion, invokes |callback| with |
218 // |callback| with the result. | 218 // the result. |
219 virtual void StartArcInstance(const std::string& socket_path, | 219 virtual void StartArcInstance(const cryptohome::Identification& cryptohome_id, |
220 const ArcCallback& callback) = 0; | 220 const ArcCallback& callback) = 0; |
221 | 221 |
222 // Asynchronously stops the ARC instance. Upon completion, invokes | 222 // Asynchronously stops the ARC instance. Upon completion, invokes |
223 // |callback| with the result. | 223 // |callback| with the result. |
224 virtual void StopArcInstance(const ArcCallback& callback) = 0; | 224 virtual void StopArcInstance(const ArcCallback& callback) = 0; |
225 | 225 |
226 // Asynchronously retrieves the timestamp which ARC instance is invoked or | 226 // Asynchronously retrieves the timestamp which ARC instance is invoked or |
227 // returns false if there is no ARC instance or ARC is not available. | 227 // returns false if there is no ARC instance or ARC is not available. |
228 virtual void GetArcStartTime(const GetArcStartTimeCallback& callback) = 0; | 228 virtual void GetArcStartTime(const GetArcStartTimeCallback& callback) = 0; |
229 | 229 |
230 // Creates the instance. | 230 // Creates the instance. |
231 static SessionManagerClient* Create(DBusClientImplementationType type); | 231 static SessionManagerClient* Create(DBusClientImplementationType type); |
232 | 232 |
233 ~SessionManagerClient() override; | 233 ~SessionManagerClient() override; |
234 | 234 |
235 protected: | 235 protected: |
236 // Create() should be used instead. | 236 // Create() should be used instead. |
237 SessionManagerClient(); | 237 SessionManagerClient(); |
238 | 238 |
239 private: | 239 private: |
240 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); | 240 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); |
241 }; | 241 }; |
242 | 242 |
243 } // namespace chromeos | 243 } // namespace chromeos |
244 | 244 |
245 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ | 245 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ |
OLD | NEW |