| 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/common/panels/panel_layout_manager.h" | 5 #include "ash/wm/common/panels/panel_layout_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 Relayout(); | 440 Relayout(); |
| 441 } | 441 } |
| 442 | 442 |
| 443 void PanelLayoutManager::OnShelfAlignmentChanged() { | 443 void PanelLayoutManager::OnShelfAlignmentChanged() { |
| 444 Relayout(); | 444 Relayout(); |
| 445 } | 445 } |
| 446 | 446 |
| 447 ///////////////////////////////////////////////////////////////////////////// | 447 ///////////////////////////////////////////////////////////////////////////// |
| 448 // PanelLayoutManager, WindowObserver implementation: | 448 // PanelLayoutManager, WindowObserver implementation: |
| 449 | 449 |
| 450 void PanelLayoutManager::OnWindowPropertyChanged(wm::WmWindow* window, | 450 void PanelLayoutManager::OnWindowPropertyChanged( |
| 451 wm::WmWindowProperty property, | 451 wm::WmWindow* window, |
| 452 intptr_t old) { | 452 wm::WmWindowProperty property) { |
| 453 // Trigger a relayout to position the panels whenever the panel icon is set | 453 // Trigger a relayout to position the panels whenever the panel icon is set |
| 454 // or changes. | 454 // or changes. |
| 455 if (property == wm::WmWindowProperty::SHELF_ID) | 455 if (property == wm::WmWindowProperty::SHELF_ID) |
| 456 Relayout(); | 456 Relayout(); |
| 457 } | 457 } |
| 458 | 458 |
| 459 ///////////////////////////////////////////////////////////////////////////// | 459 ///////////////////////////////////////////////////////////////////////////// |
| 460 // PanelLayoutManager, WindowStateObserver implementation: | 460 // PanelLayoutManager, WindowStateObserver implementation: |
| 461 | 461 |
| 462 void PanelLayoutManager::OnPostWindowStateTypeChange( | 462 void PanelLayoutManager::OnPostWindowStateTypeChange( |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 // Keyboard hidden, restore original bounds if they exist. | 893 // Keyboard hidden, restore original bounds if they exist. |
| 894 panel->SetBoundsDirect(panel_state->GetRestoreBoundsInScreen()); | 894 panel->SetBoundsDirect(panel_state->GetRestoreBoundsInScreen()); |
| 895 } | 895 } |
| 896 } | 896 } |
| 897 // This bounds change will have caused a change to the Shelf which does not | 897 // This bounds change will have caused a change to the Shelf which does not |
| 898 // propogate automatically to this class, so manually recalculate bounds. | 898 // propogate automatically to this class, so manually recalculate bounds. |
| 899 OnWindowResized(); | 899 OnWindowResized(); |
| 900 } | 900 } |
| 901 | 901 |
| 902 } // namespace ash | 902 } // namespace ash |
| OLD | NEW |