Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 PointerEventManager_h | 5 #ifndef PointerEventManager_h |
| 6 #define PointerEventManager_h | 6 #define PointerEventManager_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/events/PointerEvent.h" | 9 #include "core/events/PointerEvent.h" |
| 10 #include "core/events/PointerEventFactory.h" | 10 #include "core/events/PointerEventFactory.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 // Inhibits firing of touch-type PointerEvents until unblocked by | 134 // Inhibits firing of touch-type PointerEvents until unblocked by |
| 135 // unblockTouchPointers(). Also sends pointercancels for existing touch-type | 135 // unblockTouchPointers(). Also sends pointercancels for existing touch-type |
| 136 // PointerEvents. See: | 136 // PointerEvents. See: |
| 137 // www.w3.org/TR/pointerevents/#declaring-candidate-regions-for-default-touch- behaviors | 137 // www.w3.org/TR/pointerevents/#declaring-candidate-regions-for-default-touch- behaviors |
| 138 void BlockTouchPointers(TimeTicks platform_time_stamp); | 138 void BlockTouchPointers(TimeTicks platform_time_stamp); |
| 139 | 139 |
| 140 // Enables firing of touch-type PointerEvents after they were inhibited by | 140 // Enables firing of touch-type PointerEvents after they were inhibited by |
| 141 // blockTouchPointers(). | 141 // blockTouchPointers(). |
| 142 void UnblockTouchPointers(); | 142 void UnblockTouchPointers(); |
| 143 | 143 |
| 144 // Generate the TouchInfos for a WebTouchEvent, hit-testing as necessary. | 144 // Generate PointerEventTarget for a WebTouchPoint, hit-testing as necessary. |
|
mustaq
2017/05/31 18:22:44
Nit: "Returns..."
Navid Zolghadr
2017/06/01 17:57:51
Done.
| |
| 145 void ComputeTouchTargets(const WebTouchEvent&, | 145 EventHandlingUtil::PointerEventTarget ComputePointerEventTarget( |
| 146 HeapVector<TouchEventManager::TouchInfo>&); | 146 const WebTouchPoint&); |
| 147 | 147 |
| 148 // Sends touch pointer events and sets consumed bits in TouchInfo array | 148 // Sends touch pointer events and sets consumed bits in TouchInfo array |
| 149 // based on the return value of pointer event handlers. | 149 // based on the return value of pointer event handlers. |
| 150 void DispatchTouchPointerEvents(const WebTouchEvent&, | 150 void DispatchTouchPointerEvent( |
| 151 const Vector<WebTouchEvent>& coalesced_events, | 151 const WebTouchPoint&, |
| 152 HeapVector<TouchEventManager::TouchInfo>&); | 152 const EventHandlingUtil::PointerEventTarget&, |
| 153 const Vector<std::pair<WebTouchPoint, TimeTicks>>& coalesced_events, | |
| 154 WebInputEvent::Modifiers, | |
| 155 double timestamp, | |
| 156 uint32_t unique_touch_event_id); | |
| 153 | 157 |
| 154 // Returns whether the event is consumed or not. | 158 // Returns whether the event is consumed or not. |
| 155 WebInputEventResult SendTouchPointerEvent(EventTarget*, PointerEvent*); | 159 WebInputEventResult SendTouchPointerEvent(EventTarget*, PointerEvent*); |
| 156 | 160 |
| 157 void SendBoundaryEvents(EventTarget* exited_target, | 161 void SendBoundaryEvents(EventTarget* exited_target, |
| 158 EventTarget* entered_target, | 162 EventTarget* entered_target, |
| 159 PointerEvent*); | 163 PointerEvent*); |
| 160 void SetNodeUnderPointer(PointerEvent*, EventTarget*); | 164 void SetNodeUnderPointer(PointerEvent*, EventTarget*); |
| 161 | 165 |
| 162 // Processes the assignment of |m_pointerCaptureTarget| from | 166 // Processes the assignment of |m_pointerCaptureTarget| from |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 Member<MouseEventManager> mouse_event_manager_; | 232 Member<MouseEventManager> mouse_event_manager_; |
| 229 | 233 |
| 230 // The pointerId of the PointerEvent currently being dispatched within this | 234 // The pointerId of the PointerEvent currently being dispatched within this |
| 231 // frame or 0 if none. | 235 // frame or 0 if none. |
| 232 int dispatching_pointer_id_; | 236 int dispatching_pointer_id_; |
| 233 }; | 237 }; |
| 234 | 238 |
| 235 } // namespace blink | 239 } // namespace blink |
| 236 | 240 |
| 237 #endif // PointerEventManager_h | 241 #endif // PointerEventManager_h |
| OLD | NEW |