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

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

Issue 2891223002: cros: Move wallpaper after login screen is gone (Closed)
Patch Set: fix nits Created 3 years, 7 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 | « no previous file | ash/session/session_controller_unittest.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 #include "ash/session/session_controller.h" 5 #include "ash/session/session_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "ash/session/session_observer.h" 10 #include "ash/session/session_observer.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 bool SessionController::IsScreenLocked() const { 76 bool SessionController::IsScreenLocked() const {
77 return state_ == SessionState::LOCKED; 77 return state_ == SessionState::LOCKED;
78 } 78 }
79 79
80 bool SessionController::ShouldLockScreenAutomatically() const { 80 bool SessionController::ShouldLockScreenAutomatically() const {
81 return should_lock_screen_automatically_; 81 return should_lock_screen_automatically_;
82 } 82 }
83 83
84 bool SessionController::IsUserSessionBlocked() const { 84 bool SessionController::IsUserSessionBlocked() const {
85 // User sessions are blocked when session state is not ACTIVE, except that 85 // User sessions are blocked when session state is not ACTIVE, with two
86 // LOCKED state with a running unlocking animation. This is made an exception 86 // exceptions:
87 // because the unlocking animation hides lock container at the end. During the 87 // - LOGGED_IN_NOT_ACTIVE state. This is needed so that browser windows
88 // unlock animation, IsUserSessionBlocked needs to return unblocked so that 88 // created by session restore (or a default new browser window) is properly
The one and only Dr. Crash 2017/05/24 23:12:09 Plural ("are") since you're talking about multiple
xiyuan 2017/05/25 14:31:48 Done.
89 // user windows are deemed activatable and ash correctly restore the active 89 // activated before session state changes to ACTIVE.
90 // window before locking. 90 // - LOCKED state with a running unlocking animation. This is needed because
91 // the unlocking animation hides lock container at the end. During the
The one and only Dr. Crash 2017/05/24 23:12:08 the lock
xiyuan 2017/05/25 14:31:48 Done.
92 // unlock animation, IsUserSessionBlocked needs to return unblocked so that
93 // user windows are deemed activatable and ash correctly restore the active
The one and only Dr. Crash 2017/05/24 23:12:08 restores
xiyuan 2017/05/25 14:31:48 Done.
94 // window before locking.
91 return state_ != SessionState::ACTIVE && 95 return state_ != SessionState::ACTIVE &&
96 state_ != SessionState::LOGGED_IN_NOT_ACTIVE &&
92 !(state_ == SessionState::LOCKED && is_unlocking_); 97 !(state_ == SessionState::LOCKED && is_unlocking_);
93 } 98 }
94 99
95 bool SessionController::IsInSecondaryLoginScreen() const { 100 bool SessionController::IsInSecondaryLoginScreen() const {
96 return state_ == SessionState::LOGIN_SECONDARY; 101 return state_ == SessionState::LOGIN_SECONDARY;
97 } 102 }
98 103
99 SessionState SessionController::GetSessionState() const { 104 SessionState SessionController::GetSessionState() const {
100 return state_; 105 return state_;
101 } 106 }
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 for (auto& observer : observers_) 387 for (auto& observer : observers_)
383 observer.OnLoginStatusChanged(login_status_); 388 observer.OnLoginStatusChanged(login_status_);
384 } 389 }
385 390
386 void SessionController::OnLockAnimationFinished() { 391 void SessionController::OnLockAnimationFinished() {
387 if (!start_lock_callback_.is_null()) 392 if (!start_lock_callback_.is_null())
388 std::move(start_lock_callback_).Run(true /* locked */); 393 std::move(start_lock_callback_).Run(true /* locked */);
389 } 394 }
390 395
391 } // namespace ash 396 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/session/session_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698