| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * * Redistributions of source code must retain the above copyright | 7 * * Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * * Redistributions in binary form must reproduce the above copyright | 9 * * Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 ~GestureEvent() override { } | 38 ~GestureEvent() override { } |
| 39 | 39 |
| 40 static PassRefPtrWillBeRawPtr<GestureEvent> create(PassRefPtrWillBeRawPtr<Ab
stractView>, const PlatformGestureEvent&); | 40 static PassRefPtrWillBeRawPtr<GestureEvent> create(PassRefPtrWillBeRawPtr<Ab
stractView>, const PlatformGestureEvent&); |
| 41 | 41 |
| 42 bool isGestureEvent() const override; | 42 bool isGestureEvent() const override; |
| 43 | 43 |
| 44 const AtomicString& interfaceName() const override; | 44 const AtomicString& interfaceName() const override; |
| 45 | 45 |
| 46 float deltaX() const { return m_deltaX; } | 46 float deltaX() const { return m_deltaX; } |
| 47 float deltaY() const { return m_deltaY; } | 47 float deltaY() const { return m_deltaY; } |
| 48 float velocityX() const { return m_velocityX; } |
| 49 float velocityY() const { return m_velocityY; } |
| 50 bool inertial() const { return m_inertial; } |
| 51 |
| 52 int resendingPluginId() const { return m_resendingPluginId; } |
| 48 | 53 |
| 49 PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator() override; | 54 PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator() override; |
| 50 | 55 |
| 51 DECLARE_VIRTUAL_TRACE(); | 56 DECLARE_VIRTUAL_TRACE(); |
| 52 | 57 |
| 53 private: | 58 private: |
| 54 GestureEvent(); | 59 GestureEvent(); |
| 55 GestureEvent(const AtomicString& type, PassRefPtrWillBeRawPtr<AbstractView>,
int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey,
bool shiftKey, bool metaKey, float deltaX, float deltaY, double uiTimeStamp); | 60 GestureEvent(const AtomicString& type, PassRefPtrWillBeRawPtr<AbstractView>,
int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey,
bool shiftKey, bool metaKey, float deltaX, float deltaY, float velocityX, float
velocityY, bool inertial, double uiTimeStamp, int resendingPluginId); |
| 56 | 61 |
| 57 float m_deltaX; | 62 float m_deltaX; |
| 58 float m_deltaY; | 63 float m_deltaY; |
| 64 float m_velocityX; |
| 65 float m_velocityY; |
| 66 bool m_inertial; |
| 67 |
| 68 int m_resendingPluginId; |
| 59 }; | 69 }; |
| 60 | 70 |
| 61 class GestureEventDispatchMediator final : public EventDispatchMediator { | 71 class GestureEventDispatchMediator final : public EventDispatchMediator { |
| 62 public: | 72 public: |
| 63 static PassRefPtrWillBeRawPtr<GestureEventDispatchMediator> create(PassRefPt
rWillBeRawPtr<GestureEvent> gestureEvent) | 73 static PassRefPtrWillBeRawPtr<GestureEventDispatchMediator> create(PassRefPt
rWillBeRawPtr<GestureEvent> gestureEvent) |
| 64 { | 74 { |
| 65 return adoptRefWillBeNoop(new GestureEventDispatchMediator(gestureEvent)
); | 75 return adoptRefWillBeNoop(new GestureEventDispatchMediator(gestureEvent)
); |
| 66 } | 76 } |
| 67 | 77 |
| 68 private: | 78 private: |
| 69 explicit GestureEventDispatchMediator(PassRefPtrWillBeRawPtr<GestureEvent>); | 79 explicit GestureEventDispatchMediator(PassRefPtrWillBeRawPtr<GestureEvent>); |
| 70 | 80 |
| 71 GestureEvent& event() const; | 81 GestureEvent& event() const; |
| 72 | 82 |
| 73 bool dispatchEvent(EventDispatcher&) const override; | 83 bool dispatchEvent(EventDispatcher&) const override; |
| 74 }; | 84 }; |
| 75 | 85 |
| 76 DEFINE_EVENT_TYPE_CASTS(GestureEvent); | 86 DEFINE_EVENT_TYPE_CASTS(GestureEvent); |
| 77 | 87 |
| 78 } // namespace blink | 88 } // namespace blink |
| 79 | 89 |
| 80 #endif // GestureEvent_h | 90 #endif // GestureEvent_h |
| OLD | NEW |