Chromium Code Reviews| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 IsComposing = 1 << 14, | 182 IsComposing = 1 << 14, |
| 183 | 183 |
| 184 AltGrKey = 1 << 15, | 184 AltGrKey = 1 << 15, |
| 185 OSKey = 1 << 16, | 185 OSKey = 1 << 16, |
| 186 FnKey = 1 << 17, | 186 FnKey = 1 << 17, |
| 187 SymbolKey = 1 << 18, | 187 SymbolKey = 1 << 18, |
| 188 | 188 |
| 189 ScrollLockOn = 1 << 19, | 189 ScrollLockOn = 1 << 19, |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 enum DispatchType { | |
|
tdresser
2016/04/18 19:40:45
Let's add a comment stating that this is mirrored
dtapuska
2016/04/18 20:09:09
Done.
| |
| 193 Blocking, | |
| 194 EventNonBlocking, | |
| 195 // All listeners are passive. | |
| 196 ListenersNonBlockingPassive, | |
| 197 // This value represents a state which would have normally blocking | |
| 198 // but was forced to be non-blocking. | |
| 199 ListenersForcedNonBlockingPassive, | |
| 200 }; | |
| 201 | |
| 192 // The rail mode for a wheel event specifies the axis on which scrolling is | 202 // The rail mode for a wheel event specifies the axis on which scrolling is |
| 193 // expected to stick. If this axis is set to Free, then scrolling is not | 203 // expected to stick. If this axis is set to Free, then scrolling is not |
| 194 // stuck to any axis. | 204 // stuck to any axis. |
| 195 enum RailsMode { | 205 enum RailsMode { |
| 196 RailsModeFree = 0, | 206 RailsModeFree = 0, |
| 197 RailsModeHorizontal = 1, | 207 RailsModeHorizontal = 1, |
| 198 RailsModeVertical = 2, | 208 RailsModeVertical = 2, |
| 199 }; | 209 }; |
| 200 | 210 |
| 201 static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey; | 211 static const int InputModifiers = ShiftKey | ControlKey | AltKey | MetaKey; |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 595 class WebTouchEvent : public WebInputEvent { | 605 class WebTouchEvent : public WebInputEvent { |
| 596 public: | 606 public: |
| 597 // Maximum number of simultaneous touches supported on | 607 // Maximum number of simultaneous touches supported on |
| 598 // Ash/Aura. | 608 // Ash/Aura. |
| 599 enum { touchesLengthCap = 16 }; | 609 enum { touchesLengthCap = 16 }; |
| 600 | 610 |
| 601 unsigned touchesLength; | 611 unsigned touchesLength; |
| 602 // List of all touches, regardless of state. | 612 // List of all touches, regardless of state. |
| 603 WebTouchPoint touches[touchesLengthCap]; | 613 WebTouchPoint touches[touchesLengthCap]; |
| 604 | 614 |
| 605 // Whether the event can be canceled (with preventDefault). If true then the browser | 615 // Whether the event is blocking, non-blocking, all event |
| 606 // must wait for an ACK for this event. If false then no ACK IPC is expected . | 616 // listeners were passive or was forced to be non-blocking. |
| 607 bool cancelable; | 617 DispatchType dispatchType; |
| 608 | 618 |
| 609 // For a single touch, this is true after the touch-point has moved beyond | 619 // For a single touch, this is true after the touch-point has moved beyond |
| 610 // the platform slop region. For a multitouch, this is true after any | 620 // the platform slop region. For a multitouch, this is true after any |
| 611 // touch-point has moved (by whatever amount). | 621 // touch-point has moved (by whatever amount). |
| 612 bool movedBeyondSlopRegion; | 622 bool movedBeyondSlopRegion; |
| 613 | 623 |
| 614 // A unique identifier for the touch event. | 624 // A unique identifier for the touch event. |
| 615 uint32_t uniqueTouchEventId; | 625 uint32_t uniqueTouchEventId; |
| 616 | 626 |
| 617 WebTouchEvent() | 627 WebTouchEvent() |
| 618 : WebInputEvent(sizeof(WebTouchEvent)) | 628 : WebInputEvent(sizeof(WebTouchEvent)) |
| 619 , touchesLength(0) | 629 , touchesLength(0) |
| 620 , cancelable(true) | 630 , dispatchType(Blocking) |
| 621 , movedBeyondSlopRegion(false) | 631 , movedBeyondSlopRegion(false) |
| 622 , uniqueTouchEventId(0) | 632 , uniqueTouchEventId(0) |
| 623 { | 633 { |
| 624 } | 634 } |
| 625 }; | 635 }; |
| 626 | 636 |
| 627 #pragma pack(pop) | 637 #pragma pack(pop) |
| 628 | 638 |
| 629 } // namespace blink | 639 } // namespace blink |
| 630 | 640 |
| 631 #endif | 641 #endif |
| OLD | NEW |