| 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 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebInputEvent_h | 31 #ifndef WebInputEvent_h |
| 32 #define WebInputEvent_h | 32 #define WebInputEvent_h |
| 33 | 33 |
| 34 #include "../platform/WebCommon.h" | 34 #include "WebCommon.h" |
| 35 #include "../platform/WebGestureDevice.h" | 35 #include "WebGestureDevice.h" |
| 36 #include "../platform/WebPointerProperties.h" | 36 #include "WebPointerProperties.h" |
| 37 #include "../platform/WebRect.h" | 37 #include "WebRect.h" |
| 38 #include "WebTouchPoint.h" | 38 #include "WebTouchPoint.h" |
| 39 | 39 |
| 40 #include <string.h> | 40 #include <string.h> |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 // The classes defined in this file are intended to be used with | 44 // The classes defined in this file are intended to be used with |
| 45 // WebWidget's handleInputEvent method. These event types are cross- | 45 // WebWidget's handleInputEvent method. These event types are cross- |
| 46 // platform and correspond closely to WebCore's Platform*Event classes. | 46 // platform and correspond closely to WebCore's Platform*Event classes. |
| 47 // | 47 // |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 } | 604 } |
| 605 }; | 605 }; |
| 606 | 606 |
| 607 // WebTouchEvent -------------------------------------------------------------- | 607 // WebTouchEvent -------------------------------------------------------------- |
| 608 | 608 |
| 609 // TODO(e_hakkinen): Replace with WebPointerEvent. crbug.com/508283 | 609 // TODO(e_hakkinen): Replace with WebPointerEvent. crbug.com/508283 |
| 610 class WebTouchEvent : public WebInputEvent { | 610 class WebTouchEvent : public WebInputEvent { |
| 611 public: | 611 public: |
| 612 // Maximum number of simultaneous touches supported on | 612 // Maximum number of simultaneous touches supported on |
| 613 // Ash/Aura. | 613 // Ash/Aura. |
| 614 enum { touchesLengthCap = 16 }; | 614 enum { kTouchesLengthCap = 16 }; |
| 615 | 615 |
| 616 unsigned touchesLength; | 616 unsigned touchesLength; |
| 617 // List of all touches, regardless of state. | 617 // List of all touches, regardless of state. |
| 618 WebTouchPoint touches[touchesLengthCap]; | 618 WebTouchPoint touches[kTouchesLengthCap]; |
| 619 | 619 |
| 620 // Whether the event is blocking, non-blocking, all event | 620 // Whether the event is blocking, non-blocking, all event |
| 621 // listeners were passive or was forced to be non-blocking. | 621 // listeners were passive or was forced to be non-blocking. |
| 622 DispatchType dispatchType; | 622 DispatchType dispatchType; |
| 623 | 623 |
| 624 // For a single touch, this is true after the touch-point has moved beyond | 624 // For a single touch, this is true after the touch-point has moved beyond |
| 625 // the platform slop region. For a multitouch, this is true after any | 625 // the platform slop region. For a multitouch, this is true after any |
| 626 // touch-point has moved (by whatever amount). | 626 // touch-point has moved (by whatever amount). |
| 627 bool movedBeyondSlopRegion; | 627 bool movedBeyondSlopRegion; |
| 628 | 628 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 643 , uniqueTouchEventId(0) | 643 , uniqueTouchEventId(0) |
| 644 { | 644 { |
| 645 } | 645 } |
| 646 }; | 646 }; |
| 647 | 647 |
| 648 #pragma pack(pop) | 648 #pragma pack(pop) |
| 649 | 649 |
| 650 } // namespace blink | 650 } // namespace blink |
| 651 | 651 |
| 652 #endif | 652 #endif |
| OLD | NEW |