OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/unified_mouse_warp_controller.h" | 5 #include "ash/display/unified_mouse_warp_controller.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
10 #include "ash/display/display_util.h" | 10 #include "ash/display/display_util.h" |
11 #include "ash/display/mirror_window_controller.h" | 11 #include "ash/display/mirror_window_controller.h" |
12 #include "ash/display/window_tree_host_manager.h" | 12 #include "ash/display/window_tree_host_manager.h" |
13 #include "ash/host/ash_window_tree_host.h" | 13 #include "ash/host/ash_window_tree_host.h" |
14 #include "ash/shell.h" | 14 #include "ash/shell.h" |
15 #include "ui/aura/client/cursor_client.h" | 15 #include "ui/aura/client/cursor_client.h" |
16 #include "ui/aura/window.h" | 16 #include "ui/aura/window.h" |
17 #include "ui/aura/window_tree_host.h" | 17 #include "ui/aura/window_tree_host.h" |
18 #include "ui/base/layout.h" | 18 #include "ui/base/layout.h" |
19 #include "ui/events/event_utils.h" | 19 #include "ui/events/event_utils.h" |
20 #include "ui/gfx/screen.h" | 20 #include "ui/gfx/screen.h" |
21 #include "ui/wm/core/coordinate_conversion.h" | 21 #include "ui/wm/core/coordinate_conversion.h" |
22 | 22 |
23 namespace ash { | 23 namespace ash { |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 AshWindowTreeHost* GetMirroringAshWindowTreeHostForDisplayId(int64 display_id) { | 27 AshWindowTreeHost* GetMirroringAshWindowTreeHostForDisplayId( |
| 28 int64_t display_id) { |
28 return Shell::GetInstance() | 29 return Shell::GetInstance() |
29 ->window_tree_host_manager() | 30 ->window_tree_host_manager() |
30 ->mirror_window_controller() | 31 ->mirror_window_controller() |
31 ->GetAshWindowTreeHostForDisplayId(display_id); | 32 ->GetAshWindowTreeHostForDisplayId(display_id); |
32 } | 33 } |
33 | 34 |
34 #if defined(USE_OZONE) | 35 #if defined(USE_OZONE) |
35 // Find a WindowTreeHost used for mirroring displays that contains | 36 // Find a WindowTreeHost used for mirroring displays that contains |
36 // the |point_in_screen|. Returns nullptr if such WTH does not exist. | 37 // the |point_in_screen|. Returns nullptr if such WTH does not exist. |
37 aura::WindowTreeHost* FindMirroringWindowTreeHostFromScreenPoint( | 38 aura::WindowTreeHost* FindMirroringWindowTreeHostFromScreenPoint( |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 in_first_edge ? display_list[0].id() : display_list[1].id(); | 164 in_first_edge ? display_list[0].id() : display_list[1].id(); |
164 AshWindowTreeHost* target_ash_host = | 165 AshWindowTreeHost* target_ash_host = |
165 GetMirroringAshWindowTreeHostForDisplayId( | 166 GetMirroringAshWindowTreeHostForDisplayId( |
166 in_first_edge ? display_list[1].id() : display_list[0].id()); | 167 in_first_edge ? display_list[1].id() : display_list[0].id()); |
167 MoveCursorTo(target_ash_host, point_in_unified_host, | 168 MoveCursorTo(target_ash_host, point_in_unified_host, |
168 update_mouse_location_now); | 169 update_mouse_location_now); |
169 return true; | 170 return true; |
170 } | 171 } |
171 | 172 |
172 } // namespace ash | 173 } // namespace ash |
OLD | NEW |