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

Side by Side Diff: Source/core/events/PointerIdManager.h

Issue 1144313003: Added PointerEvent firing on touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased. TODO fixes. Created 5 years, 6 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 | « Source/core/events/PointerEvent.cpp ('k') | Source/core/events/PointerIdManager.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PointerIdManager_h
6 #define PointerIdManager_h
7
8 #include "wtf/ListHashSet.h"
9
10 namespace blink {
11
12 /**
13 Helper class for tracking the primary pointer id for each type of PointerEvent s.
14 */
15 class PointerIdManager {
16 public:
17 // TODO(mustaq): Move this enum to PointerEvent.h? Change the spec to use en ums?
18 enum PointerType {
19 PointerTypeUnknown = 0,
20 PointerTypeMouse,
21 PointerTypePen,
22 PointerTypeTouch,
23 PointerTypeLastEntry // Must be the last entry in the list
24 };
25
26 PointerIdManager();
27 ~PointerIdManager();
28 void clear();
29 void add(PointerType, unsigned);
30 void remove(PointerType, unsigned);
31 bool isPrimary(PointerType, unsigned);
32
33 private:
34 ListHashSet<unsigned> m_ids[PointerTypeLastEntry];
35 bool m_hasPrimaryId[PointerTypeLastEntry];
36 };
37
38 } // namespace blink
39
40 #endif // PointerIdManager_h
OLDNEW
« no previous file with comments | « Source/core/events/PointerEvent.cpp ('k') | Source/core/events/PointerIdManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698