OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/window_positioning_utils.h" | 5 #include "ash/wm/window_positioning_utils.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/common/wm/system_modal_container_layout_manager.h" | |
10 #include "ash/common/wm/window_state.h" | |
11 #include "ash/common/wm/wm_event.h" | |
12 #include "ash/common/wm/wm_screen_util.h" | |
13 #include "ash/common/wm_shell.h" | |
14 #include "ash/common/wm_window.h" | |
15 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
16 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 11 #include "ash/wm/system_modal_container_layout_manager.h" |
| 12 #include "ash/wm/window_state.h" |
| 13 #include "ash/wm/wm_event.h" |
| 14 #include "ash/wm/wm_screen_util.h" |
| 15 #include "ash/wm_shell.h" |
| 16 #include "ash/wm_window.h" |
17 #include "ui/aura/window_tracker.h" | 17 #include "ui/aura/window_tracker.h" |
18 #include "ui/display/display.h" | 18 #include "ui/display/display.h" |
19 #include "ui/display/types/display_constants.h" | 19 #include "ui/display/types/display_constants.h" |
20 #include "ui/gfx/geometry/rect.h" | 20 #include "ui/gfx/geometry/rect.h" |
21 #include "ui/gfx/geometry/size.h" | 21 #include "ui/gfx/geometry/size.h" |
22 | 22 |
23 namespace ash { | 23 namespace ash { |
24 namespace wm { | 24 namespace wm { |
25 | 25 |
26 namespace { | 26 namespace { |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 } | 192 } |
193 gfx::Point origin(bounds_in_screen.origin()); | 193 gfx::Point origin(bounds_in_screen.origin()); |
194 const gfx::Point display_origin = | 194 const gfx::Point display_origin = |
195 window->GetDisplayNearestWindow().bounds().origin(); | 195 window->GetDisplayNearestWindow().bounds().origin(); |
196 origin.Offset(-display_origin.x(), -display_origin.y()); | 196 origin.Offset(-display_origin.x(), -display_origin.y()); |
197 window->SetBounds(gfx::Rect(origin, bounds_in_screen.size())); | 197 window->SetBounds(gfx::Rect(origin, bounds_in_screen.size())); |
198 } | 198 } |
199 | 199 |
200 } // namespace wm | 200 } // namespace wm |
201 } // namespace ash | 201 } // namespace ash |
OLD | NEW |