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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 float deltaX() const { return m_deltaX; } | 52 float deltaX() const { return m_deltaX; } |
53 float deltaY() const { return m_deltaY; } | 53 float deltaY() const { return m_deltaY; } |
54 float velocityX() const { return m_velocityX; } | 54 float velocityX() const { return m_velocityX; } |
55 float velocityY() const { return m_velocityY; } | 55 float velocityY() const { return m_velocityY; } |
56 bool inertial() const { return m_inertial; } | 56 bool inertial() const { return m_inertial; } |
57 | 57 |
58 GestureSource source() const { return m_source; } | 58 GestureSource source() const { return m_source; } |
59 int resendingPluginId() const { return m_resendingPluginId; } | 59 int resendingPluginId() const { return m_resendingPluginId; } |
60 | 60 |
61 PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator() override; | |
62 | |
63 DECLARE_VIRTUAL_TRACE(); | 61 DECLARE_VIRTUAL_TRACE(); |
64 | 62 |
65 private: | 63 private: |
66 GestureEvent(); | 64 GestureEvent(); |
67 GestureEvent(const AtomicString& type, PassRefPtrWillBeRawPtr<AbstractView>,
int screenX, int screenY, int clientX, int clientY, PlatformEvent::Modifiers, f
loat deltaX, float deltaY, float velocityX, float velocityY, bool inertial, doub
le platformTimeStamp, int resendingPluginId, GestureSource); | 65 GestureEvent(const AtomicString& type, PassRefPtrWillBeRawPtr<AbstractView>,
int screenX, int screenY, int clientX, int clientY, PlatformEvent::Modifiers, f
loat deltaX, float deltaY, float velocityX, float velocityY, bool inertial, doub
le platformTimeStamp, int resendingPluginId, GestureSource); |
68 | 66 |
69 float m_deltaX; | 67 float m_deltaX; |
70 float m_deltaY; | 68 float m_deltaY; |
71 float m_velocityX; | 69 float m_velocityX; |
72 float m_velocityY; | 70 float m_velocityY; |
73 bool m_inertial; | 71 bool m_inertial; |
74 | 72 |
75 GestureSource m_source; | 73 GestureSource m_source; |
76 int m_resendingPluginId; | 74 int m_resendingPluginId; |
77 }; | 75 }; |
78 | 76 |
79 class GestureEventDispatchMediator final : public EventDispatchMediator { | |
80 public: | |
81 static PassRefPtrWillBeRawPtr<GestureEventDispatchMediator> create(PassRefPt
rWillBeRawPtr<GestureEvent> gestureEvent) | |
82 { | |
83 return adoptRefWillBeNoop(new GestureEventDispatchMediator(gestureEvent)
); | |
84 } | |
85 | |
86 private: | |
87 explicit GestureEventDispatchMediator(PassRefPtrWillBeRawPtr<GestureEvent>); | |
88 | |
89 GestureEvent& event() const; | |
90 | |
91 bool dispatchEvent(EventDispatcher&) const override; | |
92 }; | |
93 | |
94 DEFINE_EVENT_TYPE_CASTS(GestureEvent); | 77 DEFINE_EVENT_TYPE_CASTS(GestureEvent); |
95 | 78 |
96 } // namespace blink | 79 } // namespace blink |
97 | 80 |
98 #endif // GestureEvent_h | 81 #endif // GestureEvent_h |
OLD | NEW |