OLD | NEW |
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/shelf/shelf_locking_manager.h" | 5 #include "ash/shelf/shelf_locking_manager.h" |
6 | 6 |
7 #include "ash/session/session_state_delegate.h" | 7 #include "ash/session/session_state_delegate.h" |
8 #include "ash/shelf/shelf.h" | 8 #include "ash/shelf/shelf.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/wm/lock_state_controller.h" | 10 #include "ash/wm/lock_state_controller.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 void ShelfLockingManager::OnLockStateEvent(EventType event) { | 43 void ShelfLockingManager::OnLockStateEvent(EventType event) { |
44 // This is only called when locking the screen; there is no unlock event here. | 44 // This is only called when locking the screen; there is no unlock event here. |
45 // It's also called when the screen lock animation begins and should help the | 45 // It's also called when the screen lock animation begins and should help the |
46 // shelf appear locked much earlier than ShellObserver::OnLockStateChanged. | 46 // shelf appear locked much earlier than ShellObserver::OnLockStateChanged. |
47 screen_locked_ = true; | 47 screen_locked_ = true; |
48 UpdateLockedState(); | 48 UpdateLockedState(); |
49 } | 49 } |
50 | 50 |
51 void ShelfLockingManager::UpdateLockedState() { | 51 void ShelfLockingManager::UpdateLockedState() { |
52 const ShelfAlignment alignment = shelf_->alignment(); | 52 const wm::ShelfAlignment alignment = shelf_->alignment(); |
53 if (is_locked() && alignment != SHELF_ALIGNMENT_BOTTOM_LOCKED) { | 53 if (is_locked() && alignment != wm::SHELF_ALIGNMENT_BOTTOM_LOCKED) { |
54 stored_alignment_ = alignment; | 54 stored_alignment_ = alignment; |
55 shelf_->SetAlignment(SHELF_ALIGNMENT_BOTTOM_LOCKED); | 55 shelf_->SetAlignment(wm::SHELF_ALIGNMENT_BOTTOM_LOCKED); |
56 } else if (!is_locked() && alignment == SHELF_ALIGNMENT_BOTTOM_LOCKED) { | 56 } else if (!is_locked() && alignment == wm::SHELF_ALIGNMENT_BOTTOM_LOCKED) { |
57 shelf_->SetAlignment(stored_alignment_); | 57 shelf_->SetAlignment(stored_alignment_); |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
61 } // namespace ash | 61 } // namespace ash |
OLD | NEW |