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

Side by Side Diff: third_party/WebKit/public/platform/WebPointerProperties.h

Issue 2849083002: Add pointer id to the WebMouseEvent's constructors (Closed)
Patch Set: webmouseidd Created 3 years, 7 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
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 WebPointerProperties_h 5 #ifndef WebPointerProperties_h
6 #define WebPointerProperties_h 6 #define WebPointerProperties_h
7 7
8 #include <cstdint> 8 #include <cstdint>
9 #include <limits> 9 #include <limits>
10 10
(...skipping 28 matching lines...) Expand all
39 39
40 enum class PointerType { 40 enum class PointerType {
41 kUnknown, 41 kUnknown,
42 kMouse, 42 kMouse,
43 kPen, 43 kPen,
44 kEraser, 44 kEraser,
45 kTouch, 45 kTouch,
46 kLastEntry = kTouch // Must be the last entry in the list 46 kLastEntry = kTouch // Must be the last entry in the list
47 }; 47 };
48 48
49 WebPointerProperties() 49 WebPointerProperties(int id_param)
sadrul 2017/05/01 15:42:11 explicit
lanwei 2017/05/01 23:51:21 Done.
50 : id(0), 50 : id(id_param),
51 force(std::numeric_limits<float>::quiet_NaN()), 51 force(std::numeric_limits<float>::quiet_NaN()),
52 tilt_x(0), 52 tilt_x(0),
53 tilt_y(0), 53 tilt_y(0),
54 tangential_pressure(0.0f), 54 tangential_pressure(0.0f),
55 twist(0), 55 twist(0),
56 button(Button::kNoButton), 56 button(Button::kNoButton),
57 pointer_type(PointerType::kUnknown), 57 pointer_type(PointerType::kUnknown),
58 movement_x(0), 58 movement_x(0),
59 movement_y(0) {} 59 movement_y(0) {}
60 60
61 WebPointerProperties(Button button_param, PointerType pointer_type_param) 61 WebPointerProperties(int id_param,
62 : id(0), 62 Button button_param,
63 PointerType pointer_type_param)
64 : id(id_param),
63 force(std::numeric_limits<float>::quiet_NaN()), 65 force(std::numeric_limits<float>::quiet_NaN()),
64 tilt_x(0), 66 tilt_x(0),
65 tilt_y(0), 67 tilt_y(0),
66 tangential_pressure(0.0f), 68 tangential_pressure(0.0f),
67 twist(0), 69 twist(0),
68 button(button_param), 70 button(button_param),
69 pointer_type(pointer_type_param), 71 pointer_type(pointer_type_param),
70 movement_x(0), 72 movement_x(0),
71 movement_y(0) {} 73 movement_y(0) {}
72 74
(...skipping 28 matching lines...) Expand all
101 103
102 PointerType pointer_type; 104 PointerType pointer_type;
103 105
104 int movement_x; 106 int movement_x;
105 int movement_y; 107 int movement_y;
106 }; 108 };
107 109
108 } // namespace blink 110 } // namespace blink
109 111
110 #endif 112 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698