| 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 16 matching lines...) Expand all Loading... |
| 27 WTF_MAKE_NONCOPYABLE(PointerEventManager); | 27 WTF_MAKE_NONCOPYABLE(PointerEventManager); |
| 28 | 28 |
| 29 public: | 29 public: |
| 30 PointerEventManager(LocalFrame*, MouseEventManager*); | 30 PointerEventManager(LocalFrame*, MouseEventManager*); |
| 31 DECLARE_TRACE(); | 31 DECLARE_TRACE(); |
| 32 | 32 |
| 33 // Sends the mouse pointer events and the boundary events | 33 // Sends the mouse pointer events and the boundary events |
| 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(Node* target, | 37 WebInputEventResult sendMousePointerEvent( |
| 38 const AtomicString& type, | 38 Node* target, |
| 39 const PlatformMouseEvent&); | 39 const AtomicString& type, |
| 40 const PlatformMouseEvent&, |
| 41 const Vector<PlatformMouseEvent>& coalescedEvents); |
| 40 | 42 |
| 41 WebInputEventResult handleTouchEvents(const PlatformTouchEvent&); | 43 WebInputEventResult handleTouchEvents( |
| 44 const PlatformTouchEvent&, |
| 45 const Vector<PlatformTouchEvent>& coalescedEvents); |
| 42 | 46 |
| 43 // Sends boundary events pointerout/leave/over/enter and | 47 // Sends boundary events pointerout/leave/over/enter and |
| 44 // mouseout/leave/over/enter to the corresponding targets. | 48 // mouseout/leave/over/enter to the corresponding targets. |
| 45 // inside the document. This functions handles the cases that pointer is | 49 // inside the document. This functions handles the cases that pointer is |
| 46 // 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) |
| 47 // and their corresponding boundary events will be handled altogether by | 51 // and their corresponding boundary events will be handled altogether by |
| 48 // sendMousePointerEvent function. | 52 // sendMousePointerEvent function. |
| 49 void sendMouseAndPointerBoundaryEvents(Node* enteredNode, | 53 void sendMouseAndPointerBoundaryEvents(Node* enteredNode, |
| 50 const PlatformMouseEvent&); | 54 const PlatformMouseEvent&); |
| 51 | 55 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // PointerEvents. See: | 135 // PointerEvents. See: |
| 132 // www.w3.org/TR/pointerevents/#declaring-candidate-regions-for-default-touch-
behaviors | 136 // www.w3.org/TR/pointerevents/#declaring-candidate-regions-for-default-touch-
behaviors |
| 133 void blockTouchPointers(); | 137 void blockTouchPointers(); |
| 134 | 138 |
| 135 // Enables firing of touch-type PointerEvents after they were inhibited by | 139 // Enables firing of touch-type PointerEvents after they were inhibited by |
| 136 // blockTouchPointers(). | 140 // blockTouchPointers(). |
| 137 void unblockTouchPointers(); | 141 void unblockTouchPointers(); |
| 138 | 142 |
| 139 // Sends touch pointer events and sets consumed bits in TouchInfo array | 143 // Sends touch pointer events and sets consumed bits in TouchInfo array |
| 140 // based on the return value of pointer event handlers. | 144 // based on the return value of pointer event handlers. |
| 141 void dispatchTouchPointerEvents(const PlatformTouchEvent&, | 145 void dispatchTouchPointerEvents( |
| 142 HeapVector<TouchEventManager::TouchInfo>&); | 146 const PlatformTouchEvent&, |
| 147 const Vector<PlatformTouchEvent>& coalescedEvents, |
| 148 HeapVector<TouchEventManager::TouchInfo>&); |
| 143 | 149 |
| 144 // Returns whether the event is consumed or not. | 150 // Returns whether the event is consumed or not. |
| 145 WebInputEventResult sendTouchPointerEvent(EventTarget*, PointerEvent*); | 151 WebInputEventResult sendTouchPointerEvent(EventTarget*, PointerEvent*); |
| 146 | 152 |
| 147 void sendBoundaryEvents(EventTarget* exitedTarget, | 153 void sendBoundaryEvents(EventTarget* exitedTarget, |
| 148 EventTarget* enteredTarget, | 154 EventTarget* enteredTarget, |
| 149 PointerEvent*); | 155 PointerEvent*); |
| 150 void setNodeUnderPointer(PointerEvent*, EventTarget*); | 156 void setNodeUnderPointer(PointerEvent*, EventTarget*); |
| 151 | 157 |
| 152 // Processes the assignment of |m_pointerCaptureTarget| from | 158 // Processes the assignment of |m_pointerCaptureTarget| from |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 PointerCapturingMap m_pendingPointerCaptureTarget; | 219 PointerCapturingMap m_pendingPointerCaptureTarget; |
| 214 | 220 |
| 215 PointerEventFactory m_pointerEventFactory; | 221 PointerEventFactory m_pointerEventFactory; |
| 216 Member<TouchEventManager> m_touchEventManager; | 222 Member<TouchEventManager> m_touchEventManager; |
| 217 Member<MouseEventManager> m_mouseEventManager; | 223 Member<MouseEventManager> m_mouseEventManager; |
| 218 }; | 224 }; |
| 219 | 225 |
| 220 } // namespace blink | 226 } // namespace blink |
| 221 | 227 |
| 222 #endif // PointerEventManager_h | 228 #endif // PointerEventManager_h |
| OLD | NEW |