OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/dock/docked_window_layout_manager.h" | 5 #include "ash/wm/dock/docked_window_layout_manager.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/launcher/launcher.h" | 8 #include "ash/launcher/launcher.h" |
9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 // The window property will still be set, but no actual change will occur | 570 // The window property will still be set, but no actual change will occur |
571 // until OnFullscreenStateChange is called when exiting fullscreen. | 571 // until OnFullscreenStateChange is called when exiting fullscreen. |
572 if (in_fullscreen_) | 572 if (in_fullscreen_) |
573 return; | 573 return; |
574 if (window_state->IsMinimized()) { | 574 if (window_state->IsMinimized()) { |
575 MinimizeDockedWindow(window_state); | 575 MinimizeDockedWindow(window_state); |
576 } else if (window_state->IsMaximizedOrFullscreen()) { | 576 } else if (window_state->IsMaximizedOrFullscreen()) { |
577 // Reparenting changes the source bounds for the animation if a window is | 577 // Reparenting changes the source bounds for the animation if a window is |
578 // visible so hide it here and show later when it is already in the desktop. | 578 // visible so hide it here and show later when it is already in the desktop. |
579 UndockWindow(window); | 579 UndockWindow(window); |
580 } else { | 580 } else if (old_type == wm::SHOW_TYPE_MINIMIZED) { |
581 RestoreDockedWindow(window_state); | 581 RestoreDockedWindow(window_state); |
582 } | 582 } |
583 } | 583 } |
584 | 584 |
585 ///////////////////////////////////////////////////////////////////////////// | 585 ///////////////////////////////////////////////////////////////////////////// |
586 // DockLayoutManager, WindowObserver implementation: | 586 // DockLayoutManager, WindowObserver implementation: |
587 | 587 |
588 void DockedWindowLayoutManager::OnWindowBoundsChanged( | 588 void DockedWindowLayoutManager::OnWindowBoundsChanged( |
589 aura::Window* window, | 589 aura::Window* window, |
590 const gfx::Rect& old_bounds, | 590 const gfx::Rect& old_bounds, |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( | 1014 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( |
1015 const gfx::Rect& keyboard_bounds) { | 1015 const gfx::Rect& keyboard_bounds) { |
1016 // This bounds change will have caused a change to the Shelf which does not | 1016 // This bounds change will have caused a change to the Shelf which does not |
1017 // propagate automatically to this class, so manually recalculate bounds. | 1017 // propagate automatically to this class, so manually recalculate bounds. |
1018 Relayout(); | 1018 Relayout(); |
1019 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); | 1019 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); |
1020 } | 1020 } |
1021 | 1021 |
1022 } // namespace internal | 1022 } // namespace internal |
1023 } // namespace ash | 1023 } // namespace ash |
OLD | NEW |