| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // nullptr if no user session is found for the index. | 84 // nullptr if no user session is found for the index. |
| 85 const mojom::UserSession* GetUserSession(UserIndex index) const; | 85 const mojom::UserSession* GetUserSession(UserIndex index) const; |
| 86 | 86 |
| 87 // Returns true if the current user is supervised: has legacy supervised | 87 // Returns true if the current user is supervised: has legacy supervised |
| 88 // account or kid account. | 88 // account or kid account. |
| 89 bool IsUserSupervised() const; | 89 bool IsUserSupervised() const; |
| 90 | 90 |
| 91 // Returns true if the current user is a child account. | 91 // Returns true if the current user is a child account. |
| 92 bool IsUserChild() const; | 92 bool IsUserChild() const; |
| 93 | 93 |
| 94 // Returns true if the current user session is a kiosk session (either |
| 95 // chrome app kiosk or ARC kiosk). |
| 96 bool IsKioskSession() const; |
| 97 |
| 94 // Locks the screen. The locking happens asynchronously. | 98 // Locks the screen. The locking happens asynchronously. |
| 95 void LockScreen(); | 99 void LockScreen(); |
| 96 | 100 |
| 97 // Switches to another active user with |account_id| (if that user has | 101 // Switches to another active user with |account_id| (if that user has |
| 98 // already signed in). | 102 // already signed in). |
| 99 void SwitchActiveUser(const AccountId& account_id); | 103 void SwitchActiveUser(const AccountId& account_id); |
| 100 | 104 |
| 101 // Switches the active user to the next or previous user, with the same | 105 // Switches the active user to the next or previous user, with the same |
| 102 // ordering as user sessions are created. | 106 // ordering as user sessions are created. |
| 103 void CycleActiveUser(CycleUserDirection direction); | 107 void CycleActiveUser(CycleUserDirection direction); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 base::ObserverList<ash::SessionObserver> observers_; | 183 base::ObserverList<ash::SessionObserver> observers_; |
| 180 | 184 |
| 181 base::WeakPtrFactory<SessionController> weak_ptr_factory_; | 185 base::WeakPtrFactory<SessionController> weak_ptr_factory_; |
| 182 | 186 |
| 183 DISALLOW_COPY_AND_ASSIGN(SessionController); | 187 DISALLOW_COPY_AND_ASSIGN(SessionController); |
| 184 }; | 188 }; |
| 185 | 189 |
| 186 } // namespace ash | 190 } // namespace ash |
| 187 | 191 |
| 188 #endif // ASH_SESSION_SESSION_CONTROLLER_H_ | 192 #endif // ASH_SESSION_SESSION_CONTROLLER_H_ |
| OLD | NEW |