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

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

Issue 2807433003: No pointer captured when the pointer lock is applied (Closed)
Patch Set: pointer lock Created 3 years, 6 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ProcessPendingPointerCaptureForPointerLock(const WebMouseEvent&);
88
86 private: 89 private:
87 typedef HeapHashMap<int, 90 typedef HeapHashMap<int,
88 Member<EventTarget>, 91 Member<EventTarget>,
89 WTF::IntHash<int>, 92 WTF::IntHash<int>,
90 WTF::UnsignedWithZeroKeyHashTraits<int>> 93 WTF::UnsignedWithZeroKeyHashTraits<int>>
91 PointerCapturingMap; 94 PointerCapturingMap;
92 class EventTargetAttributes { 95 class EventTargetAttributes {
93 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 96 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
94 97
95 public: 98 public:
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 Member<MouseEventManager> mouse_event_manager_; 228 Member<MouseEventManager> mouse_event_manager_;
226 229
227 // The pointerId of the PointerEvent currently being dispatched within this 230 // The pointerId of the PointerEvent currently being dispatched within this
228 // frame or 0 if none. 231 // frame or 0 if none.
229 int dispatching_pointer_id_; 232 int dispatching_pointer_id_;
230 }; 233 };
231 234
232 } // namespace blink 235 } // namespace blink
233 236
234 #endif // PointerEventManager_h 237 #endif // PointerEventManager_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/core/input/PointerEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698