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

Unified Diff: chromeos/dbus/session_manager_client.h

Issue 10693087: chromeos: Request screen lock directly from session manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/dbus/session_manager_client.h
diff --git a/chromeos/dbus/session_manager_client.h b/chromeos/dbus/session_manager_client.h
index 82382e3f61fa3aeaeb7debd3b56725b9d5e6c15c..aed121ee45c494fd420fb8803b75f5137d08cfeb 100644
--- a/chromeos/dbus/session_manager_client.h
+++ b/chromeos/dbus/session_manager_client.h
@@ -26,13 +26,22 @@ class CHROMEOS_EXPORT SessionManagerClient {
public:
// Called when the owner key is set.
virtual void OwnerKeySet(bool success) {}
+
// Called when the property change is complete.
virtual void PropertyChangeComplete(bool success) {}
+
+ // Called when the screen is locked.
+ virtual void LockScreen() {}
+
+ // Called when the screen is unlocked.
+ virtual void UnlockScreen() {}
+
};
// Adds and removes the observer.
virtual void AddObserver(Observer* observer) = 0;
virtual void RemoveObserver(Observer* observer) = 0;
+ virtual bool HasObserver(Observer* observer) = 0;
// Kicks off an attempt to emit the "login-prompt-ready" upstart signal.
virtual void EmitLoginPromptReady() = 0;
@@ -53,6 +62,17 @@ class CHROMEOS_EXPORT SessionManagerClient {
// Stops the current session.
virtual void StopSession() = 0;
+ // Locks the screen.
+ virtual void RequestLockScreen() = 0;
oshima 2012/07/06 17:31:12 will a lock request never fail?
Daniel Erat 2012/07/09 16:01:42 There's no way to report failure currently. This
+
+ // Unlocks the screen.
+ virtual void RequestUnlockScreen() = 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 and RetrieveUserPolicy. Takes a serialized
// protocol buffer as string. Upon success, we will pass a protobuf to the
// callback. On failure, we will pass "".

Powered by Google App Engine
This is Rietveld 408576698