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

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

Issue 1906213004: Simplify PointerEventFactory::getPointerIdsOfType() return type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/events/PointerEventFactory.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/events/PointerEventFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698