Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Side by Side Diff: ash/display/unified_mouse_warp_controller.h

Issue 1263853002: Unified Desktop: Support 2xDSF display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_UNIFIED_MOUSE_WARP_CONTROLLER_H 5 #ifndef ASH_DISPLAY_UNIFIED_MOUSE_WARP_CONTROLLER_H
6 #define ASH_DISPLAY_UNIFIED_MOUSE_WARP_CONTROLLER_H 6 #define ASH_DISPLAY_UNIFIED_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 "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 17 matching lines...) Expand all
28 public: 28 public:
29 UnifiedMouseWarpController(); 29 UnifiedMouseWarpController();
30 ~UnifiedMouseWarpController() override; 30 ~UnifiedMouseWarpController() override;
31 31
32 // MouseWarpController: 32 // MouseWarpController:
33 bool WarpMouseCursor(ui::MouseEvent* event) override; 33 bool WarpMouseCursor(ui::MouseEvent* event) override;
34 void SetEnabled(bool enabled) override; 34 void SetEnabled(bool enabled) override;
35 35
36 private: 36 private:
37 friend class test::DisplayManagerTestApi; 37 friend class test::DisplayManagerTestApi;
38 FRIEND_TEST_ALL_PREFIXES(UnifiedMouseWarpControllerTest, BoundaryTest); 38 friend class UnifiedMouseWarpControllerTest;
39 39
40 void ComputeBounds(); 40 void ComputeBounds();
41 41
42 // Warps the mouse cursor to an alternate root window when the 42 // Warps the mouse cursor to an alternate root window when the
43 // mouse location in |event|, hits the edge of the event target's root and 43 // mouse location in |event|, hits the edge of the event target's root and
44 // the mouse cursor is considered to be in an alternate display. 44 // the mouse cursor is considered to be in an alternate display.
45 // If |update_mouse_location_now| is true, 45 // If |update_mouse_location_now| is true,
46 // Returns true if/ the cursor was moved. 46 // Returns true if/ the cursor was moved.
47 bool WarpMouseCursorInNativeCoords(const gfx::Point& point_in_native, 47 bool WarpMouseCursorInNativeCoords(const gfx::Point& point_in_native,
48 const gfx::Point& point_in_screen, 48 const gfx::Point& point_in_screen,
49 bool update_mouse_location_now); 49 bool update_mouse_location_now);
50 50
51 void allow_non_native_event_for_test() { allow_non_native_event_ = true; } 51 void allow_non_native_event_for_test() { allow_non_native_event_ = true; }
52 52
53 gfx::Rect first_edge_bounds_in_native_; 53 gfx::Rect first_edge_bounds_in_native_;
54 gfx::Rect second_edge_bounds_in_native_; 54 gfx::Rect second_edge_bounds_in_native_;
55 55
56 bool allow_non_native_event_; 56 bool allow_non_native_event_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(UnifiedMouseWarpController); 58 DISALLOW_COPY_AND_ASSIGN(UnifiedMouseWarpController);
59 }; 59 };
60 60
61 } // namespace ash 61 } // namespace ash
62 62
63 #endif // ASH_DISPLAY_UNIFIED_MOUSE_WARP_CONTROLLER_H 63 #endif // ASH_DISPLAY_UNIFIED_MOUSE_WARP_CONTROLLER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698