Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1039)

Side by Side Diff: ash/common/wm/default_state.cc

Issue 2625113004: Unify window fullscreen and minimizing implementation (Closed)
Patch Set: Update Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/common/wm/window_state.cc » ('j') | ui/base/ui_base_types.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/common/wm/default_state.h" 5 #include "ash/common/wm/default_state.h"
6 6
7 #include "ash/common/ash_switches.h" 7 #include "ash/common/ash_switches.h"
8 #include "ash/common/wm/dock/docked_window_layout_manager.h" 8 #include "ash/common/wm/dock/docked_window_layout_manager.h"
9 #include "ash/common/wm/window_animation_types.h" 9 #include "ash/common/wm/window_animation_types.h"
10 #include "ash/common/wm/window_parenting_utils.h" 10 #include "ash/common/wm/window_parenting_utils.h"
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 case WINDOW_STATE_TYPE_FULLSCREEN: 738 case WINDOW_STATE_TYPE_FULLSCREEN:
739 case WINDOW_STATE_TYPE_PINNED: 739 case WINDOW_STATE_TYPE_PINNED:
740 case WINDOW_STATE_TYPE_TRUSTED_PINNED: 740 case WINDOW_STATE_TYPE_TRUSTED_PINNED:
741 bounds_in_parent = GetDisplayBoundsInParent(window); 741 bounds_in_parent = GetDisplayBoundsInParent(window);
742 break; 742 break;
743 743
744 case WINDOW_STATE_TYPE_DOCKED_MINIMIZED: 744 case WINDOW_STATE_TYPE_DOCKED_MINIMIZED:
745 case WINDOW_STATE_TYPE_MINIMIZED: 745 case WINDOW_STATE_TYPE_MINIMIZED:
746 break; 746 break;
747 case WINDOW_STATE_TYPE_INACTIVE: 747 case WINDOW_STATE_TYPE_INACTIVE:
748 case WINDOW_STATE_TYPE_PREVIOUS:
748 case WINDOW_STATE_TYPE_END: 749 case WINDOW_STATE_TYPE_END:
749 case WINDOW_STATE_TYPE_AUTO_POSITIONED: 750 case WINDOW_STATE_TYPE_AUTO_POSITIONED:
750 return; 751 return;
751 } 752 }
752 753
753 if (!window_state->IsMinimized()) { 754 if (!window_state->IsMinimized()) {
754 if (IsMinimizedWindowState(previous_state_type) || 755 if (IsMinimizedWindowState(previous_state_type) ||
755 window_state->IsFullscreen() || window_state->IsPinned()) { 756 window_state->IsFullscreen() || window_state->IsPinned()) {
756 window_state->SetBoundsDirect(bounds_in_parent); 757 window_state->SetBoundsDirect(bounds_in_parent);
757 } else if (window_state->IsMaximized() || 758 } else if (window_state->IsMaximized() ||
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 gfx::Rect center_in_parent = GetDisplayWorkAreaBoundsInParent(window); 827 gfx::Rect center_in_parent = GetDisplayWorkAreaBoundsInParent(window);
827 center_in_parent.ClampToCenteredSize(window->GetBounds().size()); 828 center_in_parent.ClampToCenteredSize(window->GetBounds().size());
828 window_state->SetBoundsDirectAnimated(center_in_parent); 829 window_state->SetBoundsDirectAnimated(center_in_parent);
829 } 830 }
830 // Centering window is treated as if a user moved and resized the window. 831 // Centering window is treated as if a user moved and resized the window.
831 window_state->set_bounds_changed_by_user(true); 832 window_state->set_bounds_changed_by_user(true);
832 } 833 }
833 834
834 } // namespace wm 835 } // namespace wm
835 } // namespace ash 836 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/wm/window_state.cc » ('j') | ui/base/ui_base_types.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698