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 #ifndef ASH_DISPLAY_DISPLAY_UTIL_H_ | 5 #ifndef ASH_DISPLAY_DISPLAY_UTIL_H_ |
6 #define ASH_DISPLAY_DISPLAY_UTIL_H_ | 6 #define ASH_DISPLAY_DISPLAY_UTIL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 | 12 |
13 namespace aura { | 13 namespace aura { |
14 class Window; | 14 class Window; |
15 } | 15 } |
16 | 16 |
17 namespace display { | 17 namespace display { |
| 18 class DisplayManager; |
18 class ManagedDisplayInfo; | 19 class ManagedDisplayInfo; |
19 } | 20 } |
20 | 21 |
21 namespace gfx { | 22 namespace gfx { |
22 class Point; | 23 class Point; |
23 class Rect; | 24 class Rect; |
24 } | 25 } |
25 | 26 |
26 namespace ash { | 27 namespace ash { |
27 class AshWindowTreeHost; | 28 class AshWindowTreeHost; |
28 class DisplayManager; | |
29 class MouseWarpController; | 29 class MouseWarpController; |
30 | 30 |
31 // Creates a MouseWarpController for the current display | 31 // Creates a MouseWarpController for the current display |
32 // configuration. |drag_source| is the window where dragging | 32 // configuration. |drag_source| is the window where dragging |
33 // started, or nullptr otherwise. | 33 // started, or nullptr otherwise. |
34 std::unique_ptr<MouseWarpController> CreateMouseWarpController( | 34 std::unique_ptr<MouseWarpController> CreateMouseWarpController( |
35 DisplayManager* manager, | 35 display::DisplayManager* manager, |
36 aura::Window* drag_source); | 36 aura::Window* drag_source); |
37 | 37 |
38 // Creates edge bounds from |bounds_in_screen| that fits the edge | 38 // Creates edge bounds from |bounds_in_screen| that fits the edge |
39 // of the native window for |ash_host|. | 39 // of the native window for |ash_host|. |
40 ASH_EXPORT gfx::Rect GetNativeEdgeBounds(AshWindowTreeHost* ash_host, | 40 ASH_EXPORT gfx::Rect GetNativeEdgeBounds(AshWindowTreeHost* ash_host, |
41 const gfx::Rect& bounds_in_screen); | 41 const gfx::Rect& bounds_in_screen); |
42 | 42 |
43 // Moves the cursor to the point inside the |ash_host| that is closest to | 43 // Moves the cursor to the point inside the |ash_host| that is closest to |
44 // the point_in_screen, which may be outside of the root window. | 44 // the point_in_screen, which may be outside of the root window. |
45 // |update_last_loation_now| is used for the test to update the mouse | 45 // |update_last_loation_now| is used for the test to update the mouse |
46 // location synchronously. | 46 // location synchronously. |
47 void MoveCursorTo(AshWindowTreeHost* ash_host, | 47 void MoveCursorTo(AshWindowTreeHost* ash_host, |
48 const gfx::Point& point_in_screen, | 48 const gfx::Point& point_in_screen, |
49 bool update_last_location_now); | 49 bool update_last_location_now); |
50 | 50 |
51 #if defined(OS_CHROMEOS) | 51 #if defined(OS_CHROMEOS) |
52 // Shows the notification message for display related issues. | 52 // Shows the notification message for display related issues. |
53 void ShowDisplayErrorNotification(int message_id); | 53 void ShowDisplayErrorNotification(int message_id); |
54 #endif | 54 #endif |
55 | 55 |
56 ASH_EXPORT base::string16 GetDisplayErrorNotificationMessageForTest(); | 56 ASH_EXPORT base::string16 GetDisplayErrorNotificationMessageForTest(); |
57 | 57 |
58 } // namespace ash | 58 } // namespace ash |
59 | 59 |
60 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ | 60 #endif // ASH_DISPLAY_DISPLAY_UTIL_H_ |
OLD | NEW |