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 23 matching lines...) Expand all Loading... |
34 // that it may cause. It also sends the compat mouse events | 34 // that it may cause. It also sends the compat mouse events |
35 // and sets the newNodeUnderMouse if the capturing is set | 35 // and sets the newNodeUnderMouse if the capturing is set |
36 // in this function. | 36 // in this function. |
37 WebInputEventResult sendMousePointerEvent( | 37 WebInputEventResult sendMousePointerEvent( |
38 Node* target, | 38 Node* target, |
39 const AtomicString& type, | 39 const AtomicString& type, |
40 const PlatformMouseEvent&, | 40 const PlatformMouseEvent&, |
41 const Vector<PlatformMouseEvent>& coalescedEvents); | 41 const Vector<PlatformMouseEvent>& coalescedEvents); |
42 | 42 |
43 WebInputEventResult handleTouchEvents( | 43 WebInputEventResult handleTouchEvents( |
44 const PlatformTouchEvent&, | 44 const WebTouchEvent&, |
45 const Vector<PlatformTouchEvent>& coalescedEvents); | 45 const Vector<WebTouchEvent>& coalescedEvents); |
46 | 46 |
47 // Sends boundary events pointerout/leave/over/enter and | 47 // Sends boundary events pointerout/leave/over/enter and |
48 // mouseout/leave/over/enter to the corresponding targets. | 48 // mouseout/leave/over/enter to the corresponding targets. |
49 // inside the document. This functions handles the cases that pointer is | 49 // inside the document. This functions handles the cases that pointer is |
50 // leaving a frame. Note that normal mouse events (e.g. mousemove/down/up) | 50 // leaving a frame. Note that normal mouse events (e.g. mousemove/down/up) |
51 // and their corresponding boundary events will be handled altogether by | 51 // and their corresponding boundary events will be handled altogether by |
52 // sendMousePointerEvent function. | 52 // sendMousePointerEvent function. |
53 void sendMouseAndPointerBoundaryEvents(Node* enteredNode, | 53 void sendMouseAndPointerBoundaryEvents(Node* enteredNode, |
54 const PlatformMouseEvent&); | 54 const PlatformMouseEvent&); |
55 | 55 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // Inhibits firing of touch-type PointerEvents until unblocked by | 129 // Inhibits firing of touch-type PointerEvents until unblocked by |
130 // unblockTouchPointers(). Also sends pointercancels for existing touch-type | 130 // unblockTouchPointers(). Also sends pointercancels for existing touch-type |
131 // PointerEvents. See: | 131 // PointerEvents. See: |
132 // www.w3.org/TR/pointerevents/#declaring-candidate-regions-for-default-touch-
behaviors | 132 // www.w3.org/TR/pointerevents/#declaring-candidate-regions-for-default-touch-
behaviors |
133 void blockTouchPointers(); | 133 void blockTouchPointers(); |
134 | 134 |
135 // Enables firing of touch-type PointerEvents after they were inhibited by | 135 // Enables firing of touch-type PointerEvents after they were inhibited by |
136 // blockTouchPointers(). | 136 // blockTouchPointers(). |
137 void unblockTouchPointers(); | 137 void unblockTouchPointers(); |
138 | 138 |
139 // Generate the TouchInfos for a PlatformTouchEvent, hit-testing as necessary. | 139 // Generate the TouchInfos for a WebTouchEvent, hit-testing as necessary. |
140 void computeTouchTargets(const PlatformTouchEvent&, | 140 void computeTouchTargets(const WebTouchEvent&, |
141 HeapVector<TouchEventManager::TouchInfo>&); | 141 HeapVector<TouchEventManager::TouchInfo>&); |
142 | 142 |
143 // Sends touch pointer events and sets consumed bits in TouchInfo array | 143 // Sends touch pointer events and sets consumed bits in TouchInfo array |
144 // based on the return value of pointer event handlers. | 144 // based on the return value of pointer event handlers. |
145 void dispatchTouchPointerEvents( | 145 void dispatchTouchPointerEvents(const WebTouchEvent&, |
146 const PlatformTouchEvent&, | 146 const Vector<WebTouchEvent>& coalescedEvents, |
147 const Vector<PlatformTouchEvent>& coalescedEvents, | 147 HeapVector<TouchEventManager::TouchInfo>&); |
148 HeapVector<TouchEventManager::TouchInfo>&); | |
149 | 148 |
150 // Returns whether the event is consumed or not. | 149 // Returns whether the event is consumed or not. |
151 WebInputEventResult sendTouchPointerEvent(EventTarget*, PointerEvent*); | 150 WebInputEventResult sendTouchPointerEvent(EventTarget*, PointerEvent*); |
152 | 151 |
153 void sendBoundaryEvents(EventTarget* exitedTarget, | 152 void sendBoundaryEvents(EventTarget* exitedTarget, |
154 EventTarget* enteredTarget, | 153 EventTarget* enteredTarget, |
155 PointerEvent*); | 154 PointerEvent*); |
156 void setNodeUnderPointer(PointerEvent*, EventTarget*); | 155 void setNodeUnderPointer(PointerEvent*, EventTarget*); |
157 | 156 |
158 // Processes the assignment of |m_pointerCaptureTarget| from | 157 // Processes the assignment of |m_pointerCaptureTarget| from |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 PointerCapturingMap m_pendingPointerCaptureTarget; | 218 PointerCapturingMap m_pendingPointerCaptureTarget; |
220 | 219 |
221 PointerEventFactory m_pointerEventFactory; | 220 PointerEventFactory m_pointerEventFactory; |
222 Member<TouchEventManager> m_touchEventManager; | 221 Member<TouchEventManager> m_touchEventManager; |
223 Member<MouseEventManager> m_mouseEventManager; | 222 Member<MouseEventManager> m_mouseEventManager; |
224 }; | 223 }; |
225 | 224 |
226 } // namespace blink | 225 } // namespace blink |
227 | 226 |
228 #endif // PointerEventManager_h | 227 #endif // PointerEventManager_h |
OLD | NEW |