Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_layout_manager.h" | 5 #include "ash/shelf/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <cstring> | 9 #include <cstring> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 514 } | 514 } |
| 515 } | 515 } |
| 516 | 516 |
| 517 void ShelfLayoutManager::OnLockStateChanged(bool locked) { | 517 void ShelfLayoutManager::OnLockStateChanged(bool locked) { |
| 518 // Force the shelf to layout for alignment (bottom if locked, restore | 518 // Force the shelf to layout for alignment (bottom if locked, restore |
| 519 // the previous alignment otherwise). | 519 // the previous alignment otherwise). |
| 520 state_.is_screen_locked = locked; | 520 state_.is_screen_locked = locked; |
| 521 UpdateShelfVisibilityAfterLoginUIChange(); | 521 UpdateShelfVisibilityAfterLoginUIChange(); |
| 522 } | 522 } |
| 523 | 523 |
| 524 void ShelfLayoutManager::OnShelfAlignmentChanged(aura::Window* root_window) { | |
| 525 if (aura::GetMusWindow(shelf_->GetNativeWindow())) | |
|
James Cook
2016/05/09 19:39:36
I think ash::Shell::GetInstance()->in_mus() would
msw
2016/05/09 19:50:00
Done.
| |
| 526 LayoutShelf(); | |
| 527 } | |
| 528 | |
| 524 void ShelfLayoutManager::OnShelfAutoHideBehaviorChanged( | 529 void ShelfLayoutManager::OnShelfAutoHideBehaviorChanged( |
| 525 aura::Window* root_window) { | 530 aura::Window* root_window) { |
| 526 UpdateVisibilityState(); | 531 UpdateVisibilityState(); |
| 527 } | 532 } |
| 528 | 533 |
| 529 void ShelfLayoutManager::OnWindowActivated( | 534 void ShelfLayoutManager::OnWindowActivated( |
| 530 aura::client::ActivationChangeObserver::ActivationReason reason, | 535 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 531 aura::Window* gained_active, | 536 aura::Window* gained_active, |
| 532 aura::Window* lost_active) { | 537 aura::Window* lost_active) { |
| 533 UpdateAutoHideStateNow(); | 538 UpdateAutoHideStateNow(); |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1141 UpdateBoundsAndOpacity(target_bounds, true, NULL); | 1146 UpdateBoundsAndOpacity(target_bounds, true, NULL); |
| 1142 UpdateVisibilityState(); | 1147 UpdateVisibilityState(); |
| 1143 } | 1148 } |
| 1144 | 1149 |
| 1145 void ShelfLayoutManager::UpdateShelfVisibilityAfterLoginUIChange() { | 1150 void ShelfLayoutManager::UpdateShelfVisibilityAfterLoginUIChange() { |
| 1146 UpdateVisibilityState(); | 1151 UpdateVisibilityState(); |
| 1147 LayoutShelf(); | 1152 LayoutShelf(); |
| 1148 } | 1153 } |
| 1149 | 1154 |
| 1150 } // namespace ash | 1155 } // namespace ash |
| OLD | NEW |