| 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/wm/default_state.h" | 5 #include "ash/wm/default_state.h" |
| 6 | 6 |
| 7 #include "ash/display/window_tree_host_manager.h" | 7 #include "ash/display/window_tree_host_manager.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/screen_util.h" | 9 #include "ash/screen_util.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 11 #include "ash/shell_window_ids.h" | 11 #include "ash/shell_window_ids.h" |
| 12 #include "ash/wm/common/wm_event.h" |
| 12 #include "ash/wm/coordinate_conversion.h" | 13 #include "ash/wm/coordinate_conversion.h" |
| 13 #include "ash/wm/dock/docked_window_layout_manager.h" | 14 #include "ash/wm/dock/docked_window_layout_manager.h" |
| 14 #include "ash/wm/window_animations.h" | 15 #include "ash/wm/window_animations.h" |
| 15 #include "ash/wm/window_state.h" | 16 #include "ash/wm/window_state.h" |
| 16 #include "ash/wm/window_state_delegate.h" | 17 #include "ash/wm/window_state_delegate.h" |
| 17 #include "ash/wm/window_state_util.h" | 18 #include "ash/wm/window_state_util.h" |
| 18 #include "ash/wm/window_util.h" | 19 #include "ash/wm/window_util.h" |
| 19 #include "ash/wm/wm_event.h" | |
| 20 #include "ash/wm/workspace/workspace_window_resizer.h" | 20 #include "ash/wm/workspace/workspace_window_resizer.h" |
| 21 #include "ash/wm/workspace_controller.h" | 21 #include "ash/wm/workspace_controller.h" |
| 22 #include "ui/aura/client/aura_constants.h" | 22 #include "ui/aura/client/aura_constants.h" |
| 23 #include "ui/aura/window.h" | 23 #include "ui/aura/window.h" |
| 24 #include "ui/aura/window_delegate.h" | 24 #include "ui/aura/window_delegate.h" |
| 25 #include "ui/gfx/display.h" | 25 #include "ui/gfx/display.h" |
| 26 #include "ui/gfx/geometry/rect.h" | 26 #include "ui/gfx/geometry/rect.h" |
| 27 | 27 |
| 28 namespace ash { | 28 namespace ash { |
| 29 namespace wm { | 29 namespace wm { |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 ScreenUtil::GetDisplayWorkAreaBoundsInParent(window); | 752 ScreenUtil::GetDisplayWorkAreaBoundsInParent(window); |
| 753 center_in_parent.ClampToCenteredSize(window->bounds().size()); | 753 center_in_parent.ClampToCenteredSize(window->bounds().size()); |
| 754 window_state->SetBoundsDirectAnimated(center_in_parent); | 754 window_state->SetBoundsDirectAnimated(center_in_parent); |
| 755 } | 755 } |
| 756 // Centering window is treated as if a user moved and resized the window. | 756 // Centering window is treated as if a user moved and resized the window. |
| 757 window_state->set_bounds_changed_by_user(true); | 757 window_state->set_bounds_changed_by_user(true); |
| 758 } | 758 } |
| 759 | 759 |
| 760 } // namespace wm | 760 } // namespace wm |
| 761 } // namespace ash | 761 } // namespace ash |
| OLD | NEW |