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

Unified Diff: ash/display/mouse_cursor_event_filter.h

Issue 405483005: Make old cursor warp mode ozone only (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gn fix Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/mouse_cursor_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/mouse_cursor_event_filter.h
diff --git a/ash/display/mouse_cursor_event_filter.h b/ash/display/mouse_cursor_event_filter.h
index 3c5304f3475e0668604d699d4145e9745f58b0ef..55de4a613e470482ba7a9b5de0c3a83af9bf3f6b 100644
--- a/ash/display/mouse_cursor_event_filter.h
+++ b/ash/display/mouse_cursor_event_filter.h
@@ -26,8 +26,6 @@ class SharedDisplayEdgeIndicator;
class ASH_EXPORT MouseCursorEventFilter : public ui::EventHandler,
public DisplayController::Observer {
public:
- static bool IsMouseWarpInNativeCoordsEnabled();
-
enum MouseWarpMode {
WARP_ALWAYS, // Always warp the mouse when possible.
WARP_DRAG, // Used when dragging a window. Top and bottom
@@ -71,17 +69,26 @@ class ASH_EXPORT MouseCursorEventFilter : public ui::EventHandler,
FRIEND_TEST_ALL_PREFIXES(DragWindowResizerTest, WarpMousePointer);
+ // Moves the cursor to the point inside the root that is closest to
+ // the point_in_screen, which is outside of the root window.
+ static void MoveCursorTo(aura::Window* root,
+ const gfx::Point& point_in_screen);
+
// Warps the mouse cursor to an alternate root window when the
// mouse location in |event|, hits the edge of the event target's root and
// the mouse cursor is considered to be in an alternate display.
// Returns true if/ the cursor was moved.
bool WarpMouseCursorIfNecessary(ui::MouseEvent* event);
- bool WarpMouseCursorInNativeCoords(const gfx::Point& point_in_native,
- const gfx::Point& point_in_screen);
+#if defined(USE_OZONE)
bool WarpMouseCursorInScreenCoords(aura::Window* target_root,
const gfx::Point& point_in_screen);
+#else
+ bool WarpMouseCursorInNativeCoords(const gfx::Point& point_in_native,
+ const gfx::Point& point_in_screen);
+#endif
+
// Update the edge/indicator bounds based on the current
// display configuration.
void UpdateHorizontalEdgeBounds();
« no previous file with comments | « ash/ash.gyp ('k') | ash/display/mouse_cursor_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698