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

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

Issue 1144313003: Added PointerEvent firing on touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed primary pointer id on reuse, for each type of Pointers. 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
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 PointerEventUtils_h
6 #define PointerEventUtils_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): This should live in PointerEvent.h but can't use it there
18 // w/o changing the corresponding type in PointerEvent.idl. Investigate.
Rick Byers 2015/06/16 17:25:39 Note there is a difference. At the PointerEvent A
mustaq 2015/06/16 20:18:43 What about adding a new method pointerTypeEnum() i
Rick Byers 2015/06/18 17:40:07 It's because we want script to be able to fire dif
mustaq 2015/06/18 18:20:53 Acknowledged.
19 enum PointerType {
20 PointerTypeUnknown = 0,
21 PointerTypeMouse,
22 PointerTypePen,
23 PointerTypeTouch,
24 PointerTypeLastEntry // Must be the last entry in the list
25 };
26
27 PointerIdManager();
28 ~PointerIdManager();
29 void clear();
30 void add(PointerType, unsigned);
31 void remove(PointerType, unsigned);
32 bool isPrimary(PointerType, unsigned);
33
34 private:
35 ListHashSet<unsigned> m_ids[PointerTypeLastEntry];
36 bool m_hasPrimaryId[PointerTypeLastEntry];
37 };
38
39 } // namespace blink
40
41 #endif // PointerEventUtils_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698