| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 = 12 }; |
| 489 | 489 |
| 490 unsigned touchesLength; | 490 unsigned touchesLength; |
| 491 // List of all touches which are currently down. | 491 // List of all touches, regardless of state. |
| 492 WebTouchPoint touches[touchesLengthCap]; | 492 WebTouchPoint touches[touchesLengthCap]; |
| 493 | 493 |
| 494 // FIXME: Remove after eliminating downstream references, crbug.com/358132. |
| 494 unsigned changedTouchesLength; | 495 unsigned changedTouchesLength; |
| 495 // List of all touches whose state has changed since the last WebTouchEvent | 496 // List of all touches whose state has changed since the last WebTouchEvent |
| 496 WebTouchPoint changedTouches[touchesLengthCap]; | 497 WebTouchPoint changedTouches[touchesLengthCap]; |
| 497 | 498 |
| 498 unsigned targetTouchesLength; | |
| 499 // List of all touches which are currently down and are targeting the event
recipient. | |
| 500 WebTouchPoint targetTouches[touchesLengthCap]; | |
| 501 | |
| 502 // Whether the event can be canceled (with preventDefault). If true then the
browser | 499 // Whether the event can be canceled (with preventDefault). If true then the
browser |
| 503 // must wait for an ACK for this event. If false then no ACK IPC is expected
. | 500 // must wait for an ACK for this event. If false then no ACK IPC is expected
. |
| 504 // See comment at the top for why an int is used here instead of a bool. | 501 // See comment at the top for why an int is used here instead of a bool. |
| 505 int cancelable; | 502 int cancelable; |
| 506 | 503 |
| 507 WebTouchEvent() | 504 WebTouchEvent() |
| 508 : WebInputEvent(sizeof(WebTouchEvent)) | 505 : WebInputEvent(sizeof(WebTouchEvent)) |
| 509 , touchesLength(0) | 506 , touchesLength(0) |
| 510 , changedTouchesLength(0) | 507 , changedTouchesLength(0) |
| 511 , targetTouchesLength(0) | |
| 512 , cancelable(true) | 508 , cancelable(true) |
| 513 { | 509 { |
| 514 } | 510 } |
| 515 }; | 511 }; |
| 516 | 512 |
| 517 #pragma pack(pop) | 513 #pragma pack(pop) |
| 518 | 514 |
| 519 } // namespace blink | 515 } // namespace blink |
| 520 | 516 |
| 521 #endif | 517 #endif |
| OLD | NEW |