| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 PointerAttributes() : incomingId(), isActiveButtons(false) {} | 97 PointerAttributes() : incomingId(), isActiveButtons(false) {} |
| 98 PointerAttributes(IncomingId incomingId, unsigned isActiveButtons) | 98 PointerAttributes(IncomingId incomingId, unsigned isActiveButtons) |
| 99 : incomingId(incomingId), isActiveButtons(isActiveButtons) {} | 99 : incomingId(incomingId), isActiveButtons(isActiveButtons) {} |
| 100 } PointerAttributes; | 100 } PointerAttributes; |
| 101 | 101 |
| 102 int addIdAndActiveButtons(const IncomingId, bool isActiveButtons); | 102 int addIdAndActiveButtons(const IncomingId, bool isActiveButtons); |
| 103 bool isPrimary(const int) const; | 103 bool isPrimary(const int) const; |
| 104 void setIdTypeButtons(PointerEventInit&, | 104 void setIdTypeButtons(PointerEventInit&, |
| 105 const WebPointerProperties&, | 105 const WebPointerProperties&, |
| 106 unsigned buttons); | 106 unsigned buttons); |
| 107 void setBubblesAndCancelable(PointerEventInit&, const AtomicString& type); | 107 void setEventSpecificFields(PointerEventInit&, const AtomicString& type); |
| 108 | 108 |
| 109 // Creates pointerevents like boundary and capture events from another | 109 // Creates pointerevents like boundary and capture events from another |
| 110 // pointerevent (i.e. up/down/move events). | 110 // pointerevent (i.e. up/down/move events). |
| 111 PointerEvent* createPointerEventFrom(PointerEvent*, | 111 PointerEvent* createPointerEventFrom(PointerEvent*, |
| 112 const AtomicString&, | 112 const AtomicString&, |
| 113 EventTarget*); | 113 EventTarget*); |
| 114 | 114 |
| 115 static const int s_invalidId; | 115 static const int s_invalidId; |
| 116 | 116 |
| 117 int m_currentId; | 117 int m_currentId; |
| 118 HashMap<IncomingId, | 118 HashMap<IncomingId, |
| 119 int, | 119 int, |
| 120 WTF::PairHash<int, int>, | 120 WTF::PairHash<int, int>, |
| 121 WTF::PairHashTraits<UnsignedHash, UnsignedHash>> | 121 WTF::PairHashTraits<UnsignedHash, UnsignedHash>> |
| 122 m_pointerIncomingIdMapping; | 122 m_pointerIncomingIdMapping; |
| 123 HashMap<int, PointerAttributes, WTF::IntHash<int>, UnsignedHash> | 123 HashMap<int, PointerAttributes, WTF::IntHash<int>, UnsignedHash> |
| 124 m_pointerIdMapping; | 124 m_pointerIdMapping; |
| 125 int m_primaryId[static_cast<int>( | 125 int m_primaryId[static_cast<int>( |
| 126 WebPointerProperties::PointerType::LastEntry) + | 126 WebPointerProperties::PointerType::LastEntry) + |
| 127 1]; | 127 1]; |
| 128 int m_idCount[static_cast<int>(WebPointerProperties::PointerType::LastEntry) + | 128 int m_idCount[static_cast<int>(WebPointerProperties::PointerType::LastEntry) + |
| 129 1]; | 129 1]; |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 } // namespace blink | 132 } // namespace blink |
| 133 | 133 |
| 134 #endif // PointerEventFactory_h | 134 #endif // PointerEventFactory_h |
| OLD | NEW |