Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: third_party/WebKit/Source/core/events/GestureEvent.h

Issue 2539283002: Remove PlatformGestureEvent in favour of using WebGestureEvent (Closed)
Patch Set: Add missing copyright on new file Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/events/GestureEvent.h
diff --git a/third_party/WebKit/Source/core/events/GestureEvent.h b/third_party/WebKit/Source/core/events/GestureEvent.h
index bc6b40773354ba2382e341e57493af46767f45a4..7f470312af0b07b08a8a34f9060b9961b5b37bc3 100644
--- a/third_party/WebKit/Source/core/events/GestureEvent.h
+++ b/third_party/WebKit/Source/core/events/GestureEvent.h
@@ -28,68 +28,28 @@
#include "core/CoreExport.h"
#include "core/events/EventDispatcher.h"
-#include "core/events/MouseRelatedEvent.h"
-#include "platform/PlatformGestureEvent.h"
+#include "core/events/UIEventWithKeyState.h"
+#include "public/platform/WebGestureEvent.h"
namespace blink {
-enum GestureSource {
- GestureSourceUninitialized,
- GestureSourceTouchpad,
- GestureSourceTouchscreen
-};
-
-class CORE_EXPORT GestureEvent final : public MouseRelatedEvent {
+class CORE_EXPORT GestureEvent final : public UIEventWithKeyState {
public:
+ static GestureEvent* create(AbstractView*, const WebGestureEvent&);
~GestureEvent() override {}
- static GestureEvent* create(AbstractView*, const PlatformGestureEvent&);
-
bool isGestureEvent() const override;
const AtomicString& interfaceName() const override;
- float deltaX() const { return m_deltaX; }
- float deltaY() const { return m_deltaY; }
- float velocityX() const { return m_velocityX; }
- float velocityY() const { return m_velocityY; }
- ScrollInertialPhase inertialPhase() const { return m_inertialPhase; }
-
- GestureSource source() const { return m_source; }
- int resendingPluginId() const { return m_resendingPluginId; }
- bool synthetic() const { return m_synthetic; }
- ScrollGranularity deltaUnits() const { return m_deltaUnits; }
+ const WebGestureEvent& nativeEvent() const { return m_nativeEvent; }
DECLARE_VIRTUAL_TRACE();
private:
- GestureEvent(const AtomicString& type,
- AbstractView*,
- int screenX,
- int screenY,
- int clientX,
- int clientY,
- PlatformEvent::Modifiers,
- float deltaX,
- float deltaY,
- float velocityX,
- float velocityY,
- ScrollInertialPhase,
- bool synthetic,
- ScrollGranularity deltaUnits,
- TimeTicks platformTimeStamp,
- int resendingPluginId,
- GestureSource);
+ GestureEvent(const AtomicString&, AbstractView*, const WebGestureEvent&);
- float m_deltaX;
- float m_deltaY;
- float m_velocityX;
- float m_velocityY;
- ScrollInertialPhase m_inertialPhase;
- bool m_synthetic;
- ScrollGranularity m_deltaUnits;
- GestureSource m_source;
- int m_resendingPluginId;
+ WebGestureEvent m_nativeEvent;
};
DEFINE_EVENT_TYPE_CASTS(GestureEvent);
« no previous file with comments | « third_party/WebKit/Source/core/editing/SelectionController.cpp ('k') | third_party/WebKit/Source/core/events/GestureEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698