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

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

Issue 2778853005: Add comments to WebInputEvent for touch enum types. (Closed)
Patch Set: Code review comments Created 3 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 | 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 MouseLeave, 99 MouseLeave,
100 ContextMenu, 100 ContextMenu,
101 MouseTypeLast = ContextMenu, 101 MouseTypeLast = ContextMenu,
102 102
103 // WebMouseWheelEvent 103 // WebMouseWheelEvent
104 MouseWheel, 104 MouseWheel,
105 105
106 // WebKeyboardEvent 106 // WebKeyboardEvent
107 RawKeyDown, 107 RawKeyDown,
108 KeyboardTypeFirst = RawKeyDown, 108 KeyboardTypeFirst = RawKeyDown,
109 // KeyDown is a single event combining RawKeyDown and Char. If KeyDown is
110 // sent for a given keystroke, those two other events will not be sent.
111 // Platforms tend to prefer sending in one format (Android uses KeyDown,
112 // Windows uses RawKeyDown+Char, for example), but this is a weakly held
113 // property as tools like WebDriver/DevTools might still send the other
114 // format.
109 KeyDown, 115 KeyDown,
110 KeyUp, 116 KeyUp,
111 Char, 117 Char,
112 KeyboardTypeLast = Char, 118 KeyboardTypeLast = Char,
113 119
114 // WebGestureEvent 120 // WebGestureEvent - input interpreted semi-semantically, most commonly from
121 // touchscreen but also used for touchpad, mousewheel, and gamepad
122 // scrolling.
115 GestureScrollBegin, 123 GestureScrollBegin,
116 GestureTypeFirst = GestureScrollBegin, 124 GestureTypeFirst = GestureScrollBegin,
117 GestureScrollEnd, 125 GestureScrollEnd,
118 GestureScrollUpdate, 126 GestureScrollUpdate,
127 // Fling is a high-velocity and quickly released finger movement.
128 // FlingStart is sent once and kicks off a scroll animation.
119 GestureFlingStart, 129 GestureFlingStart,
120 GestureFlingCancel, 130 GestureFlingCancel,
121 GestureShowPress, 131 // Pinch is two fingers moving closer or farther apart.
122 GestureTap,
123 GestureTapUnconfirmed,
124 GestureTapDown,
125 GestureTapCancel,
126 GestureDoubleTap,
127 GestureTwoFingerTap,
128 GestureLongPress,
129 GestureLongTap,
130 GesturePinchBegin, 132 GesturePinchBegin,
131 GesturePinchEnd, 133 GesturePinchEnd,
132 GesturePinchUpdate, 134 GesturePinchUpdate,
133 GestureTypeLast = GesturePinchUpdate,
134 135
135 // WebTouchEvent 136 // The following types are variations and subevents of single-taps.
137 //
138 // Sent the moment the user's finger hits the screen.
139 GestureTapDown,
140 // Sent a short interval later, after it seems the finger is staying in
141 // place. It's used to activate the link highlight ("show the press").
142 GestureShowPress,
143 // Sent on finger lift for a simple, static, quick finger tap. This is the
144 // "main" event which maps to a synthetic mouse click event.
145 GestureTap,
146 // Sent when a GestureTapDown didn't turn into any variation of GestureTap
147 // (likely it turned into a scroll instead).
148 GestureTapCancel,
149 // Sent as soon as the long-press timeout fires, while the finger is still
150 // down.
151 GestureLongPress,
152 // Sent when the finger is lifted following a GestureLongPress.
153 GestureLongTap,
154 // Sent on finger lift when two fingers tapped at the same time without
155 // moving.
156 GestureTwoFingerTap,
157 // A rare event sent in place of GestureTap on desktop pages viewed on an
158 // Android phone. This tap could not yet be resolved into a GestureTap
159 // because it may still turn into a GestureDoubleTap.
160 GestureTapUnconfirmed,
161
162 // Double-tap is two single-taps spread apart in time, like a double-click.
163 // This event is only sent on desktop pages viewed on an Android phone, and
164 // is always preceded by GestureTapUnconfirmed. It's an instruction to
165 // Blink to perform a PageScaleAnimation zoom onto the double-tapped
166 // content. (It's treated differently from GestureTap with tapCount=2,
167 // which can also happen.)
168 GestureDoubleTap,
169
170 GestureTypeLast = GestureDoubleTap,
171
172 // WebTouchEvent - raw touch pointers not yet classified into gestures.
136 TouchStart, 173 TouchStart,
137 TouchTypeFirst = TouchStart, 174 TouchTypeFirst = TouchStart,
138 TouchMove, 175 TouchMove,
139 TouchEnd, 176 TouchEnd,
140 TouchCancel, 177 TouchCancel,
141 TouchScrollStarted, 178 TouchScrollStarted,
142 TouchTypeLast = TouchScrollStarted, 179 TouchTypeLast = TouchScrollStarted,
143 180
144 TypeLast = TouchTypeLast 181 TypeLast = TouchTypeLast
145 }; 182 };
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 unsigned m_size; // The size of this structure, for serialization. 418 unsigned m_size; // The size of this structure, for serialization.
382 Type m_type; 419 Type m_type;
383 int m_modifiers; 420 int m_modifiers;
384 }; 421 };
385 422
386 #pragma pack(pop) 423 #pragma pack(pop)
387 424
388 } // namespace blink 425 } // namespace blink
389 426
390 #endif 427 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698