| 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/screen_util.h" | 10 #include "ash/screen_util.h" |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 // PanelLayoutManager, ash::ShellObserver implementation: | 452 // PanelLayoutManager, ash::ShellObserver implementation: |
| 453 | 453 |
| 454 void PanelLayoutManager::OnShelfAlignmentChanged(aura::Window* root_window) { | 454 void PanelLayoutManager::OnShelfAlignmentChanged(aura::Window* root_window) { |
| 455 if (panel_container_->GetRootWindow() == root_window) | 455 if (panel_container_->GetRootWindow() == root_window) |
| 456 Relayout(); | 456 Relayout(); |
| 457 } | 457 } |
| 458 | 458 |
| 459 ///////////////////////////////////////////////////////////////////////////// | 459 ///////////////////////////////////////////////////////////////////////////// |
| 460 // PanelLayoutManager, WindowObserver implementation: | 460 // PanelLayoutManager, WindowObserver implementation: |
| 461 | 461 |
| 462 void PanelLayoutManager::OnWindowShowTypeChanged( | 462 void PanelLayoutManager::OnPreWindowShowTypeChange( |
| 463 wm::WindowState* window_state, | 463 wm::WindowState* window_state, |
| 464 wm::WindowShowType old_type) { | 464 wm::WindowShowType old_type) { |
| 465 // If the shelf is currently hidden then windows will not actually be shown | 465 // If the shelf is currently hidden then windows will not actually be shown |
| 466 // but the set to restore when the shelf becomes visible is updated. | 466 // but the set to restore when the shelf becomes visible is updated. |
| 467 if (restore_windows_on_shelf_visible_) { | 467 if (restore_windows_on_shelf_visible_) { |
| 468 if (window_state->IsMinimized()) { | 468 if (window_state->IsMinimized()) { |
| 469 MinimizePanel(window_state->window()); | 469 MinimizePanel(window_state->window()); |
| 470 restore_windows_on_shelf_visible_->Remove(window_state->window()); | 470 restore_windows_on_shelf_visible_->Remove(window_state->window()); |
| 471 } else { | 471 } else { |
| 472 restore_windows_on_shelf_visible_->Add(window_state->window()); | 472 restore_windows_on_shelf_visible_->Add(window_state->window()); |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 | 884 |
| 885 void PanelLayoutManager::OnKeyboardBoundsChanging( | 885 void PanelLayoutManager::OnKeyboardBoundsChanging( |
| 886 const gfx::Rect& keyboard_bounds) { | 886 const gfx::Rect& keyboard_bounds) { |
| 887 // This bounds change will have caused a change to the Shelf which does not | 887 // This bounds change will have caused a change to the Shelf which does not |
| 888 // propogate automatically to this class, so manually recalculate bounds. | 888 // propogate automatically to this class, so manually recalculate bounds. |
| 889 OnWindowResized(); | 889 OnWindowResized(); |
| 890 } | 890 } |
| 891 | 891 |
| 892 } // namespace internal | 892 } // namespace internal |
| 893 } // namespace ash | 893 } // namespace ash |
| OLD | NEW |