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

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

Issue 2590273002: Move WebMouseEvent into its own header file. (Closed)
Patch Set: Fix android build Created 3 years, 11 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 /* 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 // not actually generate events for these instead of filtering them out. 393 // not actually generate events for these instead of filtering them out.
394 switch (windowsKeyCode) { 394 switch (windowsKeyCode) {
395 case 0x08: // VK_BACK 395 case 0x08: // VK_BACK
396 case 0x1b: // VK_ESCAPE 396 case 0x1b: // VK_ESCAPE
397 return false; 397 return false;
398 } 398 }
399 return true; 399 return true;
400 } 400 }
401 }; 401 };
402 402
403 // WebMouseEvent --------------------------------------------------------------
404
405 class WebMouseEvent : public WebInputEvent, public WebPointerProperties {
406 public:
407 // Renderer coordinates. Similar to viewport coordinates but without
408 // DevTools emulation transform or overscroll applied. i.e. the coordinates
409 // in Chromium's RenderView bounds.
410 int x;
411 int y;
412
413 // DEPRECATED (crbug.com/507787)
414 int windowX;
415 int windowY;
416
417 // Screen coordinate
418 int globalX;
419 int globalY;
420
421 int movementX;
422 int movementY;
423 int clickCount;
424
425 WebMouseEvent(Type type, int modifiers, double timeStampSeconds)
426 : WebInputEvent(sizeof(WebMouseEvent), type, modifiers, timeStampSeconds),
427 WebPointerProperties() {}
428
429 WebMouseEvent()
430 : WebInputEvent(sizeof(WebMouseEvent)), WebPointerProperties() {}
431
432 #if INSIDE_BLINK
433 BLINK_PLATFORM_EXPORT WebFloatPoint movementInRootFrame() const;
434 BLINK_PLATFORM_EXPORT WebFloatPoint positionInRootFrame() const;
435 #endif
436
437 protected:
438 explicit WebMouseEvent(unsigned sizeParam)
439 : WebInputEvent(sizeParam), WebPointerProperties() {}
440
441 WebMouseEvent(unsigned sizeParam,
442 Type type,
443 int modifiers,
444 double timeStampSeconds)
445 : WebInputEvent(sizeParam, type, modifiers, timeStampSeconds),
446 WebPointerProperties() {}
447 void flattenTransformSelf();
448 };
449
450 // WebTouchEvent -------------------------------------------------------------- 403 // WebTouchEvent --------------------------------------------------------------
451 404
452 // TODO(e_hakkinen): Replace with WebPointerEvent. crbug.com/508283 405 // TODO(e_hakkinen): Replace with WebPointerEvent. crbug.com/508283
453 class WebTouchEvent : public WebInputEvent { 406 class WebTouchEvent : public WebInputEvent {
454 public: 407 public:
455 // Maximum number of simultaneous touches supported on 408 // Maximum number of simultaneous touches supported on
456 // Ash/Aura. 409 // Ash/Aura.
457 enum { kTouchesLengthCap = 16 }; 410 enum { kTouchesLengthCap = 16 };
458 411
459 unsigned touchesLength; 412 unsigned touchesLength;
(...skipping 23 matching lines...) Expand all
483 WebTouchEvent(Type type, int modifiers, double timeStampSeconds) 436 WebTouchEvent(Type type, int modifiers, double timeStampSeconds)
484 : WebInputEvent(sizeof(WebTouchEvent), type, modifiers, timeStampSeconds), 437 : WebInputEvent(sizeof(WebTouchEvent), type, modifiers, timeStampSeconds),
485 dispatchType(Blocking) {} 438 dispatchType(Blocking) {}
486 }; 439 };
487 440
488 #pragma pack(pop) 441 #pragma pack(pop)
489 442
490 } // namespace blink 443 } // namespace blink
491 444
492 #endif 445 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/FrameTestHelpers.h ('k') | third_party/WebKit/public/platform/WebMouseEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698