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 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 // FIXME: Make this a variable that somehow depends on hardware max. |
|
Rick Byers
2014/10/09 14:31:23
I'm fine saying we'll never plan to support >16 (i
mustaq
2014/10/09 14:53:36
Done.
| |
| 489 enum { touchesLengthCap = 16 }; | |
| 489 | 490 |
| 490 unsigned touchesLength; | 491 unsigned touchesLength; |
| 491 // List of all touches, regardless of state. | 492 // List of all touches, regardless of state. |
| 492 WebTouchPoint touches[touchesLengthCap]; | 493 WebTouchPoint touches[touchesLengthCap]; |
| 493 | 494 |
| 494 // Whether the event can be canceled (with preventDefault). If true then the browser | 495 // 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 . | 496 // 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. | 497 // See comment at the top for why an int is used here instead of a bool. |
| 497 int cancelable; | 498 int cancelable; |
| 498 | 499 |
| 499 WebTouchEvent() | 500 WebTouchEvent() |
| 500 : WebInputEvent(sizeof(WebTouchEvent)) | 501 : WebInputEvent(sizeof(WebTouchEvent)) |
| 501 , touchesLength(0) | 502 , touchesLength(0) |
| 502 , cancelable(true) | 503 , cancelable(true) |
| 503 { | 504 { |
| 504 } | 505 } |
| 505 }; | 506 }; |
| 506 | 507 |
| 507 #pragma pack(pop) | 508 #pragma pack(pop) |
| 508 | 509 |
| 509 } // namespace blink | 510 } // namespace blink |
| 510 | 511 |
| 511 #endif | 512 #endif |
| OLD | NEW |