| Index: ash/common/session/session_controller.h
|
| diff --git a/ash/common/session/session_controller.h b/ash/common/session/session_controller.h
|
| index 70150a3aa33de7a8a10a259190280c3cbc6ae88f..e13f6728cd1c7e75b3a1d3755a9918e77f9578e3 100644
|
| --- a/ash/common/session/session_controller.h
|
| +++ b/ash/common/session/session_controller.h
|
| @@ -61,17 +61,24 @@ class ASH_EXPORT SessionController
|
| // is turned off or the system is suspended.
|
| bool ShouldLockScreenAutomatically() const;
|
|
|
| - // Returns |true| if user session blocked by some overlying UI. It can be
|
| + // Returns true if user session blocked by some overlying UI. It can be
|
| // login screen, lock screen or screen for adding users into multi-profile
|
| // session.
|
| bool IsUserSessionBlocked() const;
|
|
|
| + // Convenience function that returns true if session state is LOGIN_SECONDARY.
|
| + bool IsInSecondaryLoginScreen() const;
|
| +
|
| // Gets the ash session state.
|
| session_manager::SessionState GetSessionState() const;
|
|
|
| // Gets the user sessions in LRU order with the active session being first.
|
| const std::vector<mojom::UserSessionPtr>& GetUserSessions() const;
|
|
|
| + // Convenience helper to gets the user session at a given index. Returns
|
| + // nullptr if no user session is found for the index.
|
| + const mojom::UserSession* GetUserSession(UserIndex index) const;
|
| +
|
| // Locks the screen. The locking happens asynchronously.
|
| void LockScreen();
|
|
|
| @@ -98,6 +105,10 @@ class ASH_EXPORT SessionController
|
| void SetUserSessionOrder(
|
| const std::vector<uint32_t>& user_session_order) override;
|
|
|
| + // Test helpers.
|
| + void ClearUserSessionsForTest();
|
| + void LockScreenAndFlushForTest();
|
| +
|
| private:
|
| void SetSessionState(session_manager::SessionState state);
|
| void AddUserSession(mojom::UserSessionPtr user_session);
|
|
|