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

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

Issue 278183002: Revert of Unified Gesture Recognizer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/window_event_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 // Repost event for re-processing. Used when exiting context menus. 65 // Repost event for re-processing. Used when exiting context menus.
66 // We only support the ET_MOUSE_PRESSED and ET_GESTURE_TAP_DOWN event 66 // We only support the ET_MOUSE_PRESSED and ET_GESTURE_TAP_DOWN event
67 // types (although the latter is currently a no-op). 67 // types (although the latter is currently a no-op).
68 void RepostEvent(const ui::LocatedEvent& event); 68 void RepostEvent(const ui::LocatedEvent& event);
69 69
70 // Invoked when the mouse events get enabled or disabled. 70 // Invoked when the mouse events get enabled or disabled.
71 void OnMouseEventsEnableStateChanged(bool enabled); 71 void OnMouseEventsEnableStateChanged(bool enabled);
72 72
73 void DispatchCancelModeEvent(); 73 void DispatchCancelModeEvent();
74 74
75 // Handles a gesture event. Returns true if handled. Unlike the other
76 // event-dispatching function (e.g. for touch/mouse/keyboard events), gesture
77 // events are dispatched from GestureRecognizer instead of WindowTreeHost.
78 void DispatchGestureEvent(ui::GestureEvent* event);
79
75 // Dispatches a ui::ET_MOUSE_EXITED event at |point|. 80 // Dispatches a ui::ET_MOUSE_EXITED event at |point|.
76 // TODO(beng): needed only for WTH::OnCursorVisibilityChanged(). 81 // TODO(beng): needed only for WTH::OnCursorVisibilityChanged().
77 void DispatchMouseExitAtPoint(const gfx::Point& point); 82 void DispatchMouseExitAtPoint(const gfx::Point& point);
78 83
79 // Gesture Recognition ------------------------------------------------------- 84 // Gesture Recognition -------------------------------------------------------
80 85
81 // When a touch event is dispatched to a Window, it may want to process the 86 // When a touch event is dispatched to a Window, it may want to process the
82 // touch event asynchronously. In such cases, the window should consume the 87 // touch event asynchronously. In such cases, the window should consume the
83 // event during the event dispatch. Once the event is properly processed, the 88 // event during the event dispatch. Once the event is properly processed, the
84 // window should let the WindowEventDispatcher know about the result of the 89 // window should let the WindowEventDispatcher know about the result of the
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 177
173 // Overridden from ui::EventDispatcherDelegate. 178 // Overridden from ui::EventDispatcherDelegate.
174 virtual bool CanDispatchToTarget(ui::EventTarget* target) OVERRIDE; 179 virtual bool CanDispatchToTarget(ui::EventTarget* target) OVERRIDE;
175 virtual ui::EventDispatchDetails PreDispatchEvent(ui::EventTarget* target, 180 virtual ui::EventDispatchDetails PreDispatchEvent(ui::EventTarget* target,
176 ui::Event* event) OVERRIDE; 181 ui::Event* event) OVERRIDE;
177 virtual ui::EventDispatchDetails PostDispatchEvent( 182 virtual ui::EventDispatchDetails PostDispatchEvent(
178 ui::EventTarget* target, const ui::Event& event) OVERRIDE; 183 ui::EventTarget* target, const ui::Event& event) OVERRIDE;
179 184
180 // Overridden from ui::GestureEventHelper. 185 // Overridden from ui::GestureEventHelper.
181 virtual bool CanDispatchToConsumer(ui::GestureConsumer* consumer) OVERRIDE; 186 virtual bool CanDispatchToConsumer(ui::GestureConsumer* consumer) OVERRIDE;
182 virtual void DispatchGestureEvent(ui::GestureEvent* event) OVERRIDE; 187 virtual void DispatchPostponedGestureEvent(ui::GestureEvent* event) OVERRIDE;
183 virtual void DispatchCancelTouchEvent(ui::TouchEvent* event) OVERRIDE; 188 virtual void DispatchCancelTouchEvent(ui::TouchEvent* event) OVERRIDE;
184 189
185 // Overridden from WindowObserver: 190 // Overridden from WindowObserver:
186 virtual void OnWindowDestroying(Window* window) OVERRIDE; 191 virtual void OnWindowDestroying(Window* window) OVERRIDE;
187 virtual void OnWindowDestroyed(Window* window) OVERRIDE; 192 virtual void OnWindowDestroyed(Window* window) OVERRIDE;
188 virtual void OnWindowAddedToRootWindow(Window* window) OVERRIDE; 193 virtual void OnWindowAddedToRootWindow(Window* window) OVERRIDE;
189 virtual void OnWindowRemovingFromRootWindow(Window* window, 194 virtual void OnWindowRemovingFromRootWindow(Window* window,
190 Window* new_root) OVERRIDE; 195 Window* new_root) OVERRIDE;
191 virtual void OnWindowVisibilityChanging(Window* window, 196 virtual void OnWindowVisibilityChanging(Window* window,
192 bool visible) OVERRIDE; 197 bool visible) OVERRIDE;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 261
257 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. 262 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0.
258 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; 263 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_;
259 264
260 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); 265 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher);
261 }; 266 };
262 267
263 } // namespace aura 268 } // namespace aura
264 269
265 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ 270 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_
OLDNEW
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/window_event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698