| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_CONTROLLER_H_ | 5 #ifndef ASH_SESSION_SESSION_CONTROLLER_H_ |
| 6 #define ASH_SESSION_SESSION_CONTROLLER_H_ | 6 #define ASH_SESSION_SESSION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // Gets the ash session state. | 78 // Gets the ash session state. |
| 79 session_manager::SessionState GetSessionState() const; | 79 session_manager::SessionState GetSessionState() const; |
| 80 | 80 |
| 81 // Gets the user sessions in LRU order with the active session being first. | 81 // Gets the user sessions in LRU order with the active session being first. |
| 82 const std::vector<mojom::UserSessionPtr>& GetUserSessions() const; | 82 const std::vector<mojom::UserSessionPtr>& GetUserSessions() const; |
| 83 | 83 |
| 84 // Convenience helper to gets the user session at a given index. Returns | 84 // Convenience helper to gets the user session at a given index. Returns |
| 85 // nullptr if no user session is found for the index. | 85 // nullptr if no user session is found for the index. |
| 86 const mojom::UserSession* GetUserSession(UserIndex index) const; | 86 const mojom::UserSession* GetUserSession(UserIndex index) const; |
| 87 | 87 |
| 88 // Returns true if the current user is supervised: has legacy supervised |
| 89 // account or kid account. |
| 90 bool IsUserSupervised() const; |
| 91 |
| 92 // Returns true if the current user is a child account. |
| 93 bool IsUserChild() const; |
| 94 |
| 88 // Locks the screen. The locking happens asynchronously. | 95 // Locks the screen. The locking happens asynchronously. |
| 89 void LockScreen(); | 96 void LockScreen(); |
| 90 | 97 |
| 91 // Switches to another active user with |account_id| (if that user has | 98 // Switches to another active user with |account_id| (if that user has |
| 92 // already signed in). | 99 // already signed in). |
| 93 void SwitchActiveUser(const AccountId& account_id); | 100 void SwitchActiveUser(const AccountId& account_id); |
| 94 | 101 |
| 95 // Switches the active user to the next or previous user, with the same | 102 // Switches the active user to the next or previous user, with the same |
| 96 // ordering as user sessions are created. | 103 // ordering as user sessions are created. |
| 97 void CycleActiveUser(CycleUserDirection direction); | 104 void CycleActiveUser(CycleUserDirection direction); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 bool is_unlocking_ = false; | 168 bool is_unlocking_ = false; |
| 162 | 169 |
| 163 base::ObserverList<ash::SessionObserver> observers_; | 170 base::ObserverList<ash::SessionObserver> observers_; |
| 164 | 171 |
| 165 DISALLOW_COPY_AND_ASSIGN(SessionController); | 172 DISALLOW_COPY_AND_ASSIGN(SessionController); |
| 166 }; | 173 }; |
| 167 | 174 |
| 168 } // namespace ash | 175 } // namespace ash |
| 169 | 176 |
| 170 #endif // ASH_SESSION_SESSION_CONTROLLER_H_ | 177 #endif // ASH_SESSION_SESSION_CONTROLLER_H_ |
| OLD | NEW |