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

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

Issue 2507503002: Use touch events to report stylus events (Closed)
Patch Set: I should pay attention... 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
« no previous file with comments | « content/renderer/pepper/event_conversion.cc ('k') | third_party/WebKit/Source/core/events/TouchEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/events/TouchEvent.h
diff --git a/third_party/WebKit/Source/core/events/TouchEvent.h b/third_party/WebKit/Source/core/events/TouchEvent.h
index 307663c0048e857ad1be3e50979422598e197fc9..340f9c0040866687d7de9c9fc7b04e29396e4549 100644
--- a/third_party/WebKit/Source/core/events/TouchEvent.h
+++ b/third_party/WebKit/Source/core/events/TouchEvent.h
@@ -32,6 +32,7 @@
#include "core/events/EventDispatchMediator.h"
#include "core/events/MouseRelatedEvent.h"
#include "core/events/TouchEventInit.h"
+#include "public/platform/WebPointerProperties.h"
namespace blink {
@@ -54,11 +55,12 @@ class CORE_EXPORT TouchEvent final : public UIEventWithKeyState {
bool causesScrollingIfUncanceled,
bool firstTouchMoveOrStart,
double platformTimeStamp,
- TouchAction currentTouchAction) {
+ TouchAction currentTouchAction,
+ WebPointerProperties::PointerType pointerType) {
return new TouchEvent(touches, targetTouches, changedTouches, type, view,
modifiers, cancelable, causesScrollingIfUncanceled,
firstTouchMoveOrStart, platformTimeStamp,
- currentTouchAction);
+ currentTouchAction, pointerType);
}
static TouchEvent* create(const AtomicString& type,
@@ -92,6 +94,12 @@ class CORE_EXPORT TouchEvent final : public UIEventWithKeyState {
EventDispatchMediator* createMediator() override;
+ // Transient property to inform PPAPI of touch pointer types. Will be replaced
+ // when blink transitions to handling end-to-end pointer events.
+ WebPointerProperties::PointerType pointerType() const {
+ return m_pointerType;
+ }
+
DECLARE_VIRTUAL_TRACE();
private:
@@ -106,7 +114,8 @@ class CORE_EXPORT TouchEvent final : public UIEventWithKeyState {
bool causesScrollingIfUncanceled,
bool firstTouchMoveOrStart,
double platformTimeStamp,
- TouchAction currentTouchAction);
+ TouchAction currentTouchAction,
+ WebPointerProperties::PointerType);
TouchEvent(const AtomicString&, const TouchEventInit&);
Member<TouchList> m_touches;
@@ -119,6 +128,8 @@ class CORE_EXPORT TouchEvent final : public UIEventWithKeyState {
// The current effective touch action computed before each
// touchstart event is generated. It is used for UMA histograms.
TouchAction m_currentTouchAction;
+
+ WebPointerProperties::PointerType m_pointerType;
};
class TouchEventDispatchMediator final : public EventDispatchMediator {
« no previous file with comments | « content/renderer/pepper/event_conversion.cc ('k') | third_party/WebKit/Source/core/events/TouchEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698