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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 // The window property will still be set, but no actual change will occur | 582 // The window property will still be set, but no actual change will occur |
583 // until OnFullscreenStateChange is called when exiting fullscreen. | 583 // until OnFullscreenStateChange is called when exiting fullscreen. |
584 if (in_fullscreen_) | 584 if (in_fullscreen_) |
585 return; | 585 return; |
586 if (window_state->IsMinimized()) { | 586 if (window_state->IsMinimized()) { |
587 MinimizeDockedWindow(window_state); | 587 MinimizeDockedWindow(window_state); |
588 } else if (window_state->IsMaximizedOrFullscreen()) { | 588 } else if (window_state->IsMaximizedOrFullscreen()) { |
589 // Reparenting changes the source bounds for the animation if a window is | 589 // Reparenting changes the source bounds for the animation if a window is |
590 // visible so hide it here and show later when it is already in the desktop. | 590 // visible so hide it here and show later when it is already in the desktop. |
591 UndockWindow(window); | 591 UndockWindow(window); |
592 } else { | 592 } else if (old_type == wm::SHOW_TYPE_MINIMIZED) { |
593 RestoreDockedWindow(window_state); | 593 RestoreDockedWindow(window_state); |
594 } | 594 } |
595 } | 595 } |
596 | 596 |
597 ///////////////////////////////////////////////////////////////////////////// | 597 ///////////////////////////////////////////////////////////////////////////// |
598 // DockLayoutManager, WindowObserver implementation: | 598 // DockLayoutManager, WindowObserver implementation: |
599 | 599 |
600 void DockedWindowLayoutManager::OnWindowBoundsChanged( | 600 void DockedWindowLayoutManager::OnWindowBoundsChanged( |
601 aura::Window* window, | 601 aura::Window* window, |
602 const gfx::Rect& old_bounds, | 602 const gfx::Rect& old_bounds, |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( | 1026 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( |
1027 const gfx::Rect& keyboard_bounds) { | 1027 const gfx::Rect& keyboard_bounds) { |
1028 // This bounds change will have caused a change to the Shelf which does not | 1028 // This bounds change will have caused a change to the Shelf which does not |
1029 // propagate automatically to this class, so manually recalculate bounds. | 1029 // propagate automatically to this class, so manually recalculate bounds. |
1030 Relayout(); | 1030 Relayout(); |
1031 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); | 1031 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); |
1032 } | 1032 } |
1033 | 1033 |
1034 } // namespace internal | 1034 } // namespace internal |
1035 } // namespace ash | 1035 } // namespace ash |
OLD | NEW |