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 |
11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 | 13 |
14 namespace aura { | 14 namespace aura { |
15 class Window; | 15 class Window; |
16 } // namespace aura | 16 } // namespace aura |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 class BrowserContext; | 19 class BrowserContext; |
20 } | 20 } |
21 | 21 |
22 namespace gfx { | 22 namespace gfx { |
23 class ImageSkia; | 23 class ImageSkia; |
24 } // namespace gfx | 24 } // namespace gfx |
25 | 25 |
| 26 namespace user_manager { |
| 27 class UserInfo; |
| 28 } // namespace user_manager |
| 29 |
26 namespace ash { | 30 namespace ash { |
27 | 31 |
28 class SessionStateObserver; | 32 class SessionStateObserver; |
29 class UserInfo; | |
30 | 33 |
31 // The index for the multi-profile item to use. The list is always LRU sorted | 34 // The index for the multi-profile item to use. The list is always LRU sorted |
32 // So that the index #0 is the currently active user. | 35 // So that the index #0 is the currently active user. |
33 typedef int MultiProfileIndex; | 36 typedef int MultiProfileIndex; |
34 | 37 |
35 // A list of user_id. | 38 // A list of user_id. |
36 typedef std::vector<std::string> UserIdList; | 39 typedef std::vector<std::string> UserIdList; |
37 | 40 |
38 // Delegate for checking and modifying the session state. | 41 // Delegate for checking and modifying the session state. |
39 // TODO(oshima): Replace MultiProfileIndex with BrowsreContext, bacause | 42 // TODO(oshima): Replace MultiProfileIndex with BrowsreContext, bacause |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // session. | 109 // session. |
107 virtual bool IsUserSessionBlocked() const = 0; | 110 virtual bool IsUserSessionBlocked() const = 0; |
108 | 111 |
109 // Returns current session state. | 112 // Returns current session state. |
110 virtual SessionState GetSessionState() const = 0; | 113 virtual SessionState GetSessionState() const = 0; |
111 | 114 |
112 // TODO(oshima): consolidate these two GetUserInfo. | 115 // TODO(oshima): consolidate these two GetUserInfo. |
113 | 116 |
114 // Gets the user info for the user with the given |index|. | 117 // Gets the user info for the user with the given |index|. |
115 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. | 118 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. |
116 virtual const UserInfo* GetUserInfo(MultiProfileIndex index) const = 0; | 119 virtual const user_manager::UserInfo* GetUserInfo( |
| 120 MultiProfileIndex index) const = 0; |
117 | 121 |
118 // Gets the avatar image for the user associated with the |context|. | 122 // Gets the avatar image for the user associated with the |context|. |
119 virtual const UserInfo* GetUserInfo( | 123 virtual const user_manager::UserInfo* GetUserInfo( |
120 content::BrowserContext* context) const = 0; | 124 content::BrowserContext* context) const = 0; |
121 | 125 |
122 // Whether or not the window's title should show the avatar. | 126 // Whether or not the window's title should show the avatar. |
123 virtual bool ShouldShowAvatar(aura::Window* window) const = 0; | 127 virtual bool ShouldShowAvatar(aura::Window* window) const = 0; |
124 | 128 |
125 // Switches to another active user with |user_id| | 129 // Switches to another active user with |user_id| |
126 // (if that user has already signed in). | 130 // (if that user has already signed in). |
127 virtual void SwitchActiveUser(const std::string& user_id) = 0; | 131 virtual void SwitchActiveUser(const std::string& user_id) = 0; |
128 | 132 |
129 // Switches the active user to the next or previous user, with the same | 133 // Switches the active user to the next or previous user, with the same |
130 // ordering as GetLoggedInUsers. | 134 // ordering as GetLoggedInUsers. |
131 virtual void CycleActiveUser(CycleUser cycle_user) = 0; | 135 virtual void CycleActiveUser(CycleUser cycle_user) = 0; |
132 | 136 |
133 // Adds or removes sessions state observer. | 137 // Adds or removes sessions state observer. |
134 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; | 138 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; |
135 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; | 139 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; |
136 }; | 140 }; |
137 | 141 |
138 } // namespace ash | 142 } // namespace ash |
139 | 143 |
140 #endif // ASH_SESSION_SESSION_STATE_DELEGATE_H_ | 144 #endif // ASH_SESSION_SESSION_STATE_DELEGATE_H_ |
OLD | NEW |