| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 | 9 |
| 10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 11 #include "ash/session/session_types.h" | 11 #include "ash/session/session_types.h" |
| 12 | 12 |
| 13 class AccountId; |
| 14 |
| 13 namespace aura { | 15 namespace aura { |
| 14 class Window; | 16 class Window; |
| 15 } | 17 } |
| 16 | 18 |
| 17 namespace gfx { | 19 namespace gfx { |
| 18 class ImageSkia; | 20 class ImageSkia; |
| 19 } | 21 } |
| 20 | 22 |
| 21 namespace user_manager { | 23 namespace user_manager { |
| 22 class UserInfo; | 24 class UserInfo; |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. | 108 // Note that |index| can at maximum be |NumberOfLoggedInUsers() - 1|. |
| 107 virtual const user_manager::UserInfo* GetUserInfo(UserIndex index) const = 0; | 109 virtual const user_manager::UserInfo* GetUserInfo(UserIndex index) const = 0; |
| 108 | 110 |
| 109 // Whether or not the window's title should show the avatar. | 111 // Whether or not the window's title should show the avatar. |
| 110 virtual bool ShouldShowAvatar(aura::Window* window) const = 0; | 112 virtual bool ShouldShowAvatar(aura::Window* window) const = 0; |
| 111 | 113 |
| 112 // Returns the avatar image for the specified window. | 114 // Returns the avatar image for the specified window. |
| 113 virtual gfx::ImageSkia GetAvatarImageForWindow( | 115 virtual gfx::ImageSkia GetAvatarImageForWindow( |
| 114 aura::Window* window) const = 0; | 116 aura::Window* window) const = 0; |
| 115 | 117 |
| 116 // Switches to another active user with |user_id| | 118 // Switches to another active user with |account_id| |
| 117 // (if that user has already signed in). | 119 // (if that user has already signed in). |
| 118 virtual void SwitchActiveUser(const std::string& user_id) = 0; | 120 virtual void SwitchActiveUser(const AccountId& account_id) = 0; |
| 119 | 121 |
| 120 // Switches the active user to the next or previous user, with the same | 122 // Switches the active user to the next or previous user, with the same |
| 121 // ordering as GetLoggedInUsers. | 123 // ordering as GetLoggedInUsers. |
| 122 virtual void CycleActiveUser(CycleUser cycle_user) = 0; | 124 virtual void CycleActiveUser(CycleUser cycle_user) = 0; |
| 123 | 125 |
| 124 // Returns true if primary user policy does not forbid multiple signin. | 126 // Returns true if primary user policy does not forbid multiple signin. |
| 125 virtual bool IsMultiProfileAllowedByPrimaryUserPolicy() const = 0; | 127 virtual bool IsMultiProfileAllowedByPrimaryUserPolicy() const = 0; |
| 126 | 128 |
| 127 // Adds or removes sessions state observer. | 129 // Adds or removes sessions state observer. |
| 128 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; | 130 virtual void AddSessionStateObserver(SessionStateObserver* observer) = 0; |
| 129 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; | 131 virtual void RemoveSessionStateObserver(SessionStateObserver* observer) = 0; |
| 130 | 132 |
| 131 bool IsInSecondaryLoginScreen() const; | 133 bool IsInSecondaryLoginScreen() const; |
| 132 }; | 134 }; |
| 133 | 135 |
| 134 } // namespace ash | 136 } // namespace ash |
| 135 | 137 |
| 136 #endif // ASH_SESSION_SESSION_STATE_DELEGATE_H_ | 138 #endif // ASH_SESSION_SESSION_STATE_DELEGATE_H_ |
| OLD | NEW |