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>2014-03-12 18:02:31 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-12 18:02:31 +0000
commit26ca33d393dbd3d3b8763d1659f906f52d2e0289 (patch)
treef9a88199f6fc35dfa3c981ed91d6a516dceaf7e3 /chromeos/dbus/session_manager_client.h
parentecdb463c565f27ea68b7e9dd71f6ddbdb65ced7a (diff)
downloadchromium_src-26ca33d393dbd3d3b8763d1659f906f52d2e0289.zip
chromium_src-26ca33d393dbd3d3b8763d1659f906f52d2e0289.tar.gz
chromium_src-26ca33d393dbd3d3b8763d1659f906f52d2e0289.tar.bz2
chromeos: Remove old LockScreen signal.
Remove code that listened for a LockScreen D-Bus signal, formerly emitted by the session manager to instruct Chrome to lock the screen. Chrome now exports a LockScreen method instead. BUG=341921 Review URL: https://codereview.chromium.org/167663004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256581 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/session_manager_client.h')
-rw-r--r--chromeos/dbus/session_manager_client.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/chromeos/dbus/session_manager_client.h b/chromeos/dbus/session_manager_client.h
index c803f2f..925ce5c 100644
--- a/chromeos/dbus/session_manager_client.h
+++ b/chromeos/dbus/session_manager_client.h
@@ -22,20 +22,14 @@ class CHROMEOS_EXPORT SessionManagerClient : public DBusClient {
// Interface for observing changes from the session manager.
class Observer {
public:
+ virtual ~Observer() {}
+
// 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 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).
- // TODO(derat): Delete this once the session manager is calling the
- // "LockScreen" method instead.
- virtual void LockScreen() {}
-
// Called when the session manager announces that the screen has been locked
// successfully (i.e. after NotifyLockScreenShown() has been called).
virtual void ScreenIsLocked() {}
@@ -49,6 +43,22 @@ class CHROMEOS_EXPORT SessionManagerClient : public DBusClient {
virtual void EmitLoginPromptVisibleCalled() {}
};
+ // Interface for performing actions on behalf of the stub implementation.
+ class StubDelegate {
+ public:
+ virtual ~StubDelegate() {}
+
+ // Locks the screen. Invoked by the stub when RequestLockScreen() is called.
+ // In the real implementation of SessionManagerClient::RequestLockScreen(),
+ // a lock request is forwarded to the session manager; in the stub, this is
+ // short-circuited and the screen is locked immediately.
+ virtual void LockScreenForStub() = 0;
+ };
+
+ // Sets the delegate used by the stub implementation. Ownership of |delegate|
+ // remains with the caller.
+ virtual void SetStubDelegate(StubDelegate* delegate) = 0;
+
// Adds and removes the observer.
virtual void AddObserver(Observer* observer) = 0;
virtual void RemoveObserver(Observer* observer) = 0;