OLD | NEW |
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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 UnknownMomentumPhase = 0, // No phase information. | 488 UnknownMomentumPhase = 0, // No phase information. |
489 NonMomentumPhase, // Regular scrolling phase. | 489 NonMomentumPhase, // Regular scrolling phase. |
490 MomentumPhase, // Momentum phase. | 490 MomentumPhase, // Momentum phase. |
491 }; | 491 }; |
492 | 492 |
493 int x; | 493 int x; |
494 int y; | 494 int y; |
495 int globalX; | 495 int globalX; |
496 int globalY; | 496 int globalY; |
497 WebGestureDevice sourceDevice; | 497 WebGestureDevice sourceDevice; |
| 498 |
| 499 // If the WebGestureEvent has sourceDevice=WebGestureDeviceTouchscreen, this |
| 500 // field contains the unique identifier for the touch event that released |
| 501 // this event at TouchDispositionGestureFilter. If the WebGestureEvents was |
| 502 // not released through a touch event (e.g. timer-released gesture events or |
| 503 // gesture events with sourceDevice!=WebGestureDeviceTouchscreen), the field |
| 504 // contains 0. See crbug.com/618738. |
| 505 uint32_t uniqueTouchEventId; |
| 506 |
498 // This field exists to allow BrowserPlugin to mark GestureScroll events as | 507 // This field exists to allow BrowserPlugin to mark GestureScroll events as |
499 // 'resent' to handle the case where an event is not consumed when first | 508 // 'resent' to handle the case where an event is not consumed when first |
500 // encountered; it should be handled differently by the plugin when it is | 509 // encountered; it should be handled differently by the plugin when it is |
501 // sent for thesecond time. No code within Blink touches this, other than to | 510 // sent for thesecond time. No code within Blink touches this, other than to |
502 // plumb it through event conversions. | 511 // plumb it through event conversions. |
503 int resendingPluginId; | 512 int resendingPluginId; |
504 | 513 |
505 union { | 514 union { |
506 // Tap information must be set for GestureTap, GestureTapUnconfirmed, | 515 // Tap information must be set for GestureTap, GestureTapUnconfirmed, |
507 // and GestureDoubleTap events. | 516 // and GestureDoubleTap events. |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 | 643 |
635 // For a single touch, this is true after the touch-point has moved beyond | 644 // For a single touch, this is true after the touch-point has moved beyond |
636 // the platform slop region. For a multitouch, this is true after any | 645 // the platform slop region. For a multitouch, this is true after any |
637 // touch-point has moved (by whatever amount). | 646 // touch-point has moved (by whatever amount). |
638 bool movedBeyondSlopRegion; | 647 bool movedBeyondSlopRegion; |
639 | 648 |
640 // Whether there was an active fling animation when the event was | 649 // Whether there was an active fling animation when the event was |
641 // dispatched. | 650 // dispatched. |
642 bool dispatchedDuringFling; | 651 bool dispatchedDuringFling; |
643 | 652 |
644 // A unique identifier for the touch event. | 653 // A unique identifier for the touch event. Valid ids start at one and |
| 654 // increase monotonically. Zero means an unknown id. |
645 uint32_t uniqueTouchEventId; | 655 uint32_t uniqueTouchEventId; |
646 | 656 |
647 WebTouchEvent() | 657 WebTouchEvent() |
648 : WebInputEvent(sizeof(WebTouchEvent)) | 658 : WebInputEvent(sizeof(WebTouchEvent)) |
649 , touchesLength(0) | 659 , touchesLength(0) |
650 , dispatchType(Blocking) | 660 , dispatchType(Blocking) |
651 , movedBeyondSlopRegion(false) | 661 , movedBeyondSlopRegion(false) |
652 , dispatchedDuringFling(false) | 662 , dispatchedDuringFling(false) |
653 , uniqueTouchEventId(0) | 663 , uniqueTouchEventId(0) |
654 { | 664 { |
655 } | 665 } |
656 }; | 666 }; |
657 | 667 |
658 #pragma pack(pop) | 668 #pragma pack(pop) |
659 | 669 |
660 } // namespace blink | 670 } // namespace blink |
661 | 671 |
662 #endif | 672 #endif |
OLD | NEW |