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 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 // Clear all the existing ids. | 56 // Clear all the existing ids. |
57 void clear(); | 57 void clear(); |
58 | 58 |
59 // When a particular pointerId is removed, the id is considered free even | 59 // When a particular pointerId is removed, the id is considered free even |
60 // though there might have been other PointerEvents that were generated with | 60 // though there might have been other PointerEvents that were generated with |
61 // the same id before. | 61 // the same id before. |
62 bool remove(const int); | 62 bool remove(const int); |
63 | 63 |
64 // Returns all ids of the given pointerType. | 64 // Returns all ids of the given pointerType. |
65 HeapVector<int> getPointerIdsOfType(WebPointerProperties::PointerType); | 65 Vector<int> getPointerIdsOfType(WebPointerProperties::PointerType); |
66 | 66 |
67 // Returns whether a pointer id exists and active | 67 // Returns whether a pointer id exists and active |
68 bool isActive(const int); | 68 bool isActive(const int); |
69 | 69 |
70 // Returns type of pointer id if exists, otherwise Unknown | 70 // Returns type of pointer id if exists, otherwise Unknown |
71 WebPointerProperties::PointerType getPointerType(const int); | 71 WebPointerProperties::PointerType getPointerType(const int); |
72 | 72 |
73 // Returns whether a pointer id exists and has at least one pressed button | 73 // Returns whether a pointer id exists and has at least one pressed button |
74 bool isActiveButtonsState(const int); | 74 bool isActiveButtonsState(const int); |
75 | 75 |
(...skipping 28 matching lines...) Expand all Loading... |
104 int m_currentId; | 104 int m_currentId; |
105 HashMap<IncomingId, int, WTF::PairHash<int, int>, WTF::PairHashTraits<Unsign
edHash, UnsignedHash>> m_pointerIncomingIdMapping; | 105 HashMap<IncomingId, int, WTF::PairHash<int, int>, WTF::PairHashTraits<Unsign
edHash, UnsignedHash>> m_pointerIncomingIdMapping; |
106 HashMap<int, PointerAttributes, WTF::IntHash<int>, UnsignedHash> m_pointerId
Mapping; | 106 HashMap<int, PointerAttributes, WTF::IntHash<int>, UnsignedHash> m_pointerId
Mapping; |
107 int m_primaryId[static_cast<int>(WebPointerProperties::PointerType::LastEntr
y) + 1]; | 107 int m_primaryId[static_cast<int>(WebPointerProperties::PointerType::LastEntr
y) + 1]; |
108 int m_idCount[static_cast<int>(WebPointerProperties::PointerType::LastEntry)
+ 1]; | 108 int m_idCount[static_cast<int>(WebPointerProperties::PointerType::LastEntry)
+ 1]; |
109 }; | 109 }; |
110 | 110 |
111 } // namespace blink | 111 } // namespace blink |
112 | 112 |
113 #endif // PointerEventFactory_h | 113 #endif // PointerEventFactory_h |
OLD | NEW |