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

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

Issue 1800143002: Notify Blink about start of gesture scroll through a queued event. (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 22 matching lines...) Expand all
33 const AtomicString& mouseEventName, const PlatformMouseEvent&, 33 const AtomicString& mouseEventName, const PlatformMouseEvent&,
34 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget, 34 PassRefPtrWillBeRawPtr<EventTarget> relatedTarget,
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 int pointerId, const WebPointerProperties::PointerType);
44 44
45 PassRefPtrWillBeRawPtr<PointerEvent> create( 45 PassRefPtrWillBeRawPtr<PointerEvent> create(
46 PassRefPtrWillBeRawPtr<PointerEvent>, 46 PassRefPtrWillBeRawPtr<PointerEvent>,
47 const AtomicString& type, 47 const AtomicString& type,
48 PassRefPtrWillBeRawPtr<EventTarget>); 48 PassRefPtrWillBeRawPtr<EventTarget>);
49 49
50 // Clear all the existing ids. 50 // Clear all the existing ids.
51 void clear(); 51 void clear();
52 52
53 // Returns true if pointerEvent is removed. When a pointerEvent with a 53 // When a particular pointerId is removed that id is considered free even
54 // particular id is removed that id is considered free even though there 54 // though there might have been other PointerEvents that were generated with
55 // might have been other PointerEvents that were generated with the same id 55 // the same id before.
56 // before. 56 bool remove(const int);
57 bool remove(const PassRefPtrWillBeRawPtr<PointerEvent>); 57
58 // Returns all ids of the given pointerType.
59 WillBeHeapVector<int> getPointerIdsOfType(WebPointerProperties::PointerType) ;
58 60
59 // Returns whether a pointer id exists and active 61 // Returns whether a pointer id exists and active
60 bool isActive(const int); 62 bool isActive(const int);
61 63
62 // Returns whether a pointer id exists and has at least one pressed button 64 // Returns whether a pointer id exists and has at least one pressed button
63 bool isActiveButtonsState(const int); 65 bool isActiveButtonsState(const int);
64 66
65 private: 67 private:
66 typedef WTF::UnsignedWithZeroKeyHashTraits<int> UnsignedHash; 68 typedef WTF::UnsignedWithZeroKeyHashTraits<int> UnsignedHash;
67 typedef struct IncomingId : public std::pair<int, int> { 69 typedef struct IncomingId : public std::pair<int, int> {
(...skipping 24 matching lines...) Expand all
92 int m_currentId; 94 int m_currentId;
93 HashMap<IncomingId, int, WTF::PairHash<int, int>, WTF::PairHashTraits<Unsign edHash, UnsignedHash>> m_pointerIncomingIdMapping; 95 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; 96 HashMap<int, PointerAttributes, WTF::IntHash<int>, UnsignedHash> m_pointerId Mapping;
95 int m_primaryId[static_cast<int>(WebPointerProperties::PointerType::LastEntr y) + 1]; 97 int m_primaryId[static_cast<int>(WebPointerProperties::PointerType::LastEntr y) + 1];
96 int m_idCount[static_cast<int>(WebPointerProperties::PointerType::LastEntry) + 1]; 98 int m_idCount[static_cast<int>(WebPointerProperties::PointerType::LastEntry) + 1];
97 }; 99 };
98 100
99 } // namespace blink 101 } // namespace blink
100 102
101 #endif // PointerEventFactory_h 103 #endif // PointerEventFactory_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698