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