OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/display/screen_position_controller.h" | 5 #include "ash/display/screen_position_controller.h" |
6 | 6 |
7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
11 #include "ash/wm/coordinate_conversion.h" | 11 #include "ash/wm/coordinate_conversion.h" |
12 #include "ash/wm/system_modal_container_layout_manager.h" | 12 #include "ash/wm/system_modal_container_layout_manager.h" |
13 #include "ash/wm/window_properties.h" | 13 #include "ash/wm/window_properties.h" |
14 #include "ui/aura/client/activation_client.h" | 14 #include "ui/aura/client/activation_client.h" |
15 #include "ui/aura/client/capture_client.h" | 15 #include "ui/aura/client/capture_client.h" |
16 #include "ui/aura/client/focus_client.h" | 16 #include "ui/aura/client/focus_client.h" |
17 #include "ui/aura/client/stacking_client.h" | |
18 #include "ui/aura/root_window.h" | 17 #include "ui/aura/root_window.h" |
19 #include "ui/aura/window_tracker.h" | 18 #include "ui/aura/window_tracker.h" |
20 #include "ui/compositor/dip_util.h" | 19 #include "ui/compositor/dip_util.h" |
21 #include "ui/gfx/display.h" | 20 #include "ui/gfx/display.h" |
22 #include "ui/gfx/screen.h" | 21 #include "ui/gfx/screen.h" |
23 | 22 |
24 namespace ash { | 23 namespace ash { |
25 namespace { | 24 namespace { |
26 | 25 |
27 // Return true if the window or its ancestor has |kStayInSameRootWindowkey| | 26 // Return true if the window or its ancestor has |kStayInSameRootWindowkey| |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 206 |
208 gfx::Point origin(bounds.origin()); | 207 gfx::Point origin(bounds.origin()); |
209 const gfx::Point display_origin = Shell::GetScreen()->GetDisplayNearestWindow( | 208 const gfx::Point display_origin = Shell::GetScreen()->GetDisplayNearestWindow( |
210 window).bounds().origin(); | 209 window).bounds().origin(); |
211 origin.Offset(-display_origin.x(), -display_origin.y()); | 210 origin.Offset(-display_origin.x(), -display_origin.y()); |
212 window->SetBounds(gfx::Rect(origin, bounds.size())); | 211 window->SetBounds(gfx::Rect(origin, bounds.size())); |
213 } | 212 } |
214 | 213 |
215 } // internal | 214 } // internal |
216 } // ash | 215 } // ash |
OLD | NEW |