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

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

Issue 2915783003: Add validation to a few WebPointerProperties. (Closed)
Patch Set: Created 3 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 | « content/common/input_messages.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 namespace blink { 11 namespace blink {
12 12
13 using PointerId = int32_t; 13 using PointerId = int32_t;
14 14
15 // This class encapsulates the properties that are common between mouse and 15 // This class encapsulates the properties that are common between mouse and
16 // pointer events and touch points as we transition towards the unified pointer 16 // pointer events and touch points as we transition towards the unified pointer
17 // event model. 17 // event model.
18 // TODO(e_hakkinen): Replace WebTouchEvent with WebPointerEvent, remove 18 // TODO(e_hakkinen): Replace WebTouchEvent with WebPointerEvent, remove
19 // WebTouchEvent and WebTouchPoint and merge this into WebPointerEvent. 19 // WebTouchEvent and WebTouchPoint and merge this into WebPointerEvent.
20 class WebPointerProperties { 20 class WebPointerProperties {
21 public: 21 public:
22 enum class Button { 22 enum class Button {
23 kNoButton = -1, 23 kNoButton = -1,
24 kLeft, 24 kLeft,
25 kMiddle, 25 kMiddle,
26 kRight, 26 kRight,
27 kBack, 27 kBack,
28 kForward, 28 kForward,
29 kEraser 29 kEraser,
30 kLastEntry = kEraser // Must be the last entry in the list
30 }; 31 };
31 32
32 enum class Buttons : unsigned { 33 enum class Buttons : unsigned {
33 kNoButton = 0, 34 kNoButton = 0,
34 kLeft = 1 << 0, 35 kLeft = 1 << 0,
35 kRight = 1 << 1, 36 kRight = 1 << 1,
36 kMiddle = 1 << 2, 37 kMiddle = 1 << 2,
37 kBack = 1 << 3, 38 kBack = 1 << 3,
38 kForward = 1 << 4, 39 kForward = 1 << 4,
39 kEraser = 1 << 5 40 kEraser = 1 << 5
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 106
106 PointerType pointer_type; 107 PointerType pointer_type;
107 108
108 int movement_x; 109 int movement_x;
109 int movement_y; 110 int movement_y;
110 }; 111 };
111 112
112 } // namespace blink 113 } // namespace blink
113 114
114 #endif 115 #endif
OLDNEW
« no previous file with comments | « content/common/input_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698