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

Unified Diff: chromeos/dbus/session_manager_client.h

Issue 167663004: chromeos: Remove old LockScreen signal. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bleh Created 6 years, 9 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
« no previous file with comments | « chromeos/dbus/mock_session_manager_client.h ('k') | chromeos/dbus/session_manager_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/session_manager_client.h
diff --git a/chromeos/dbus/session_manager_client.h b/chromeos/dbus/session_manager_client.h
index c803f2f2ce08f101009d37b60f1e59acefe1f9d2..925ce5cfa171faf119fd6b13104655997d8ed650 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;
« no previous file with comments | « chromeos/dbus/mock_session_manager_client.h ('k') | chromeos/dbus/session_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698