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

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

Issue 2539283002: Remove PlatformGestureEvent in favour of using WebGestureEvent (Closed)
Patch Set: Rebase and fix comments Created 4 years 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 /* 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 }; 223 };
224 224
225 static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey; 225 static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey;
226 226
227 double timeStampSeconds; // Seconds since platform start with microsecond 227 double timeStampSeconds; // Seconds since platform start with microsecond
228 // resolution. 228 // resolution.
229 unsigned size; // The size of this structure, for serialization. 229 unsigned size; // The size of this structure, for serialization.
230 Type type; 230 Type type;
231 int modifiers; 231 int modifiers;
232 232
233 // The root frame scale.
234 float frameScale;
235
236 // The root frame translation (applied post scale).
237 WebFloatPoint frameTranslate;
238
233 // Returns true if the WebInputEvent |type| is a mouse event. 239 // Returns true if the WebInputEvent |type| is a mouse event.
234 static bool isMouseEventType(int type) { 240 static bool isMouseEventType(int type) {
235 return MouseTypeFirst <= type && type <= MouseTypeLast; 241 return MouseTypeFirst <= type && type <= MouseTypeLast;
236 } 242 }
237 243
238 // Returns true if the WebInputEvent |type| is a keyboard event. 244 // Returns true if the WebInputEvent |type| is a keyboard event.
239 static bool isKeyboardEventType(int type) { 245 static bool isKeyboardEventType(int type) {
240 return KeyboardTypeFirst <= type && type <= KeyboardTypeLast; 246 return KeyboardTypeFirst <= type && type <= KeyboardTypeLast;
241 } 247 }
242 248
(...skipping 21 matching lines...) Expand all
264 270
265 BLINK_COMMON_EXPORT static const char* GetName(WebInputEvent::Type); 271 BLINK_COMMON_EXPORT static const char* GetName(WebInputEvent::Type);
266 272
267 protected: 273 protected:
268 explicit WebInputEvent(unsigned sizeParam) { 274 explicit WebInputEvent(unsigned sizeParam) {
269 memset(this, 0, sizeParam); 275 memset(this, 0, sizeParam);
270 timeStampSeconds = 0.0; 276 timeStampSeconds = 0.0;
271 size = sizeParam; 277 size = sizeParam;
272 type = Undefined; 278 type = Undefined;
273 modifiers = 0; 279 modifiers = 0;
280 frameScale = 1.0f;
274 } 281 }
275 }; 282 };
276 283
277 // WebKeyboardEvent ----------------------------------------------------------- 284 // WebKeyboardEvent -----------------------------------------------------------
278 285
279 class WebKeyboardEvent : public WebInputEvent { 286 class WebKeyboardEvent : public WebInputEvent {
280 public: 287 public:
281 // Caps on string lengths so we can make them static arrays and keep 288 // Caps on string lengths so we can make them static arrays and keep
282 // them PODs. 289 // them PODs.
283 static const size_t textLengthCap = 4; 290 static const size_t textLengthCap = 4;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 movedBeyondSlopRegion(false), 502 movedBeyondSlopRegion(false),
496 touchStartOrFirstTouchMove(false), 503 touchStartOrFirstTouchMove(false),
497 uniqueTouchEventId(0) {} 504 uniqueTouchEventId(0) {}
498 }; 505 };
499 506
500 #pragma pack(pop) 507 #pragma pack(pop)
501 508
502 } // namespace blink 509 } // namespace blink
503 510
504 #endif 511 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698