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_SESSION_STATE_DELEGATE_H_ | 5 #ifndef ASH_SESSION_SESSION_STATE_DELEGATE_H_ |
6 #define ASH_SESSION_SESSION_STATE_DELEGATE_H_ | 6 #define ASH_SESSION_SESSION_STATE_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 | 58 |
59 // Inside user session (including lock screen), | 59 // Inside user session (including lock screen), |
60 // no login UI (primary or multi-profiles) is shown. | 60 // no login UI (primary or multi-profiles) is shown. |
61 SESSION_STATE_ACTIVE, | 61 SESSION_STATE_ACTIVE, |
62 | 62 |
63 // When secondary user login UI is shown i.e. other users are | 63 // When secondary user login UI is shown i.e. other users are |
64 // already logged in and is currently adding another user to the session. | 64 // already logged in and is currently adding another user to the session. |
65 SESSION_STATE_LOGIN_SECONDARY, | 65 SESSION_STATE_LOGIN_SECONDARY, |
66 }; | 66 }; |
67 | 67 |
68 enum PrimaryUserPolicy { | |
69 PRIMARY_USER_POLICY_ALLOW, | |
70 PRIMARY_USER_POLICY_FORBIDS, | |
71 PRIMARY_USER_POLICY_CERT_TAINTED, | |
72 }; | |
dzhioev (left Google)
2014/08/06 12:37:39
Why do we need PrimaryUserPolicy enum, if we don't
Roman Sorokin (ftl)
2014/08/08 09:22:00
Done.
| |
73 | |
68 virtual ~SessionStateDelegate() {}; | 74 virtual ~SessionStateDelegate() {}; |
69 | 75 |
70 // Returns the browser context for the user given by |index|. | 76 // Returns the browser context for the user given by |index|. |
71 virtual content::BrowserContext* GetBrowserContextByIndex( | 77 virtual content::BrowserContext* GetBrowserContextByIndex( |
72 MultiProfileIndex index) = 0; | 78 MultiProfileIndex index) = 0; |
73 | 79 |
74 // Returns the browser context associated with the window. | 80 // Returns the browser context associated with the window. |
75 virtual content::BrowserContext* GetBrowserContextForWindow( | 81 virtual content::BrowserContext* GetBrowserContextForWindow( |
76 aura::Window* window) = 0; | 82 aura::Window* window) = 0; |
77 | 83 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
127 virtual bool ShouldShowAvatar(aura::Window* window) const = 0; | 133 virtual bool ShouldShowAvatar(aura::Window* window) const = 0; |
128 | 134 |
129 // Switches to another active user with |user_id| | 135 // Switches to another active user with |user_id| |
130 // (if that user has already signed in). | 136 // (if that user has already signed in). |
131 virtual void SwitchActiveUser(const std::string& user_id) = 0; | 137 virtual void SwitchActiveUser(const std::string& user_id) = 0; |
132 | 138 |
133 // Switches the active user to the next or previous user, with the same | 139 // Switches the active user to the next or previous user, with the same |
134 // ordering as GetLoggedInUsers. | 140 // ordering as GetLoggedInUsers. |
135 virtual void CycleActiveUser(CycleUser cycle_user) = 0; | 141 virtual void CycleActiveUser(CycleUser cycle_user) = 0; |
136 | 142 |
143 // Returns primary user policy. | |
144 virtual PrimaryUserPolicy GetPrimaryUserPolicy() const = 0; | |
145 | |
137 // Adds or removes sessions state observer. | 146 // Adds or removes sessions state observer. |
138 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; | 147 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; |
139 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; | 148 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; |
140 }; | 149 }; |
141 | 150 |
142 } // namespace ash | 151 } // namespace ash |
143 | 152 |
144 #endif // ASH_SESSION_SESSION_STATE_DELEGATE_H_ | 153 #endif // ASH_SESSION_SESSION_STATE_DELEGATE_H_ |
OLD | NEW |