Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1679)

Side by Side Diff: ash/session/session_controller.h

Issue 2801333002: mash: Run pre-unlock animation via SessionController (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/public/interfaces/session_controller.mojom ('k') | ash/session/session_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // NOTE: Prefer GetSessionState() in new code because the concept of 97 // NOTE: Prefer GetSessionState() in new code because the concept of
98 // SessionState more closes matches the state in chrome. 98 // SessionState more closes matches the state in chrome.
99 LoginStatus login_status() const { return login_status_; } 99 LoginStatus login_status() const { return login_status_; }
100 100
101 // mojom::SessionController 101 // mojom::SessionController
102 void SetClient(mojom::SessionControllerClientPtr client) override; 102 void SetClient(mojom::SessionControllerClientPtr client) override;
103 void SetSessionInfo(mojom::SessionInfoPtr info) override; 103 void SetSessionInfo(mojom::SessionInfoPtr info) override;
104 void UpdateUserSession(mojom::UserSessionPtr user_session) override; 104 void UpdateUserSession(mojom::UserSessionPtr user_session) override;
105 void SetUserSessionOrder( 105 void SetUserSessionOrder(
106 const std::vector<uint32_t>& user_session_order) override; 106 const std::vector<uint32_t>& user_session_order) override;
107 void RunUnlockAnimation(const RunUnlockAnimationCallback& callback) override;
107 108
108 // Test helpers. 109 // Test helpers.
109 void ClearUserSessionsForTest(); 110 void ClearUserSessionsForTest();
110 void FlushMojoForTest(); 111 void FlushMojoForTest();
111 void LockScreenAndFlushForTest(); 112 void LockScreenAndFlushForTest();
112 113
113 private: 114 private:
114 void SetSessionState(session_manager::SessionState state); 115 void SetSessionState(session_manager::SessionState state);
115 void AddUserSession(mojom::UserSessionPtr user_session); 116 void AddUserSession(mojom::UserSessionPtr user_session);
116 117
(...skipping 24 matching lines...) Expand all
141 std::vector<mojom::UserSessionPtr> user_sessions_; 142 std::vector<mojom::UserSessionPtr> user_sessions_;
142 143
143 // The user session id of the current active user session. User session id 144 // The user session id of the current active user session. User session id
144 // is managed by session manager code, starting at 1. 0u is an invalid id 145 // is managed by session manager code, starting at 1. 0u is an invalid id
145 // to detect first active user session. 146 // to detect first active user session.
146 uint32_t active_session_id_ = 0u; 147 uint32_t active_session_id_ = 0u;
147 148
148 // Last known login status. Used to track login status changes. 149 // Last known login status. Used to track login status changes.
149 LoginStatus login_status_ = LoginStatus::NOT_LOGGED_IN; 150 LoginStatus login_status_ = LoginStatus::NOT_LOGGED_IN;
150 151
152 // Whether unlocking is in progress. The flag is set when the pre-unlock
153 // animation starts and reset when session state is no longer LOCKED.
154 bool is_unlocking_ = false;
155
151 base::ObserverList<ash::SessionStateObserver> observers_; 156 base::ObserverList<ash::SessionStateObserver> observers_;
152 157
153 DISALLOW_COPY_AND_ASSIGN(SessionController); 158 DISALLOW_COPY_AND_ASSIGN(SessionController);
154 }; 159 };
155 160
156 } // namespace ash 161 } // namespace ash
157 162
158 #endif // ASH_SESSION_SESSION_CONTROLLER_H_ 163 #endif // ASH_SESSION_SESSION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/public/interfaces/session_controller.mojom ('k') | ash/session/session_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698