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 11 matching lines...) Expand all Loading... |
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 AshTestBase; |
32 class DisplayManagerTestApi; | |
33 } | 32 } |
34 class SharedDisplayEdgeIndicator; | 33 class SharedDisplayEdgeIndicator; |
35 | 34 |
36 // A MouseWarpController used in extended display mode. | 35 // A MouseWarpController used in extended display mode. |
37 class ASH_EXPORT ExtendedMouseWarpController : public MouseWarpController { | 36 class ASH_EXPORT ExtendedMouseWarpController : public MouseWarpController { |
38 public: | 37 public: |
39 explicit ExtendedMouseWarpController(aura::Window* drag_source); | 38 explicit ExtendedMouseWarpController(aura::Window* drag_source); |
40 ~ExtendedMouseWarpController() override; | 39 ~ExtendedMouseWarpController() override; |
41 | 40 |
42 // MouseWarpController: | 41 // MouseWarpController: |
43 bool WarpMouseCursor(ui::MouseEvent* event) override; | 42 bool WarpMouseCursor(ui::MouseEvent* event) override; |
44 void SetEnabled(bool enable) override; | 43 void SetEnabled(bool enable) override; |
45 | 44 |
46 private: | 45 private: |
47 friend class test::AshTestBase; | 46 friend class test::AshTestBase; |
48 friend class test::DisplayManagerTestApi; | |
49 friend class ExtendedMouseWarpControllerTest; | 47 friend class ExtendedMouseWarpControllerTest; |
50 FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, | 48 FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, |
51 IndicatorBoundsTestThreeDisplays); | 49 IndicatorBoundsTestThreeDisplays); |
52 FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, | 50 FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, |
53 IndicatorBoundsTestThreeDisplaysWithLayout); | 51 IndicatorBoundsTestThreeDisplaysWithLayout); |
54 FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, | 52 FRIEND_TEST_ALL_PREFIXES(ExtendedMouseWarpControllerTest, |
55 IndicatorBoundsTestThreeDisplaysWithLayout2); | 53 IndicatorBoundsTestThreeDisplaysWithLayout2); |
56 | 54 |
57 // Defined in header file because tests need access. | 55 // Defined in header file because tests need access. |
58 class ASH_EXPORT WarpRegion { | 56 class ASH_EXPORT WarpRegion { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 bool enabled_; | 124 bool enabled_; |
127 | 125 |
128 bool allow_non_native_event_; | 126 bool allow_non_native_event_; |
129 | 127 |
130 DISALLOW_COPY_AND_ASSIGN(ExtendedMouseWarpController); | 128 DISALLOW_COPY_AND_ASSIGN(ExtendedMouseWarpController); |
131 }; | 129 }; |
132 | 130 |
133 } // namespace ash | 131 } // namespace ash |
134 | 132 |
135 #endif // ASH_DISPLAY_EXTENDED_MOUSE_WARP_CONTROLLER_H | 133 #endif // ASH_DISPLAY_EXTENDED_MOUSE_WARP_CONTROLLER_H |
OLD | NEW |