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 #ifndef ASH_DISPLAY_EXTENDED_MOUSE_WARP_CONTROLLER_H | 5 #ifndef ASH_DISPLAY_EXTENDED_MOUSE_WARP_CONTROLLER_H |
6 #define ASH_DISPLAY_EXTENDED_MOUSE_WARP_CONTROLLER_H | 6 #define ASH_DISPLAY_EXTENDED_MOUSE_WARP_CONTROLLER_H |
7 | 7 |
8 #include "ash/display/mouse_warp_controller.h" | 8 #include "ash/display/mouse_warp_controller.h" |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace display { | 21 namespace display { |
22 class Display; | 22 class Display; |
23 } | 23 } |
24 | 24 |
25 namespace gfx { | 25 namespace gfx { |
26 class Point; | 26 class Point; |
27 } | 27 } |
28 | 28 |
29 namespace ash { | 29 namespace ash { |
30 namespace test { | 30 namespace test { |
| 31 class AshTestBase; |
31 class DisplayManagerTestApi; | 32 class DisplayManagerTestApi; |
32 } | 33 } |
33 class SharedDisplayEdgeIndicator; | 34 class SharedDisplayEdgeIndicator; |
34 | 35 |
35 // A MouseWarpController used in extended display mode. | 36 // A MouseWarpController used in extended display mode. |
36 class ASH_EXPORT ExtendedMouseWarpController : public MouseWarpController { | 37 class ASH_EXPORT ExtendedMouseWarpController : public MouseWarpController { |
37 public: | 38 public: |
38 explicit ExtendedMouseWarpController(aura::Window* drag_source); | 39 explicit ExtendedMouseWarpController(aura::Window* drag_source); |
39 ~ExtendedMouseWarpController() override; | 40 ~ExtendedMouseWarpController() override; |
40 | 41 |
41 // MouseWarpController: | 42 // MouseWarpController: |
42 bool WarpMouseCursor(ui::MouseEvent* event) override; | 43 bool WarpMouseCursor(ui::MouseEvent* event) override; |
43 void SetEnabled(bool enable) override; | 44 void SetEnabled(bool enable) override; |
44 | 45 |
45 private: | 46 private: |
| 47 friend class test::AshTestBase; |
46 friend class test::DisplayManagerTestApi; | 48 friend class test::DisplayManagerTestApi; |
47 friend class ExtendedMouseWarpControllerTest; | 49 friend class ExtendedMouseWarpControllerTest; |
48 FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, | 50 FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, |
49 IndicatorBoundsTestThreeDisplays); | 51 IndicatorBoundsTestThreeDisplays); |
50 FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, | 52 FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, |
51 IndicatorBoundsTestThreeDisplaysWithLayout); | 53 IndicatorBoundsTestThreeDisplaysWithLayout); |
52 FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, | 54 FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, |
53 IndicatorBoundsTestThreeDisplaysWithLayout2); | 55 IndicatorBoundsTestThreeDisplaysWithLayout2); |
54 | 56 |
55 // Defined in header file because tests need access. | 57 // Defined in header file because tests need access. |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 bool enabled_; | 126 bool enabled_; |
125 | 127 |
126 bool allow_non_native_event_; | 128 bool allow_non_native_event_; |
127 | 129 |
128 DISALLOW_COPY_AND_ASSIGN(ExtendedMouseWarpController); | 130 DISALLOW_COPY_AND_ASSIGN(ExtendedMouseWarpController); |
129 }; | 131 }; |
130 | 132 |
131 } // namespace ash | 133 } // namespace ash |
132 | 134 |
133 #endif // ASH_DISPLAY_EXTENDED_MOUSE_WARP_CONTROLLER_H | 135 #endif // ASH_DISPLAY_EXTENDED_MOUSE_WARP_CONTROLLER_H |
OLD | NEW |