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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 memset(&data, 0, sizeof(data)); | 478 memset(&data, 0, sizeof(data)); |
479 } | 479 } |
480 }; | 480 }; |
481 | 481 |
482 // WebTouchEvent -------------------------------------------------------------- | 482 // WebTouchEvent -------------------------------------------------------------- |
483 | 483 |
484 class WebTouchEvent : public WebInputEvent { | 484 class WebTouchEvent : public WebInputEvent { |
485 public: | 485 public: |
486 // Maximum number of simultaneous touches supported on | 486 // Maximum number of simultaneous touches supported on |
487 // Ash/Aura. | 487 // Ash/Aura. |
488 enum { touchesLengthCap = 12 }; | 488 enum { touchesLengthCap = 16 }; |
489 | 489 |
490 unsigned touchesLength; | 490 unsigned touchesLength; |
491 // List of all touches, regardless of state. | 491 // List of all touches, regardless of state. |
492 WebTouchPoint touches[touchesLengthCap]; | 492 WebTouchPoint touches[touchesLengthCap]; |
493 | 493 |
494 // Whether the event can be canceled (with preventDefault). If true then the
browser | 494 // Whether the event can be canceled (with preventDefault). If true then the
browser |
495 // must wait for an ACK for this event. If false then no ACK IPC is expected
. | 495 // must wait for an ACK for this event. If false then no ACK IPC is expected
. |
496 // See comment at the top for why an int is used here instead of a bool. | 496 // See comment at the top for why an int is used here instead of a bool. |
497 int cancelable; | 497 int cancelable; |
498 | 498 |
499 WebTouchEvent() | 499 WebTouchEvent() |
500 : WebInputEvent(sizeof(WebTouchEvent)) | 500 : WebInputEvent(sizeof(WebTouchEvent)) |
501 , touchesLength(0) | 501 , touchesLength(0) |
502 , cancelable(true) | 502 , cancelable(true) |
503 { | 503 { |
504 } | 504 } |
505 }; | 505 }; |
506 | 506 |
507 #pragma pack(pop) | 507 #pragma pack(pop) |
508 | 508 |
509 } // namespace blink | 509 } // namespace blink |
510 | 510 |
511 #endif | 511 #endif |
OLD | NEW |