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

Unified Diff: ash/session/session_controller.cc

Issue 2935623003: Merge "cros: Move wallpaper after login screen is gone" (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/session/session_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/session/session_controller.cc
diff --git a/ash/session/session_controller.cc b/ash/session/session_controller.cc
index 9e7dd7630c5063f13a1c9c7942394c3512a0f6c9..dd4509a70c68f1e7e3d0ce93733de96eb62a6bec 100644
--- a/ash/session/session_controller.cc
+++ b/ash/session/session_controller.cc
@@ -78,13 +78,18 @@ bool SessionController::ShouldLockScreenAutomatically() const {
}
bool SessionController::IsUserSessionBlocked() const {
- // User sessions are blocked when session state is not ACTIVE, except that
- // LOCKED state with a running unlocking animation. This is made an exception
- // because the unlocking animation hides lock container at the end. During the
- // unlock animation, IsUserSessionBlocked needs to return unblocked so that
- // user windows are deemed activatable and ash correctly restore the active
- // window before locking.
+ // User sessions are blocked when session state is not ACTIVE, with two
+ // exceptions:
+ // - LOGGED_IN_NOT_ACTIVE state. This is needed so that browser windows
+ // created by session restore (or a default new browser window) are properly
+ // activated before session state changes to ACTIVE.
+ // - LOCKED state with a running unlocking animation. This is needed because
+ // the unlocking animation hides the lock container at the end. During the
+ // unlock animation, IsUserSessionBlocked needs to return unblocked so that
+ // user windows are deemed activatable and ash correctly restores the active
+ // window before locking.
return state_ != SessionState::ACTIVE &&
+ state_ != SessionState::LOGGED_IN_NOT_ACTIVE &&
!(state_ == SessionState::LOCKED && is_unlocking_);
}
« 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