Index: ash/session_state_delegate.h |
diff --git a/ash/session_state_delegate.h b/ash/session_state_delegate.h |
index f0e7f22f42005c677abf234299ce8a4955a7c278..9aea5619c553ab0fe3b795730cf0d5c251cd99ab 100644 |
--- a/ash/session_state_delegate.h |
+++ b/ash/session_state_delegate.h |
@@ -45,6 +45,27 @@ class ASH_EXPORT SessionStateDelegate { |
CYCLE_TO_PREVIOUS_USER, // Cycle to the previous user. |
}; |
+ // Defines session state i.e. whether session is running or not and |
+ // whether user session is blocked by things like lock screen and |
+ // multi-profile login. |
+ enum SessionState { |
+ STATE_UNKNOWN = 0, |
Daniel Erat
2014/04/10 16:30:32
please don't add an "unknown" state; this means th
Nikita (slow)
2014/04/10 17:22:51
Done.
|
+ |
+ // When primary user login UI is shown i.e. after boot or sign out, |
+ // no active user session exists yet. |
+ STATE_LOGIN_PRIMARY, |
+ |
+ // Inside user session, no blocking UI (login/lock) is shown. |
+ STATE_SESSION, |
+ |
+ // User session is active, currently is locked. |
+ STATE_LOCK, |
stevenjb
2014/04/10 17:00:06
I'm not sure I understand this state. If this is s
Nikita (slow)
2014/04/10 17:22:51
Done.
|
+ |
+ // When secondary user login UI is shown i.e. other users are |
+ // already logged in and is currently adding another user to the session. |
+ STATE_LOGIN_SECONDARY, |
stevenjb
2014/04/10 17:00:06
While I hate to second guess a change in an area I
Nikita (slow)
2014/04/10 17:22:51
I've dropped STATE_LOCK for now.
I would prefer t
Nikita (slow)
2014/04/10 17:29:27
Since adding this logic to ShellObserver::OnLoginS
stevenjb
2014/04/10 17:47:55
I agree. That's another one where we conflate "Log
|
+ }; |
+ |
virtual ~SessionStateDelegate() {}; |
// Returns the browser context for the user given by |index|. |
@@ -89,6 +110,9 @@ class ASH_EXPORT SessionStateDelegate { |
// session. |
virtual bool IsUserSessionBlocked() const = 0; |
+ // Returns current session state. |
+ virtual SessionState GetSessionState() const = 0; |
+ |
// Gets the displayed name for the user with the given |index|. |
// Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. |
virtual const base::string16 GetUserDisplayName( |