| OLD | NEW |
| 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/shell_window_ids.h" |
| 7 #include "ash/common/wm/dock/docked_window_layout_manager.h" | 8 #include "ash/common/wm/dock/docked_window_layout_manager.h" |
| 8 #include "ash/common/wm/window_animation_types.h" | 9 #include "ash/common/wm/window_animation_types.h" |
| 9 #include "ash/common/wm/window_parenting_utils.h" | 10 #include "ash/common/wm/window_parenting_utils.h" |
| 10 #include "ash/common/wm/window_positioning_utils.h" | 11 #include "ash/common/wm/window_positioning_utils.h" |
| 11 #include "ash/common/wm/window_state.h" | 12 #include "ash/common/wm/window_state.h" |
| 12 #include "ash/common/wm/window_state_delegate.h" | 13 #include "ash/common/wm/window_state_delegate.h" |
| 13 #include "ash/common/wm/window_state_util.h" | 14 #include "ash/common/wm/window_state_util.h" |
| 14 #include "ash/common/wm/wm_event.h" | 15 #include "ash/common/wm/wm_event.h" |
| 15 #include "ash/common/wm/wm_globals.h" | 16 #include "ash/common/wm/wm_globals.h" |
| 16 #include "ash/common/wm/wm_root_window_controller.h" | 17 #include "ash/common/wm/wm_root_window_controller.h" |
| 17 #include "ash/common/wm/wm_screen_util.h" | 18 #include "ash/common/wm/wm_screen_util.h" |
| 18 #include "ash/common/wm/wm_shell_window_ids.h" | |
| 19 #include "ash/common/wm/wm_window.h" | 19 #include "ash/common/wm/wm_window.h" |
| 20 #include "ui/display/display.h" | 20 #include "ui/display/display.h" |
| 21 #include "ui/display/screen.h" | 21 #include "ui/display/screen.h" |
| 22 | 22 |
| 23 namespace ash { | 23 namespace ash { |
| 24 namespace wm { | 24 namespace wm { |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 // This specifies how much percent (30%) of a window rect | 27 // This specifies how much percent (30%) of a window rect |
| 28 // must be visible when the window is added to the workspace. | 28 // must be visible when the window is added to the workspace. |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 gfx::Rect center_in_parent = GetDisplayWorkAreaBoundsInParent(window); | 727 gfx::Rect center_in_parent = GetDisplayWorkAreaBoundsInParent(window); |
| 728 center_in_parent.ClampToCenteredSize(window->GetBounds().size()); | 728 center_in_parent.ClampToCenteredSize(window->GetBounds().size()); |
| 729 window_state->SetBoundsDirectAnimated(center_in_parent); | 729 window_state->SetBoundsDirectAnimated(center_in_parent); |
| 730 } | 730 } |
| 731 // Centering window is treated as if a user moved and resized the window. | 731 // Centering window is treated as if a user moved and resized the window. |
| 732 window_state->set_bounds_changed_by_user(true); | 732 window_state->set_bounds_changed_by_user(true); |
| 733 } | 733 } |
| 734 | 734 |
| 735 } // namespace wm | 735 } // namespace wm |
| 736 } // namespace ash | 736 } // namespace ash |
| OLD | NEW |