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

Side by Side Diff: ui/aura/window_event_dispatcher.h

Issue 971753008: Do not show the mouse cursor when the display is rotated in TouchView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rotate_display
Patch Set: Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 5 #ifndef UI_AURA_WINDOW_EVENT_DISPATCHER_H_
6 #define UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 6 #define UI_AURA_WINDOW_EVENT_DISPATCHER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 void DispatchCancelModeEvent(); 77 void DispatchCancelModeEvent();
78 78
79 // Dispatches a ui::ET_MOUSE_EXITED event at |point| to the |target| 79 // Dispatches a ui::ET_MOUSE_EXITED event at |point| to the |target|
80 // If the |target| is NULL, we will dispatch the event to the root-window 80 // If the |target| is NULL, we will dispatch the event to the root-window
81 // TODO(beng): needed only for WTH::OnCursorVisibilityChanged(). 81 // TODO(beng): needed only for WTH::OnCursorVisibilityChanged().
82 ui::EventDispatchDetails DispatchMouseExitAtPoint(Window* target, 82 ui::EventDispatchDetails DispatchMouseExitAtPoint(Window* target,
83 const gfx::Point& point) 83 const gfx::Point& point)
84 WARN_UNUSED_RESULT; 84 WARN_UNUSED_RESULT;
85 85
86 // Posts a task to send synthesized mouse move event if there is no pending
87 // task.
88 void PostSynthesizeMouseMove();
89
86 // Gesture Recognition ------------------------------------------------------- 90 // Gesture Recognition -------------------------------------------------------
87 91
88 // When a touch event is dispatched to a Window, it may want to process the 92 // When a touch event is dispatched to a Window, it may want to process the
89 // touch event asynchronously. In such cases, the window should consume the 93 // touch event asynchronously. In such cases, the window should consume the
90 // event during the event dispatch. Once the event is properly processed, the 94 // event during the event dispatch. Once the event is properly processed, the
91 // window should let the WindowEventDispatcher know about the result of the 95 // window should let the WindowEventDispatcher know about the result of the
92 // event processing, so that gesture events can be properly created and 96 // event processing, so that gesture events can be properly created and
93 // dispatched. |event|'s location should be in the dispatcher's coordinate 97 // dispatched. |event|'s location should be in the dispatcher's coordinate
94 // space, in DIPs. 98 // space, in DIPs.
95 virtual void ProcessedTouchEvent(Window* window, ui::EventResult result); 99 virtual void ProcessedTouchEvent(Window* window, ui::EventResult result);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 215
212 // We hold and aggregate mouse drags and touch moves as a way of throttling 216 // We hold and aggregate mouse drags and touch moves as a way of throttling
213 // resizes when HoldMouseMoves() is called. The following methods are used to 217 // resizes when HoldMouseMoves() is called. The following methods are used to
214 // dispatch held and newly incoming mouse and touch events, typically when an 218 // dispatch held and newly incoming mouse and touch events, typically when an
215 // event other than one of these needs dispatching or a matching 219 // event other than one of these needs dispatching or a matching
216 // ReleaseMouseMoves()/ReleaseTouchMoves() is called. NOTE: because these 220 // ReleaseMouseMoves()/ReleaseTouchMoves() is called. NOTE: because these
217 // methods dispatch events from WindowTreeHost the coordinates are in terms of 221 // methods dispatch events from WindowTreeHost the coordinates are in terms of
218 // the root. 222 // the root.
219 ui::EventDispatchDetails DispatchHeldEvents() WARN_UNUSED_RESULT; 223 ui::EventDispatchDetails DispatchHeldEvents() WARN_UNUSED_RESULT;
220 224
221 // Posts a task to send synthesized mouse move event if there is no a pending
222 // task.
223 void PostSynthesizeMouseMove();
224
225 // Creates and dispatches synthesized mouse move event using the current mouse 225 // Creates and dispatches synthesized mouse move event using the current mouse
226 // location. 226 // location.
227 ui::EventDispatchDetails SynthesizeMouseMoveEvent() WARN_UNUSED_RESULT; 227 ui::EventDispatchDetails SynthesizeMouseMoveEvent() WARN_UNUSED_RESULT;
228 228
229 // Calls SynthesizeMouseMove() if |window| is currently visible and contains 229 // Calls SynthesizeMouseMove() if |window| is currently visible and contains
230 // the mouse cursor. 230 // the mouse cursor.
231 void SynthesizeMouseMoveAfterChangeToWindow(Window* window); 231 void SynthesizeMouseMoveAfterChangeToWindow(Window* window);
232 232
233 void PreDispatchLocatedEvent(Window* target, ui::LocatedEvent* event); 233 void PreDispatchLocatedEvent(Window* target, ui::LocatedEvent* event);
234 void PreDispatchMouseEvent(Window* target, ui::MouseEvent* event); 234 void PreDispatchMouseEvent(Window* target, ui::MouseEvent* event);
(...skipping 30 matching lines...) Expand all
265 265
266 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. 266 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0.
267 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; 267 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_;
268 268
269 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); 269 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher);
270 }; 270 };
271 271
272 } // namespace aura 272 } // namespace aura
273 273
274 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 274 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698