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

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

Issue 2650403006: Remove PlatformMouseEvent and use WebMouseEvent instead (Closed)
Patch Set: Created 3 years, 10 months 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 18 matching lines...) Expand all
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( 37 WebInputEventResult sendMousePointerEvent(
38 Node* target, 38 Node* target,
39 const String& canvasRegionId,
39 const AtomicString& type, 40 const AtomicString& type,
40 const PlatformMouseEvent&, 41 const WebMouseEvent&,
41 const Vector<PlatformMouseEvent>& coalescedEvents); 42 const Vector<WebMouseEvent>& coalescedEvents);
42 43
43 WebInputEventResult handleTouchEvents( 44 WebInputEventResult handleTouchEvents(
44 const WebTouchEvent&, 45 const WebTouchEvent&,
45 const Vector<WebTouchEvent>& coalescedEvents); 46 const Vector<WebTouchEvent>& coalescedEvents);
46 47
47 // Sends boundary events pointerout/leave/over/enter and 48 // Sends boundary events pointerout/leave/over/enter and
48 // mouseout/leave/over/enter to the corresponding targets. 49 // mouseout/leave/over/enter to the corresponding targets.
49 // inside the document. This functions handles the cases that pointer is 50 // 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) 51 // leaving a frame. Note that normal mouse events (e.g. mousemove/down/up)
51 // and their corresponding boundary events will be handled altogether by 52 // and their corresponding boundary events will be handled altogether by
52 // sendMousePointerEvent function. 53 // sendMousePointerEvent function.
53 void sendMouseAndPointerBoundaryEvents(Node* enteredNode, 54 void sendMouseAndPointerBoundaryEvents(Node* enteredNode,
54 const PlatformMouseEvent&); 55 const String& canvasRegionId,
56 const WebMouseEvent&);
55 57
56 // Resets the internal state of this object. 58 // Resets the internal state of this object.
57 void clear(); 59 void clear();
58 60
59 void elementRemoved(EventTarget*); 61 void elementRemoved(EventTarget*);
60 62
61 void setPointerCapture(int, EventTarget*); 63 void setPointerCapture(int, EventTarget*);
62 void releasePointerCapture(int, EventTarget*); 64 void releasePointerCapture(int, EventTarget*);
63 65
64 // See Element::hasPointerCapture(int). 66 // See Element::hasPointerCapture(int).
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void processPendingPointerCapture(PointerEvent*); 163 void processPendingPointerCapture(PointerEvent*);
162 164
163 // Processes the capture state of a pointer, updates node under 165 // Processes the capture state of a pointer, updates node under
164 // pointer, and sends corresponding boundary events for pointer if 166 // pointer, and sends corresponding boundary events for pointer if
165 // setPointerPosition is true. It also sends corresponding boundary events 167 // setPointerPosition is true. It also sends corresponding boundary events
166 // for mouse if sendMouseEvent is true. 168 // for mouse if sendMouseEvent is true.
167 // Returns the target that the pointer event is supposed to be fired at. 169 // Returns the target that the pointer event is supposed to be fired at.
168 EventTarget* processCaptureAndPositionOfPointerEvent( 170 EventTarget* processCaptureAndPositionOfPointerEvent(
169 PointerEvent*, 171 PointerEvent*,
170 EventTarget* hitTestTarget, 172 EventTarget* hitTestTarget,
171 const PlatformMouseEvent& = PlatformMouseEvent(), 173 const String& canvasRegionId = String(),
174 const WebMouseEvent& = WebMouseEvent(),
172 bool sendMouseEvent = false); 175 bool sendMouseEvent = false);
173 176
174 void removeTargetFromPointerCapturingMapping(PointerCapturingMap&, 177 void removeTargetFromPointerCapturingMapping(PointerCapturingMap&,
175 const EventTarget*); 178 const EventTarget*);
176 EventTarget* getEffectiveTargetForPointerEvent(EventTarget*, int); 179 EventTarget* getEffectiveTargetForPointerEvent(EventTarget*, int);
177 EventTarget* getCapturingNode(int); 180 EventTarget* getCapturingNode(int);
178 void removePointer(PointerEvent*); 181 void removePointer(PointerEvent*);
179 WebInputEventResult dispatchPointerEvent(EventTarget*, 182 WebInputEventResult dispatchPointerEvent(EventTarget*,
180 PointerEvent*, 183 PointerEvent*,
181 bool checkForListener = false); 184 bool checkForListener = false);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 PointerCapturingMap m_pendingPointerCaptureTarget; 221 PointerCapturingMap m_pendingPointerCaptureTarget;
219 222
220 PointerEventFactory m_pointerEventFactory; 223 PointerEventFactory m_pointerEventFactory;
221 Member<TouchEventManager> m_touchEventManager; 224 Member<TouchEventManager> m_touchEventManager;
222 Member<MouseEventManager> m_mouseEventManager; 225 Member<MouseEventManager> m_mouseEventManager;
223 }; 226 };
224 227
225 } // namespace blink 228 } // namespace blink
226 229
227 #endif // PointerEventManager_h 230 #endif // PointerEventManager_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698