Chromium Code Reviews| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 // Asynchronously checks if starting the ARC instance is available. | 226 // Asynchronously checks if starting the ARC instance is available. |
| 227 // The result of the operation is reported through |callback|. | 227 // The result of the operation is reported through |callback|. |
| 228 // If the operation fails, it is reported as unavailable. | 228 // If the operation fails, it is reported as unavailable. |
| 229 virtual void CheckArcAvailability(const ArcCallback& callback) = 0; | 229 virtual void CheckArcAvailability(const ArcCallback& callback) = 0; |
| 230 | 230 |
| 231 // Asynchronously starts the ARC instance for the user whose cryptohome is | 231 // Asynchronously starts the ARC instance for the user whose cryptohome is |
| 232 // located by |cryptohome_id|. Flag |disable_boot_completed_broadcast| | 232 // located by |cryptohome_id|. Flag |disable_boot_completed_broadcast| |
| 233 // blocks Android ACTION_BOOT_COMPLETED broadcast for 3rd party applications. | 233 // blocks Android ACTION_BOOT_COMPLETED broadcast for 3rd party applications. |
| 234 // Upon completion, invokes |callback| with the result; true on success, false | 234 // Upon completion, invokes |callback| with the result; true on success, false |
| 235 // on failure (either session manager failed to start an instance or session | 235 // on failure (either session manager failed to start an instance or session |
| 236 // manager can not be reached). | 236 // manager can not be reached). On Failure, the error is passed to the second |
| 237 // argument of the callback. The error may be empty even on failure, if the | |
| 238 // reponse is not received at all. The error looks like, e.g., | |
| 239 // "org.freedesktop.DBus.Error.ServiceUnknown". | |
| 240 // TODO(hidehiko): Replace "typedef" by "using". | |
| 241 typedef base::Callback<void(bool is_succeeded, const std::string& error)> | |
|
hashimoto
2016/10/06 08:36:59
nit: "bool success" would be more consistent with
hidehiko
2016/10/06 08:40:22
Ah, right. Done.
| |
| 242 StartArcInstanceCallback; | |
| 237 virtual void StartArcInstance(const cryptohome::Identification& cryptohome_id, | 243 virtual void StartArcInstance(const cryptohome::Identification& cryptohome_id, |
| 238 bool disable_boot_completed_broadcast, | 244 bool disable_boot_completed_broadcast, |
| 239 const ArcCallback& callback) = 0; | 245 const StartArcInstanceCallback& callback) = 0; |
| 240 | 246 |
| 241 // Asynchronously stops the ARC instance. Upon completion, invokes | 247 // Asynchronously stops the ARC instance. Upon completion, invokes |
| 242 // |callback| with the result; true on success, false on failure (either | 248 // |callback| with the result; true on success, false on failure (either |
| 243 // session manager failed to stop an instance or session manager can not be | 249 // session manager failed to stop an instance or session manager can not be |
| 244 // reached). | 250 // reached). |
| 245 virtual void StopArcInstance(const ArcCallback& callback) = 0; | 251 virtual void StopArcInstance(const ArcCallback& callback) = 0; |
| 246 | 252 |
| 247 // Prioritizes the ARC instance by removing cgroups restrictions that | 253 // Prioritizes the ARC instance by removing cgroups restrictions that |
| 248 // session_manager applies to the instance by default. Upon completion, | 254 // session_manager applies to the instance by default. Upon completion, |
| 249 // invokes |callback| with the result; true on success, false on failure. | 255 // invokes |callback| with the result; true on success, false on failure. |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 274 // Create() should be used instead. | 280 // Create() should be used instead. |
| 275 SessionManagerClient(); | 281 SessionManagerClient(); |
| 276 | 282 |
| 277 private: | 283 private: |
| 278 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); | 284 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); |
| 279 }; | 285 }; |
| 280 | 286 |
| 281 } // namespace chromeos | 287 } // namespace chromeos |
| 282 | 288 |
| 283 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ | 289 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ |
| OLD | NEW |