| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 y(0), | 417 y(0), |
| 418 windowX(0), | 418 windowX(0), |
| 419 windowY(0), | 419 windowY(0), |
| 420 globalX(0), | 420 globalX(0), |
| 421 globalY(0), | 421 globalY(0), |
| 422 movementX(0), | 422 movementX(0), |
| 423 movementY(0), | 423 movementY(0), |
| 424 clickCount(0) {} | 424 clickCount(0) {} |
| 425 }; | 425 }; |
| 426 | 426 |
| 427 // WebMouseWheelEvent --------------------------------------------------------- | |
| 428 | |
| 429 class WebMouseWheelEvent : public WebMouseEvent { | |
| 430 public: | |
| 431 enum Phase { | |
| 432 PhaseNone = 0, | |
| 433 PhaseBegan = 1 << 0, | |
| 434 PhaseStationary = 1 << 1, | |
| 435 PhaseChanged = 1 << 2, | |
| 436 PhaseEnded = 1 << 3, | |
| 437 PhaseCancelled = 1 << 4, | |
| 438 PhaseMayBegin = 1 << 5, | |
| 439 }; | |
| 440 | |
| 441 float deltaX; | |
| 442 float deltaY; | |
| 443 float wheelTicksX; | |
| 444 float wheelTicksY; | |
| 445 | |
| 446 float accelerationRatioX; | |
| 447 float accelerationRatioY; | |
| 448 | |
| 449 // This field exists to allow BrowserPlugin to mark MouseWheel events as | |
| 450 // 'resent' to handle the case where an event is not consumed when first | |
| 451 // encountered; it should be handled differently by the plugin when it is | |
| 452 // sent for thesecond time. No code within Blink touches this, other than to | |
| 453 // plumb it through event conversions. | |
| 454 int resendingPluginId; | |
| 455 | |
| 456 Phase phase; | |
| 457 Phase momentumPhase; | |
| 458 | |
| 459 bool scrollByPage; | |
| 460 bool hasPreciseScrollingDeltas; | |
| 461 | |
| 462 RailsMode railsMode; | |
| 463 | |
| 464 // Whether the event is blocking, non-blocking, all event | |
| 465 // listeners were passive or was forced to be non-blocking. | |
| 466 DispatchType dispatchType; | |
| 467 | |
| 468 WebMouseWheelEvent() | |
| 469 : WebMouseEvent(sizeof(WebMouseWheelEvent)), | |
| 470 deltaX(0.0f), | |
| 471 deltaY(0.0f), | |
| 472 wheelTicksX(0.0f), | |
| 473 wheelTicksY(0.0f), | |
| 474 accelerationRatioX(1.0f), | |
| 475 accelerationRatioY(1.0f), | |
| 476 resendingPluginId(-1), | |
| 477 phase(PhaseNone), | |
| 478 momentumPhase(PhaseNone), | |
| 479 scrollByPage(false), | |
| 480 hasPreciseScrollingDeltas(false), | |
| 481 railsMode(RailsModeFree), | |
| 482 dispatchType(Blocking) {} | |
| 483 }; | |
| 484 | |
| 485 | |
| 486 // WebTouchEvent -------------------------------------------------------------- | 427 // WebTouchEvent -------------------------------------------------------------- |
| 487 | 428 |
| 488 // TODO(e_hakkinen): Replace with WebPointerEvent. crbug.com/508283 | 429 // TODO(e_hakkinen): Replace with WebPointerEvent. crbug.com/508283 |
| 489 class WebTouchEvent : public WebInputEvent { | 430 class WebTouchEvent : public WebInputEvent { |
| 490 public: | 431 public: |
| 491 // Maximum number of simultaneous touches supported on | 432 // Maximum number of simultaneous touches supported on |
| 492 // Ash/Aura. | 433 // Ash/Aura. |
| 493 enum { kTouchesLengthCap = 16 }; | 434 enum { kTouchesLengthCap = 16 }; |
| 494 | 435 |
| 495 unsigned touchesLength; | 436 unsigned touchesLength; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 520 movedBeyondSlopRegion(false), | 461 movedBeyondSlopRegion(false), |
| 521 touchStartOrFirstTouchMove(false), | 462 touchStartOrFirstTouchMove(false), |
| 522 uniqueTouchEventId(0) {} | 463 uniqueTouchEventId(0) {} |
| 523 }; | 464 }; |
| 524 | 465 |
| 525 #pragma pack(pop) | 466 #pragma pack(pop) |
| 526 | 467 |
| 527 } // namespace blink | 468 } // namespace blink |
| 528 | 469 |
| 529 #endif | 470 #endif |
| OLD | NEW |