| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 // Returns true if the screen is currently locked. | 50 // Returns true if the screen is currently locked. |
| 51 virtual bool IsScreenLocked() const = 0; | 51 virtual bool IsScreenLocked() const = 0; |
| 52 | 52 |
| 53 // Locks the screen. The locking happens asynchronously. | 53 // Locks the screen. The locking happens asynchronously. |
| 54 virtual void LockScreen() = 0; | 54 virtual void LockScreen() = 0; |
| 55 | 55 |
| 56 // Unlocks the screen. | 56 // Unlocks the screen. |
| 57 virtual void UnlockScreen() = 0; | 57 virtual void UnlockScreen() = 0; |
| 58 | 58 |
| 59 // Returns |true| if user session blocked by some overlying UI. It can be |
| 60 // login screen, lock screen or screen for adding users into multi-profile |
| 61 // session. |
| 62 virtual bool IsUserSessionBlocked() const = 0; |
| 63 |
| 59 // Gets the displayed name for the user with the given |index|. | 64 // Gets the displayed name for the user with the given |index|. |
| 60 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. | 65 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. |
| 61 virtual const base::string16 GetUserDisplayName( | 66 virtual const base::string16 GetUserDisplayName( |
| 62 MultiProfileIndex index) const = 0; | 67 MultiProfileIndex index) const = 0; |
| 63 | 68 |
| 64 // Gets the email address for the user with the given |index|. | 69 // Gets the email address for the user with the given |index|. |
| 65 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. | 70 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. |
| 66 virtual const std::string GetUserEmail(MultiProfileIndex index) const = 0; | 71 virtual const std::string GetUserEmail(MultiProfileIndex index) const = 0; |
| 67 | 72 |
| 68 // Gets the avatar image for the user with the given |index|. | 73 // Gets the avatar image for the user with the given |index|. |
| 69 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. | 74 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. |
| 70 virtual const gfx::ImageSkia& GetUserImage(MultiProfileIndex index) const = 0; | 75 virtual const gfx::ImageSkia& GetUserImage(MultiProfileIndex index) const = 0; |
| 71 | 76 |
| 72 // Returns a list of all logged in users. | 77 // Returns a list of all logged in users. |
| 73 virtual void GetLoggedInUsers(UserIdList* users) = 0; | 78 virtual void GetLoggedInUsers(UserIdList* users) = 0; |
| 74 | 79 |
| 75 // Switches to another active user (if that user has already signed in). | 80 // Switches to another active user (if that user has already signed in). |
| 76 virtual void SwitchActiveUser(const std::string& user_id) = 0; | 81 virtual void SwitchActiveUser(const std::string& user_id) = 0; |
| 77 | 82 |
| 78 // Adds or removes sessions state observer. | 83 // Adds or removes sessions state observer. |
| 79 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; | 84 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; |
| 80 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; | 85 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; |
| 81 }; | 86 }; |
| 82 | 87 |
| 83 } // namespace ash | 88 } // namespace ash |
| 84 | 89 |
| 85 #endif // ASH_SESSION_STATE_DELEGATE_H_ | 90 #endif // ASH_SESSION_STATE_DELEGATE_H_ |
| OLD | NEW |