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

Unified Diff: third_party/WebKit/Source/core/dom/Touch.h

Issue 1415673004: Added web-exposed constructor for Touch and TouchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed runtime enabled for Touch/TouchInit Created 5 years, 1 month 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 | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/dom/Touch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Touch.h
diff --git a/third_party/WebKit/Source/core/dom/Touch.h b/third_party/WebKit/Source/core/dom/Touch.h
index b43b3879645c7e87ce3fbec10e222628db565002..9d5490a24135fa5b0b6f62a6736d4a173c9d7309 100644
--- a/third_party/WebKit/Source/core/dom/Touch.h
+++ b/third_party/WebKit/Source/core/dom/Touch.h
@@ -28,6 +28,8 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/CoreExport.h"
+#include "core/dom/Document.h"
+#include "core/dom/TouchInit.h"
#include "core/events/EventTarget.h"
#include "platform/geometry/FloatPoint.h"
#include "platform/geometry/FloatSize.h"
@@ -52,6 +54,11 @@ public:
new Touch(frame, target, identifier, screenPos, pagePos, radius, rotationAngle, force));
}
+ static PassRefPtrWillBeRawPtr<Touch> create(const Document& document, const TouchInit& initializer)
+ {
+ return adoptRefWillBeNoop(new Touch(document.frame(), initializer));
+ }
+
// DOM Touch implementation
EventTarget* target() const { return m_target.get(); }
int identifier() const { return m_identifier; }
@@ -82,6 +89,8 @@ private:
const FloatPoint& screenPos, const FloatPoint& pagePos,
const FloatSize& radius, float rotationAngle, float force, LayoutPoint absoluteLocation);
+ Touch(LocalFrame*, const TouchInit&);
+
RefPtrWillBeMember<EventTarget> m_target;
int m_identifier;
// Position relative to the viewport in CSS px.
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/dom/Touch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698