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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 // Gesture Recognition ------------------------------------------------------- | 86 // Gesture Recognition ------------------------------------------------------- |
87 | 87 |
88 // When a touch event is dispatched to a Window, it may want to process the | 88 // 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 | 89 // touch event asynchronously. In such cases, the window should consume the |
90 // event during the event dispatch. Once the event is properly processed, the | 90 // event during the event dispatch. Once the event is properly processed, the |
91 // window should let the WindowEventDispatcher know about the result of the | 91 // window should let the WindowEventDispatcher know about the result of the |
92 // event processing, so that gesture events can be properly created and | 92 // event processing, so that gesture events can be properly created and |
93 // dispatched. |event|'s location should be in the dispatcher's coordinate | 93 // dispatched. |event|'s location should be in the dispatcher's coordinate |
94 // space, in DIPs. | 94 // space, in DIPs. |
95 void ProcessedTouchEvent(ui::TouchEvent* event, | 95 virtual void ProcessedTouchEvent(Window* window, ui::EventResult result); |
96 Window* window, | |
97 ui::EventResult result); | |
98 | 96 |
99 // These methods are used to defer the processing of mouse/touch events | 97 // These methods are used to defer the processing of mouse/touch events |
100 // related to resize. A client (typically a RenderWidgetHostViewAura) can call | 98 // related to resize. A client (typically a RenderWidgetHostViewAura) can call |
101 // HoldPointerMoves when an resize is initiated and then ReleasePointerMoves | 99 // HoldPointerMoves when an resize is initiated and then ReleasePointerMoves |
102 // once the resize is completed. | 100 // once the resize is completed. |
103 // | 101 // |
104 // More than one hold can be invoked and each hold must be cancelled by a | 102 // More than one hold can be invoked and each hold must be cancelled by a |
105 // release before we resume normal operation. | 103 // release before we resume normal operation. |
106 void HoldPointerMoves(); | 104 void HoldPointerMoves(); |
107 void ReleasePointerMoves(); | 105 void ReleasePointerMoves(); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 265 |
268 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. | 266 // Used to schedule DispatchHeldEvents() when |move_hold_count_| goes to 0. |
269 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; | 267 base::WeakPtrFactory<WindowEventDispatcher> held_event_factory_; |
270 | 268 |
271 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); | 269 DISALLOW_COPY_AND_ASSIGN(WindowEventDispatcher); |
272 }; | 270 }; |
273 | 271 |
274 } // namespace aura | 272 } // namespace aura |
275 | 273 |
276 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ | 274 #endif // UI_AURA_WINDOW_EVENT_DISPATCHER_H_ |
OLD | NEW |