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 { | |
193 Blocking, | |
194 NonBlocking, | |
tdresser
2016/04/18 15:12:03
The difference between NonBlocking and NonBlocking
Rick Byers
2016/04/18 16:57:58
IMHO the important thing is that it's clear that t
dtapuska
2016/04/18 19:19:33
Acknowledged.
dtapuska
2016/04/18 19:19:33
Done.
| |
195 // All listeners are passive. | |
196 NonBlockingPassive, | |
197 // This value represents a state which would have normally blocking | |
198 // but was forced to be non-blocking. | |
199 NonBlockingForced, | |
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 or not. |
tdresser
2016/04/18 15:12:03
This comment is a bit terse. Maybe add a bit more
dtapuska
2016/04/18 19:19:33
Done.
| |
606 // must wait for an ACK for this event. If false then no ACK IPC is expected . | 616 DispatchType dispatchType; |
607 bool cancelable; | |
608 | 617 |
609 // For a single touch, this is true after the touch-point has moved beyond | 618 // 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 | 619 // the platform slop region. For a multitouch, this is true after any |
611 // touch-point has moved (by whatever amount). | 620 // touch-point has moved (by whatever amount). |
612 bool movedBeyondSlopRegion; | 621 bool movedBeyondSlopRegion; |
613 | 622 |
614 // A unique identifier for the touch event. | 623 // A unique identifier for the touch event. |
615 uint32_t uniqueTouchEventId; | 624 uint32_t uniqueTouchEventId; |
616 | 625 |
617 WebTouchEvent() | 626 WebTouchEvent() |
618 : WebInputEvent(sizeof(WebTouchEvent)) | 627 : WebInputEvent(sizeof(WebTouchEvent)) |
619 , touchesLength(0) | 628 , touchesLength(0) |
620 , cancelable(true) | 629 , dispatchType(Blocking) |
621 , movedBeyondSlopRegion(false) | 630 , movedBeyondSlopRegion(false) |
622 , uniqueTouchEventId(0) | 631 , uniqueTouchEventId(0) |
623 { | 632 { |
624 } | 633 } |
625 }; | 634 }; |
626 | 635 |
627 #pragma pack(pop) | 636 #pragma pack(pop) |
628 | 637 |
629 } // namespace blink | 638 } // namespace blink |
630 | 639 |
631 #endif | 640 #endif |
OLD | NEW |