| 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 <vector> | 10 #include <vector> |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 // Warps the mouse cursor to an alternate root window when the | 99 // Warps the mouse cursor to an alternate root window when the |
| 100 // mouse location in |event|, hits the edge of the event target's root and | 100 // mouse location in |event|, hits the edge of the event target's root and |
| 101 // the mouse cursor is considered to be in an alternate display. | 101 // the mouse cursor is considered to be in an alternate display. |
| 102 // If |update_mouse_location_now| is true, | 102 // If |update_mouse_location_now| is true, |
| 103 // Returns true if/ the cursor was moved. | 103 // Returns true if/ the cursor was moved. |
| 104 bool WarpMouseCursorInNativeCoords(const gfx::Point& point_in_native, | 104 bool WarpMouseCursorInNativeCoords(const gfx::Point& point_in_native, |
| 105 const gfx::Point& point_in_screen, | 105 const gfx::Point& point_in_screen, |
| 106 bool update_mouse_location_now); | 106 bool update_mouse_location_now); |
| 107 | 107 |
| 108 // Creates WarpRegion between display |a| and | 108 // Creates WarpRegion between display |a| and |b|. |
| 109 // |b|. |drag_source_dispaly_id| is used to indicate in which | 109 // |drag_source_dispaly_id| is used to indicate in which display a |
| 110 // display a drag is started, or invalid id passed if this is not | 110 // drag is started, or invalid id passed if this is not for |
| 111 // for dragging. Returns null scoped_ptr if two displays do not | 111 // dragging. Returns null scoped_ptr if two displays do not share |
| 112 // share the edge. | 112 // the edge. |
| 113 scoped_ptr<WarpRegion> CreateWarpRegion(const gfx::Display& a, | 113 scoped_ptr<WarpRegion> CreateWarpRegion(const gfx::Display& a, |
| 114 const gfx::Display& b, | 114 const gfx::Display& b, |
| 115 int64_t drag_source_dispay_id); | 115 int64_t drag_source_dispay_id); |
| 116 | 116 |
| 117 void allow_non_native_event_for_test() { allow_non_native_event_ = true; } | 117 void allow_non_native_event_for_test() { allow_non_native_event_ = true; } |
| 118 | 118 |
| 119 // The root window in which the dragging started. | 119 // The root window in which the dragging started. |
| 120 aura::Window* drag_source_root_; | 120 aura::Window* drag_source_root_; |
| 121 | 121 |
| 122 bool enabled_; | 122 bool enabled_; |
| 123 | 123 |
| 124 bool allow_non_native_event_; | 124 bool allow_non_native_event_; |
| 125 | 125 |
| 126 DISALLOW_COPY_AND_ASSIGN(ExtendedMouseWarpController); | 126 DISALLOW_COPY_AND_ASSIGN(ExtendedMouseWarpController); |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 } // namespace ash | 129 } // namespace ash |
| 130 | 130 |
| 131 #endif // ASH_DISPLAY_EXTENDED_MOUSE_WARP_CONTROLLER_H | 131 #endif // ASH_DISPLAY_EXTENDED_MOUSE_WARP_CONTROLLER_H |
| OLD | NEW |