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

Side by Side Diff: third_party/WebKit/Source/core/events/PointerEventFactory.h

Issue 1774913004: Firing got/lost pointer capture events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 PointerEventFactory_h 5 #ifndef PointerEventFactory_h
6 #define PointerEventFactory_h 6 #define PointerEventFactory_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 "public/platform/WebPointerProperties.h" 10 #include "public/platform/WebPointerProperties.h"
(...skipping 24 matching lines...) Expand all
35 PassRefPtrWillBeRawPtr<AbstractView>); 35 PassRefPtrWillBeRawPtr<AbstractView>);
36 36
37 PassRefPtrWillBeRawPtr<PointerEvent> create(const AtomicString& type, 37 PassRefPtrWillBeRawPtr<PointerEvent> create(const AtomicString& type,
38 const PlatformTouchPoint&, PlatformEvent::Modifiers, 38 const PlatformTouchPoint&, PlatformEvent::Modifiers,
39 const double width, const double height, 39 const double width, const double height,
40 const double clientX, const double clientY); 40 const double clientX, const double clientY);
41 41
42 PassRefPtrWillBeRawPtr<PointerEvent> createPointerCancel( 42 PassRefPtrWillBeRawPtr<PointerEvent> createPointerCancel(
43 const PlatformTouchPoint&); 43 const PlatformTouchPoint&);
44 44
45 PassRefPtrWillBeRawPtr<PointerEvent> create( 45 // For creating capture events (i.e got/lostpointercapture)
46 PassRefPtrWillBeRawPtr<PointerEvent> createPointerCapture(
mustaq 2016/03/10 19:28:19 Please rename to "createPointerCaptureEvent", othe
Navid Zolghadr 2016/03/10 20:27:35 Done.
46 PassRefPtrWillBeRawPtr<PointerEvent>, 47 PassRefPtrWillBeRawPtr<PointerEvent>,
47 const AtomicString& type, 48 const AtomicString&);
49
50 // For creating transition events (i.e pointerout/leave/over/enter)
51 PassRefPtrWillBeRawPtr<PointerEvent> createPointerTransition(
mustaq 2016/03/10 19:28:19 Same as before: rename to ...Event.
Navid Zolghadr 2016/03/10 20:27:35 Done.
52 PassRefPtrWillBeRawPtr<PointerEvent>,
53 const AtomicString&,
48 PassRefPtrWillBeRawPtr<EventTarget>); 54 PassRefPtrWillBeRawPtr<EventTarget>);
49 55
50 // Clear all the existing ids. 56 // Clear all the existing ids.
51 void clear(); 57 void clear();
52 58
53 // Returns true if pointerEvent is removed. When a pointerEvent with a 59 // Returns true if pointerEvent is removed. When a pointerEvent with a
54 // particular id is removed that id is considered free even though there 60 // particular id is removed that id is considered free even though there
55 // might have been other PointerEvents that were generated with the same id 61 // might have been other PointerEvents that were generated with the same id
56 // before. 62 // before.
57 bool remove(const PassRefPtrWillBeRawPtr<PointerEvent>); 63 bool remove(const PassRefPtrWillBeRawPtr<PointerEvent>);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 int m_currentId; 98 int m_currentId;
93 HashMap<IncomingId, int, WTF::PairHash<int, int>, WTF::PairHashTraits<Unsign edHash, UnsignedHash>> m_pointerIncomingIdMapping; 99 HashMap<IncomingId, int, WTF::PairHash<int, int>, WTF::PairHashTraits<Unsign edHash, UnsignedHash>> m_pointerIncomingIdMapping;
94 HashMap<int, PointerAttributes, WTF::IntHash<int>, UnsignedHash> m_pointerId Mapping; 100 HashMap<int, PointerAttributes, WTF::IntHash<int>, UnsignedHash> m_pointerId Mapping;
95 int m_primaryId[static_cast<int>(WebPointerProperties::PointerType::LastEntr y) + 1]; 101 int m_primaryId[static_cast<int>(WebPointerProperties::PointerType::LastEntr y) + 1];
96 int m_idCount[static_cast<int>(WebPointerProperties::PointerType::LastEntry) + 1]; 102 int m_idCount[static_cast<int>(WebPointerProperties::PointerType::LastEntry) + 1];
97 }; 103 };
98 104
99 } // namespace blink 105 } // namespace blink
100 106
101 #endif // PointerEventFactory_h 107 #endif // PointerEventFactory_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698