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

Unified Diff: ash/shelf/shelf_locking_manager.cc

Issue 1920073002: Fix Chrome OS shelf locking for chromebook lid open/close. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update and add unit tests. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_locking_manager.h ('k') | ash/shelf/shelf_locking_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_locking_manager.cc
diff --git a/ash/shelf/shelf_locking_manager.cc b/ash/shelf/shelf_locking_manager.cc
index d291da6dc270092eceab4b2af6524a0f66f4ddf7..70035cdbbb29aad57b22628dc3cd27dcea41a94b 100644
--- a/ash/shelf/shelf_locking_manager.cc
+++ b/ash/shelf/shelf_locking_manager.cc
@@ -49,12 +49,11 @@ void ShelfLockingManager::OnLockStateEvent(EventType event) {
}
void ShelfLockingManager::UpdateLockedState() {
- const bool should_be_locked = screen_locked_ || session_locked_;
const ShelfAlignment alignment = shelf_->alignment();
- if (should_be_locked && alignment != SHELF_ALIGNMENT_BOTTOM_LOCKED) {
+ if (is_locked() && alignment != SHELF_ALIGNMENT_BOTTOM_LOCKED) {
stored_alignment_ = alignment;
shelf_->SetAlignment(SHELF_ALIGNMENT_BOTTOM_LOCKED);
- } else if (!should_be_locked && alignment == SHELF_ALIGNMENT_BOTTOM_LOCKED) {
+ } else if (!is_locked() && alignment == SHELF_ALIGNMENT_BOTTOM_LOCKED) {
shelf_->SetAlignment(stored_alignment_);
}
}
« no previous file with comments | « ash/shelf/shelf_locking_manager.h ('k') | ash/shelf/shelf_locking_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698