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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 const String& canvas_region_id, | 55 const String& canvas_region_id, |
56 const WebMouseEvent&); | 56 const WebMouseEvent&); |
57 | 57 |
58 // Resets the internal state of this object. | 58 // Resets the internal state of this object. |
59 void Clear(); | 59 void Clear(); |
60 | 60 |
61 void ElementRemoved(EventTarget*); | 61 void ElementRemoved(EventTarget*); |
62 | 62 |
63 void SetPointerCapture(int, EventTarget*); | 63 void SetPointerCapture(int, EventTarget*); |
64 void ReleasePointerCapture(int, EventTarget*); | 64 void ReleasePointerCapture(int, EventTarget*); |
| 65 void ReleaseMousePointerCapture(); |
65 | 66 |
66 // See Element::hasPointerCapture(int). | 67 // See Element::hasPointerCapture(int). |
67 bool HasPointerCapture(int, const EventTarget*) const; | 68 bool HasPointerCapture(int, const EventTarget*) const; |
68 | 69 |
69 // See Element::hasProcessedPointerCapture(int). | 70 // See Element::hasProcessedPointerCapture(int). |
70 bool HasProcessedPointerCapture(int, const EventTarget*) const; | 71 bool HasProcessedPointerCapture(int, const EventTarget*) const; |
71 | 72 |
72 bool IsActive(const int) const; | 73 bool IsActive(const int) const; |
73 | 74 |
74 // Returns whether there is any touch on the screen. | 75 // Returns whether there is any touch on the screen. |
75 bool IsAnyTouchActive() const; | 76 bool IsAnyTouchActive() const; |
76 | 77 |
77 // Returns whether pointerId is for an active touch pointerevent and whether | 78 // Returns whether pointerId is for an active touch pointerevent and whether |
78 // the last event was sent to the given frame. | 79 // the last event was sent to the given frame. |
79 bool IsTouchPointerIdActiveOnFrame(int, LocalFrame*) const; | 80 bool IsTouchPointerIdActiveOnFrame(int, LocalFrame*) const; |
80 | 81 |
81 // Returns true if the primary pointerdown corresponding to the given | 82 // Returns true if the primary pointerdown corresponding to the given |
82 // |uniqueTouchEventId| was canceled. Also drops stale ids from | 83 // |uniqueTouchEventId| was canceled. Also drops stale ids from |
83 // |m_touchIdsForCanceledPointerdowns|. | 84 // |m_touchIdsForCanceledPointerdowns|. |
84 bool PrimaryPointerdownCanceled(uint32_t unique_touch_event_id); | 85 bool PrimaryPointerdownCanceled(uint32_t unique_touch_event_id); |
85 | 86 |
| 87 void ProcessPendingPointerCapture(const WebMouseEvent&, |
| 88 const Vector<WebMouseEvent>&); |
| 89 |
86 private: | 90 private: |
87 typedef HeapHashMap<int, | 91 typedef HeapHashMap<int, |
88 Member<EventTarget>, | 92 Member<EventTarget>, |
89 WTF::IntHash<int>, | 93 WTF::IntHash<int>, |
90 WTF::UnsignedWithZeroKeyHashTraits<int>> | 94 WTF::UnsignedWithZeroKeyHashTraits<int>> |
91 PointerCapturingMap; | 95 PointerCapturingMap; |
92 class EventTargetAttributes { | 96 class EventTargetAttributes { |
93 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); | 97 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); |
94 | 98 |
95 public: | 99 public: |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 Member<MouseEventManager> mouse_event_manager_; | 229 Member<MouseEventManager> mouse_event_manager_; |
226 | 230 |
227 // The pointerId of the PointerEvent currently being dispatched within this | 231 // The pointerId of the PointerEvent currently being dispatched within this |
228 // frame or 0 if none. | 232 // frame or 0 if none. |
229 int dispatching_pointer_id_; | 233 int dispatching_pointer_id_; |
230 }; | 234 }; |
231 | 235 |
232 } // namespace blink | 236 } // namespace blink |
233 | 237 |
234 #endif // PointerEventManager_h | 238 #endif // PointerEventManager_h |
OLD | NEW |