OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_SESSION_STATE_DELEGATE_H_ | 5 #ifndef ASH_SESSION_STATE_DELEGATE_H_ |
6 #define ASH_SESSION_STATE_DELEGATE_H_ | 6 #define ASH_SESSION_STATE_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 // TODO(oshima): Replace MultiProfileIndex with BrowsreContext, bacause | 38 // TODO(oshima): Replace MultiProfileIndex with BrowsreContext, bacause |
39 // GetUserXXX are useful for non multi profile scenario in ash_shell. | 39 // GetUserXXX are useful for non multi profile scenario in ash_shell. |
40 class ASH_EXPORT SessionStateDelegate { | 40 class ASH_EXPORT SessionStateDelegate { |
41 public: | 41 public: |
42 // Defines the cycle direction for |CycleActiveUser|. | 42 // Defines the cycle direction for |CycleActiveUser|. |
43 enum CycleUser { | 43 enum CycleUser { |
44 CYCLE_TO_NEXT_USER = 0, // Cycle to the next user. | 44 CYCLE_TO_NEXT_USER = 0, // Cycle to the next user. |
45 CYCLE_TO_PREVIOUS_USER, // Cycle to the previous user. | 45 CYCLE_TO_PREVIOUS_USER, // Cycle to the previous user. |
46 }; | 46 }; |
47 | 47 |
| 48 // Defines session state i.e. whether session is running or not and |
| 49 // whether user session is blocked by things like lock screen and |
| 50 // multi-profile login. |
| 51 enum SessionState { |
| 52 STATE_UNKNOWN = 0, |
| 53 |
| 54 // When primary user login UI is shown i.e. after boot or sign out, |
| 55 // no active user session exists yet. |
| 56 STATE_LOGIN_PRIMARY, |
| 57 |
| 58 // Inside user session, no blocking UI (login/lock) is shown. |
| 59 STATE_SESSION, |
| 60 |
| 61 // User session is active, currently is locked. |
| 62 STATE_LOCK, |
| 63 |
| 64 // When secondary user login UI is shown i.e. other users are |
| 65 // already logged in and is currently adding another user to the session. |
| 66 STATE_LOGIN_SECONDARY, |
| 67 }; |
| 68 |
48 virtual ~SessionStateDelegate() {}; | 69 virtual ~SessionStateDelegate() {}; |
49 | 70 |
50 // Returns the browser context for the user given by |index|. | 71 // Returns the browser context for the user given by |index|. |
51 virtual content::BrowserContext* GetBrowserContextByIndex( | 72 virtual content::BrowserContext* GetBrowserContextByIndex( |
52 MultiProfileIndex index) = 0; | 73 MultiProfileIndex index) = 0; |
53 | 74 |
54 // Returns the browser context associated with the window. | 75 // Returns the browser context associated with the window. |
55 virtual content::BrowserContext* GetBrowserContextForWindow( | 76 virtual content::BrowserContext* GetBrowserContextForWindow( |
56 aura::Window* window) = 0; | 77 aura::Window* window) = 0; |
57 | 78 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 virtual void CycleActiveUser(CycleUser cycle_user) = 0; | 142 virtual void CycleActiveUser(CycleUser cycle_user) = 0; |
122 | 143 |
123 // Adds or removes sessions state observer. | 144 // Adds or removes sessions state observer. |
124 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; | 145 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; |
125 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; | 146 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; |
126 }; | 147 }; |
127 | 148 |
128 } // namespace ash | 149 } // namespace ash |
129 | 150 |
130 #endif // ASH_SESSION_STATE_DELEGATE_H_ | 151 #endif // ASH_SESSION_STATE_DELEGATE_H_ |
OLD | NEW |