summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/session_manager_client.h
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-29 17:05:14 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-29 17:05:14 +0000
commit77894b4bd8771c77112a41e19d95094c09853229 (patch)
treeaecc02d1b91439d2a8cb29d5e987ce3704ca240c /chromeos/dbus/session_manager_client.h
parent2ef8a345d3a96ede613c10214b590fd9bc205b86 (diff)
downloadchromium_src-77894b4bd8771c77112a41e19d95094c09853229.zip
chromium_src-77894b4bd8771c77112a41e19d95094c09853229.tar.gz
chromium_src-77894b4bd8771c77112a41e19d95094c09853229.tar.bz2
chromeos: Support delaying suspend asynchronously.
This adds PowerManagerClient::GetSuspendReadinessCallback(), which PowerManagerClient::Observer implementations can call from within SuspendImminent(). The method returns a Closure that the observer can call after doing asynchronous work to report that it's ready for the system to be suspended. It also makes SessionManagerClient listen for ScreenIsLocked and ScreenIsUnlocked signals and removes an unused GetIsScreenLocked() method. BUG=171960,128798 Review URL: https://codereview.chromium.org/12095006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179350 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/session_manager_client.h')
-rw-r--r--chromeos/dbus/session_manager_client.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/chromeos/dbus/session_manager_client.h b/chromeos/dbus/session_manager_client.h
index d7b91d4..1aa9441 100644
--- a/chromeos/dbus/session_manager_client.h
+++ b/chromeos/dbus/session_manager_client.h
@@ -30,12 +30,24 @@ class CHROMEOS_EXPORT SessionManagerClient {
// Called when the property change is complete.
virtual void PropertyChangeComplete(bool success) {}
- // Called when the screen is locked.
+ // Called when the session manager requests that the lock screen be
+ // displayed. NotifyLockScreenShown() is called after the lock screen
+ // is shown (the canonical "is the screen locked?" state lives in the
+ // session manager).
virtual void LockScreen() {}
- // Called when the screen is unlocked.
+ // Called when the session manager requests that the lock screen be
+ // dismissed. NotifyLockScreenDismissed() is called afterward.
virtual void UnlockScreen() {}
+ // Called when the session manager announces that the screen has been locked
+ // successfully (i.e. after NotifyLockScreenShown() has been called).
+ virtual void ScreenIsLocked() {}
+
+ // Called when the session manager announces that the screen has been
+ // unlocked successfully (i.e. after NotifyLockScreenDismissed() has
+ // been called).
+ virtual void ScreenIsUnlocked() {}
};
// Adds and removes the observer.
@@ -77,11 +89,6 @@ class CHROMEOS_EXPORT SessionManagerClient {
// Notifies that the lock screen is dismissed.
virtual void NotifyLockScreenDismissed() = 0;
- // Returns whether or not the screen is locked. Implementation should cache
- // this state so that it can return immediately. Useful for observers that
- // need to know the current screen lock state when they are added.
- virtual bool GetIsScreenLocked() = 0;
-
// Used for RetrieveDevicePolicy, RetrieveUserPolicy and
// RetrieveDeviceLocalAccountPolicy. Takes a serialized protocol buffer as
// string. Upon success, we will pass a protobuf to the callback. On