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

Side by Side Diff: chromeos/dbus/session_manager_client.h

Issue 2887363003: Read container_instance_id. (Closed)
Patch Set: git cl lint Created 3 years, 7 months 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
« no previous file with comments | « chromeos/dbus/fake_session_manager_client.cc ('k') | chromeos/dbus/session_manager_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // unlocked successfully (i.e. after NotifyLockScreenDismissed() has 65 // unlocked successfully (i.e. after NotifyLockScreenDismissed() has
66 // been called). 66 // been called).
67 virtual void ScreenIsUnlocked() {} 67 virtual void ScreenIsUnlocked() {}
68 68
69 // Called after EmitLoginPromptVisible is called. 69 // Called after EmitLoginPromptVisible is called.
70 virtual void EmitLoginPromptVisibleCalled() {} 70 virtual void EmitLoginPromptVisibleCalled() {}
71 71
72 // Called when the ARC instance is stopped after it had already started. 72 // Called when the ARC instance is stopped after it had already started.
73 // |clean| is true if the instance was stopped as a result of an explicit 73 // |clean| is true if the instance was stopped as a result of an explicit
74 // request, false if it died unexpectedly. 74 // request, false if it died unexpectedly.
75 virtual void ArcInstanceStopped(bool clean) {} 75 // |container_instance_id| is the identifier of the container instance.
76 // See details for StartArcInstance().
77 virtual void ArcInstanceStopped(bool clean,
78 const std::string& container_instance_id) {}
76 }; 79 };
77 80
78 // Interface for performing actions on behalf of the stub implementation. 81 // Interface for performing actions on behalf of the stub implementation.
79 class StubDelegate { 82 class StubDelegate {
80 public: 83 public:
81 virtual ~StubDelegate() {} 84 virtual ~StubDelegate() {}
82 85
83 // Locks the screen. Invoked by the stub when RequestLockScreen() is called. 86 // Locks the screen. Invoked by the stub when RequestLockScreen() is called.
84 // In the real implementation of SessionManagerClient::RequestLockScreen(), 87 // In the real implementation of SessionManagerClient::RequestLockScreen(),
85 // a lock request is forwarded to the session manager; in the stub, this is 88 // a lock request is forwarded to the session manager; in the stub, this is
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // blocks Android ACTION_BOOT_COMPLETED broadcast for 3rd party applications. 287 // blocks Android ACTION_BOOT_COMPLETED broadcast for 3rd party applications.
285 // Upon completion, invokes |callback| with the result. 288 // Upon completion, invokes |callback| with the result.
286 // Running ARC requires some amount of disk space. LOW_FREE_DISK_SPACE will 289 // Running ARC requires some amount of disk space. LOW_FREE_DISK_SPACE will
287 // be returned when there is not enough free disk space for ARC. 290 // be returned when there is not enough free disk space for ARC.
288 // UNKNOWN_ERROR is returned for any other errors. 291 // UNKNOWN_ERROR is returned for any other errors.
289 enum class StartArcInstanceResult { 292 enum class StartArcInstanceResult {
290 SUCCESS, 293 SUCCESS,
291 UNKNOWN_ERROR, 294 UNKNOWN_ERROR,
292 LOW_FREE_DISK_SPACE, 295 LOW_FREE_DISK_SPACE,
293 }; 296 };
294 using StartArcInstanceCallback = base::Callback<void(StartArcInstanceResult)>; 297 // In case of success, container_instance_id will be passed as its second
298 // param. The ID is passed to ArcInstanceStopped() to identify which instance
299 // is stopped.
300 using StartArcInstanceCallback =
301 base::Callback<void(StartArcInstanceResult, const std::string&)>;
hashimoto 2017/05/19 11:06:58 Could you add names of the arguments, like GetArcS
hidehiko 2017/05/19 12:36:49 Sure. Done.
295 virtual void StartArcInstance(const cryptohome::Identification& cryptohome_id, 302 virtual void StartArcInstance(const cryptohome::Identification& cryptohome_id,
296 bool disable_boot_completed_broadcast, 303 bool disable_boot_completed_broadcast,
297 bool enable_vendor_privileged, 304 bool enable_vendor_privileged,
298 const StartArcInstanceCallback& callback) = 0; 305 const StartArcInstanceCallback& callback) = 0;
299 306
300 // Asynchronously stops the ARC instance. Upon completion, invokes 307 // Asynchronously stops the ARC instance. Upon completion, invokes
301 // |callback| with the result; true on success, false on failure (either 308 // |callback| with the result; true on success, false on failure (either
302 // session manager failed to stop an instance or session manager can not be 309 // session manager failed to stop an instance or session manager can not be
303 // reached). 310 // reached).
304 virtual void StopArcInstance(const ArcCallback& callback) = 0; 311 virtual void StopArcInstance(const ArcCallback& callback) = 0;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // Create() should be used instead. 345 // Create() should be used instead.
339 SessionManagerClient(); 346 SessionManagerClient();
340 347
341 private: 348 private:
342 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); 349 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient);
343 }; 350 };
344 351
345 } // namespace chromeos 352 } // namespace chromeos
346 353
347 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ 354 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_session_manager_client.cc ('k') | chromeos/dbus/session_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698