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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
558 wm::WindowShowType old_type) { | 558 wm::WindowShowType old_type) { |
559 aura::Window* window = window_state->window(); | 559 aura::Window* window = window_state->window(); |
560 if (IsPopupOrTransient(window)) | 560 if (IsPopupOrTransient(window)) |
561 return; | 561 return; |
562 // The window property will still be set, but no actual change will occur | 562 // The window property will still be set, but no actual change will occur |
563 // until OnFullscreenStateChange is called when exiting fullscreen. | 563 // until OnFullscreenStateChange is called when exiting fullscreen. |
564 if (in_fullscreen_) | 564 if (in_fullscreen_) |
565 return; | 565 return; |
566 if (window_state->IsMinimized()) { | 566 if (window_state->IsMinimized()) { |
567 MinimizeDockedWindow(window_state); | 567 MinimizeDockedWindow(window_state); |
568 } else if (window_state->IsMaximizedOrFullscreen()) { | 568 } else if (window_state->IsMaximizedOrFullscreen() || |
pkotwicz
2013/11/18 16:25:20
How about:
} else if (window_state->IsNormalShowSt
oshima
2013/11/18 18:44:44
sgtm
varkha
2013/11/20 00:11:13
SHOW_TYPE_*_SNAPPED types are both present with Is
| |
569 window_state->window_show_type() == wm::SHOW_TYPE_LEFT_SNAPPED || | |
570 window_state->window_show_type() == wm::SHOW_TYPE_RIGHT_SNAPPED) { | |
569 // Reparenting changes the source bounds for the animation if a window is | 571 // Reparenting changes the source bounds for the animation if a window is |
pkotwicz
2013/11/18 16:25:20
This comment is no longer relevant?
varkha
2013/11/20 00:11:13
Done.
| |
570 // visible so hide it here and show later when it is already in the desktop. | 572 // visible so hide it here and show later when it is already in the desktop. |
571 UndockWindow(window); | 573 UndockWindow(window); |
572 RecordUmaAction(DOCKED_ACTION_MAXIMIZE, DOCKED_ACTION_SOURCE_UNKNOWN); | 574 RecordUmaAction(DOCKED_ACTION_MAXIMIZE, DOCKED_ACTION_SOURCE_UNKNOWN); |
573 } else if (old_type == wm::SHOW_TYPE_MINIMIZED) { | 575 } else if (old_type == wm::SHOW_TYPE_MINIMIZED) { |
574 RestoreDockedWindow(window_state); | 576 RestoreDockedWindow(window_state); |
575 } | 577 } |
576 } | 578 } |
577 | 579 |
578 ///////////////////////////////////////////////////////////////////////////// | 580 ///////////////////////////////////////////////////////////////////////////// |
579 // DockLayoutManager, WindowObserver implementation: | 581 // DockLayoutManager, WindowObserver implementation: |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1062 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( | 1064 void DockedWindowLayoutManager::OnKeyboardBoundsChanging( |
1063 const gfx::Rect& keyboard_bounds) { | 1065 const gfx::Rect& keyboard_bounds) { |
1064 // This bounds change will have caused a change to the Shelf which does not | 1066 // This bounds change will have caused a change to the Shelf which does not |
1065 // propagate automatically to this class, so manually recalculate bounds. | 1067 // propagate automatically to this class, so manually recalculate bounds. |
1066 Relayout(); | 1068 Relayout(); |
1067 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); | 1069 UpdateDockBounds(DockedWindowLayoutManagerObserver::KEYBOARD_BOUNDS_CHANGING); |
1068 } | 1070 } |
1069 | 1071 |
1070 } // namespace internal | 1072 } // namespace internal |
1071 } // namespace ash | 1073 } // namespace ash |
OLD | NEW |