Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/core/input/PointerEventManager.h

Issue 2510133002: Add getCoalescedEvents API to PointerEvent (Closed)
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Generate the TouchInfos for a PlatformTouchEvent, hit-testing as necessary. 143 // Generate the TouchInfos for a PlatformTouchEvent, hit-testing as necessary.
140 void computeTouchTargets(const PlatformTouchEvent&, 144 void computeTouchTargets(const PlatformTouchEvent&,
141 HeapVector<TouchEventManager::TouchInfo>&); 145 HeapVector<TouchEventManager::TouchInfo>&);
142 146
143 // Sends touch pointer events and sets consumed bits in TouchInfo array 147 // Sends touch pointer events and sets consumed bits in TouchInfo array
144 // based on the return value of pointer event handlers. 148 // based on the return value of pointer event handlers.
145 void dispatchTouchPointerEvents(const PlatformTouchEvent&, 149 void dispatchTouchPointerEvents(
146 HeapVector<TouchEventManager::TouchInfo>&); 150 const PlatformTouchEvent&,
151 const Vector<PlatformTouchEvent>& coalescedEvents,
152 HeapVector<TouchEventManager::TouchInfo>&);
147 153
148 // Returns whether the event is consumed or not. 154 // Returns whether the event is consumed or not.
149 WebInputEventResult sendTouchPointerEvent(EventTarget*, PointerEvent*); 155 WebInputEventResult sendTouchPointerEvent(EventTarget*, PointerEvent*);
150 156
151 void sendBoundaryEvents(EventTarget* exitedTarget, 157 void sendBoundaryEvents(EventTarget* exitedTarget,
152 EventTarget* enteredTarget, 158 EventTarget* enteredTarget,
153 PointerEvent*); 159 PointerEvent*);
154 void setNodeUnderPointer(PointerEvent*, EventTarget*); 160 void setNodeUnderPointer(PointerEvent*, EventTarget*);
155 161
156 // Processes the assignment of |m_pointerCaptureTarget| from 162 // Processes the assignment of |m_pointerCaptureTarget| from
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 PointerCapturingMap m_pendingPointerCaptureTarget; 223 PointerCapturingMap m_pendingPointerCaptureTarget;
218 224
219 PointerEventFactory m_pointerEventFactory; 225 PointerEventFactory m_pointerEventFactory;
220 Member<TouchEventManager> m_touchEventManager; 226 Member<TouchEventManager> m_touchEventManager;
221 Member<MouseEventManager> m_mouseEventManager; 227 Member<MouseEventManager> m_mouseEventManager;
222 }; 228 };
223 229
224 } // namespace blink 230 } // namespace blink
225 231
226 #endif // PointerEventManager_h 232 #endif // PointerEventManager_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698