| 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/wm/panels/panel_layout_manager.h" | 5 #include "ash/wm/panels/panel_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "ash/launcher/launcher.h" | 10 #include "ash/launcher/launcher.h" |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 void PanelLayoutManager::OnLauncherIconPositionsChanged() { | 443 void PanelLayoutManager::OnLauncherIconPositionsChanged() { |
| 444 // TODO: As this is called for every animation step now. Relayout needs to be | 444 // TODO: As this is called for every animation step now. Relayout needs to be |
| 445 // updated to use current icon position instead of use the ideal bounds so | 445 // updated to use current icon position instead of use the ideal bounds so |
| 446 // that the panels slide with their icons instead of jumping. | 446 // that the panels slide with their icons instead of jumping. |
| 447 Relayout(); | 447 Relayout(); |
| 448 } | 448 } |
| 449 | 449 |
| 450 //////////////////////////////////////////////////////////////////////////////// | 450 //////////////////////////////////////////////////////////////////////////////// |
| 451 // PanelLayoutManager, ash::ShellObserver implementation: | 451 // PanelLayoutManager, ash::ShellObserver implementation: |
| 452 | 452 |
| 453 void PanelLayoutManager::OnShelfAlignmentChanged( | 453 void PanelLayoutManager::OnShelfAlignmentChanged(aura::Window* root_window) { |
| 454 aura::RootWindow* root_window) { | |
| 455 if (panel_container_->GetRootWindow() == root_window) | 454 if (panel_container_->GetRootWindow() == root_window) |
| 456 Relayout(); | 455 Relayout(); |
| 457 } | 456 } |
| 458 | 457 |
| 459 ///////////////////////////////////////////////////////////////////////////// | 458 ///////////////////////////////////////////////////////////////////////////// |
| 460 // PanelLayoutManager, WindowObserver implementation: | 459 // PanelLayoutManager, WindowObserver implementation: |
| 461 | 460 |
| 462 void PanelLayoutManager::OnWindowShowTypeChanged( | 461 void PanelLayoutManager::OnWindowShowTypeChanged( |
| 463 wm::WindowState* window_state, | 462 wm::WindowState* window_state, |
| 464 wm::WindowShowType old_type) { | 463 wm::WindowShowType old_type) { |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 | 864 |
| 866 void PanelLayoutManager::OnKeyboardBoundsChanging( | 865 void PanelLayoutManager::OnKeyboardBoundsChanging( |
| 867 const gfx::Rect& keyboard_bounds) { | 866 const gfx::Rect& keyboard_bounds) { |
| 868 // This bounds change will have caused a change to the Shelf which does not | 867 // This bounds change will have caused a change to the Shelf which does not |
| 869 // propogate automatically to this class, so manually recalculate bounds. | 868 // propogate automatically to this class, so manually recalculate bounds. |
| 870 OnWindowResized(); | 869 OnWindowResized(); |
| 871 } | 870 } |
| 872 | 871 |
| 873 } // namespace internal | 872 } // namespace internal |
| 874 } // namespace ash | 873 } // namespace ash |
| OLD | NEW |