OLD | NEW |
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // touch event asynchronously. In such cases, the window should consume the | 87 // touch event asynchronously. In such cases, the window should consume the |
88 // 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 |
89 // window should let the WindowEventDispatcher know about the result of the | 89 // window should let the WindowEventDispatcher know about the result of the |
90 // event processing, so that gesture events can be properly created and | 90 // event processing, so that gesture events can be properly created and |
91 // dispatched. |event|'s location should be in the dispatcher's coordinate | 91 // dispatched. |event|'s location should be in the dispatcher's coordinate |
92 // space, in DIPs. | 92 // space, in DIPs. |
93 void ProcessedTouchEvent(ui::TouchEvent* event, | 93 void ProcessedTouchEvent(ui::TouchEvent* event, |
94 Window* window, | 94 Window* window, |
95 ui::EventResult result); | 95 ui::EventResult result); |
96 | 96 |
| 97 // If a touch is given to the gesture recognizer, but is later |
| 98 // determined to be invalid, it should be marked as invalid using this |
| 99 // method. The invalid touch event must be the most recent touch |
| 100 // event given to the gesture recognizer. |
| 101 void IgnoreLastTouchEvent(Window* window); |
| 102 |
97 // These methods are used to defer the processing of mouse/touch events | 103 // These methods are used to defer the processing of mouse/touch events |
98 // related to resize. A client (typically a RenderWidgetHostViewAura) can call | 104 // related to resize. A client (typically a RenderWidgetHostViewAura) can call |
99 // HoldPointerMoves when an resize is initiated and then ReleasePointerMoves | 105 // HoldPointerMoves when an resize is initiated and then ReleasePointerMoves |
100 // once the resize is completed. | 106 // once the resize is completed. |
101 // | 107 // |
102 // More than one hold can be invoked and each hold must be cancelled by a | 108 // More than one hold can be invoked and each hold must be cancelled by a |
103 // release before we resume normal operation. | 109 // release before we resume normal operation. |
104 void HoldPointerMoves(); | 110 void HoldPointerMoves(); |
105 void ReleasePointerMoves(); | 111 void ReleasePointerMoves(); |
106 | 112 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 268 |
263 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. | 269 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. |
264 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; | 270 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; |
265 | 271 |
266 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); | 272 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); |
267 }; | 273 }; |
268 | 274 |
269 } // namespace aura | 275 } // namespace aura |
270 | 276 |
271 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 277 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
OLD | NEW |