| 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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 } | 544 } |
| 545 } | 545 } |
| 546 | 546 |
| 547 void ShelfLayoutManager::OnLockStateChanged(bool locked) { | 547 void ShelfLayoutManager::OnLockStateChanged(bool locked) { |
| 548 // Force the shelf to layout for alignment (bottom if locked, restore | 548 // Force the shelf to layout for alignment (bottom if locked, restore |
| 549 // the previous alignment otherwise). | 549 // the previous alignment otherwise). |
| 550 state_.is_screen_locked = locked; | 550 state_.is_screen_locked = locked; |
| 551 UpdateShelfVisibilityAfterLoginUIChange(); | 551 UpdateShelfVisibilityAfterLoginUIChange(); |
| 552 } | 552 } |
| 553 | 553 |
| 554 void ShelfLayoutManager::OnShelfAlignmentChanged(aura::Window* root_window) { | 554 void ShelfLayoutManager::OnShelfAlignmentChanged(WmWindow* root_window) { |
| 555 if (Shell::GetInstance()->in_mus()) | 555 if (Shell::GetInstance()->in_mus()) |
| 556 LayoutShelf(); | 556 LayoutShelf(); |
| 557 } | 557 } |
| 558 | 558 |
| 559 void ShelfLayoutManager::OnShelfAutoHideBehaviorChanged( | 559 void ShelfLayoutManager::OnShelfAutoHideBehaviorChanged(WmWindow* root_window) { |
| 560 aura::Window* root_window) { | |
| 561 UpdateVisibilityState(); | 560 UpdateVisibilityState(); |
| 562 } | 561 } |
| 563 | 562 |
| 564 void ShelfLayoutManager::OnWindowActivated( | 563 void ShelfLayoutManager::OnWindowActivated( |
| 565 aura::client::ActivationChangeObserver::ActivationReason reason, | 564 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 566 aura::Window* gained_active, | 565 aura::Window* gained_active, |
| 567 aura::Window* lost_active) { | 566 aura::Window* lost_active) { |
| 568 UpdateAutoHideStateNow(); | 567 UpdateAutoHideStateNow(); |
| 569 } | 568 } |
| 570 | 569 |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1193 UpdateBoundsAndOpacity(target_bounds, true, NULL); | 1192 UpdateBoundsAndOpacity(target_bounds, true, NULL); |
| 1194 UpdateVisibilityState(); | 1193 UpdateVisibilityState(); |
| 1195 } | 1194 } |
| 1196 | 1195 |
| 1197 void ShelfLayoutManager::UpdateShelfVisibilityAfterLoginUIChange() { | 1196 void ShelfLayoutManager::UpdateShelfVisibilityAfterLoginUIChange() { |
| 1198 UpdateVisibilityState(); | 1197 UpdateVisibilityState(); |
| 1199 LayoutShelf(); | 1198 LayoutShelf(); |
| 1200 } | 1199 } |
| 1201 | 1200 |
| 1202 } // namespace ash | 1201 } // namespace ash |
| OLD | NEW |