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

Unified Diff: ash/session_state_delegate.h

Issue 231123002: Notify about major session changes events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 6 years, 8 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 | « no previous file | ash/session_state_delegate_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/session_state_delegate.h
diff --git a/ash/session_state_delegate.h b/ash/session_state_delegate.h
index f0e7f22f42005c677abf234299ce8a4955a7c278..4f8f1164833c8a91720988ff4740541346247321 100644
--- a/ash/session_state_delegate.h
+++ b/ash/session_state_delegate.h
@@ -45,6 +45,21 @@ 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 multi-profile login.
+ enum SessionState {
+ // When primary user login UI is shown i.e. after boot or sign out,
+ // no active user session exists yet.
+ STATE_LOGIN_PRIMARY = 0,
stevenjb 2014/04/10 17:47:55 I'd still like to name these SESSION_STATE_*
Nikita (slow) 2014/04/11 08:58:41 Done.
+
+ // Inside user session, no blocking UI (login/lock) is shown.
+ STATE_SESSION,
stevenjb 2014/04/10 17:47:55 Maybe SESSION_STATE_ACTIVE?
Nikita (slow) 2014/04/11 08:58:41 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,
+ };
+
virtual ~SessionStateDelegate() {};
// Returns the browser context for the user given by |index|.
@@ -89,6 +104,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(
« no previous file with comments | « no previous file | ash/session_state_delegate_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698