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 |
|
hashimoto
2016/10/06 08:12:20
Please make it clear that what you get is an error
hidehiko
2016/10/06 08:33:21
Done.
| |
| 237 // argument of the callback. The error may be empty even on failure, if the | |
| 238 // reponse is not received at all. | |
| 239 // TODO(hidehiko): Replace "typedef" by "using". | |
| 240 typedef base::Callback<void(bool, const std::string&)> | |
|
hashimoto
2016/10/06 08:12:20
Like GetArcStartTimeCallback, please give names to
hidehiko
2016/10/06 08:33:21
Done.
| |
| 241 StartArcInstanceCallback; | |
| 237 virtual void StartArcInstance(const cryptohome::Identification& cryptohome_id, | 242 virtual void StartArcInstance(const cryptohome::Identification& cryptohome_id, |
| 238 bool disable_boot_completed_broadcast, | 243 bool disable_boot_completed_broadcast, |
| 239 const ArcCallback& callback) = 0; | 244 const StartArcInstanceCallback& callback) = 0; |
| 240 | 245 |
| 241 // Asynchronously stops the ARC instance. Upon completion, invokes | 246 // Asynchronously stops the ARC instance. Upon completion, invokes |
| 242 // |callback| with the result; true on success, false on failure (either | 247 // |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 | 248 // session manager failed to stop an instance or session manager can not be |
| 244 // reached). | 249 // reached). |
| 245 virtual void StopArcInstance(const ArcCallback& callback) = 0; | 250 virtual void StopArcInstance(const ArcCallback& callback) = 0; |
| 246 | 251 |
| 247 // Prioritizes the ARC instance by removing cgroups restrictions that | 252 // Prioritizes the ARC instance by removing cgroups restrictions that |
| 248 // session_manager applies to the instance by default. Upon completion, | 253 // session_manager applies to the instance by default. Upon completion, |
| 249 // invokes |callback| with the result; true on success, false on failure. | 254 // invokes |callback| with the result; true on success, false on failure. |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 274 // Create() should be used instead. | 279 // Create() should be used instead. |
| 275 SessionManagerClient(); | 280 SessionManagerClient(); |
| 276 | 281 |
| 277 private: | 282 private: |
| 278 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); | 283 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); |
| 279 }; | 284 }; |
| 280 | 285 |
| 281 } // namespace chromeos | 286 } // namespace chromeos |
| 282 | 287 |
| 283 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ | 288 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ |
| OLD | NEW |