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

Unified Diff: Source/core/dom/TouchList.h

Issue 23522051: Get rid of custom code for Document::createTouchList() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing references Created 7 years, 3 months 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
« Source/core/dom/Document.h ('K') | « Source/core/dom/Document.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/TouchList.h
diff --git a/Source/core/dom/TouchList.h b/Source/core/dom/TouchList.h
index 74a712cd0a2fa6af8c08458909d6a268c6a19d15..6d5f2bf2c9ce172f90196770ffe262061eb0a618 100644
--- a/Source/core/dom/TouchList.h
+++ b/Source/core/dom/TouchList.h
@@ -40,6 +40,11 @@ public:
return adoptRef(new TouchList);
}
+ static PassRefPtr<TouchList> create(Vector<RefPtr<Touch> >& touches)
+ {
+ return adoptRef(new TouchList(touches));
+ }
+
unsigned length() const { return m_values.size(); }
Touch* item(unsigned);
@@ -53,6 +58,12 @@ private:
ScriptWrappable::init(this);
}
+ TouchList(Vector<RefPtr<Touch> >& touches)
+ {
+ m_values.swap(touches);
+ ScriptWrappable::init(this);
+ }
+
Vector<RefPtr<Touch> > m_values;
};
« Source/core/dom/Document.h ('K') | « Source/core/dom/Document.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698