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

Side by Side Diff: Source/core/dom/TouchList.h

Issue 185413023: Oilpan: move Touch related objects to the oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Avoid MSVC local class member function restriction Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « Source/core/dom/Touch.idl ('k') | Source/core/dom/TouchList.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2008, The Android Open Source Project 2 * Copyright 2008, The Android Open Source Project
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 10 matching lines...) Expand all
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef TouchList_h 26 #ifndef TouchList_h
27 #define TouchList_h 27 #define TouchList_h
28 28
29 #include "bindings/v8/ScriptWrappable.h" 29 #include "bindings/v8/ScriptWrappable.h"
30 #include "core/dom/Touch.h" 30 #include "core/dom/Touch.h"
31 #include "heap/Handle.h"
31 #include "wtf/RefCounted.h" 32 #include "wtf/RefCounted.h"
32 #include "wtf/Vector.h" 33 #include "wtf/Vector.h"
33 34
34 namespace WebCore { 35 namespace WebCore {
35 36
36 class TouchList : public RefCounted<TouchList>, public ScriptWrappable { 37 class TouchList : public RefCountedWillBeGarbageCollectedFinalized<TouchList>, p ublic ScriptWrappable {
37 public: 38 public:
38 static PassRefPtr<TouchList> create() 39 static PassRefPtrWillBeRawPtr<TouchList> create()
39 { 40 {
40 return adoptRef(new TouchList); 41 return adoptRefWillBeNoop(new TouchList);
41 } 42 }
42 43
43 static PassRefPtr<TouchList> create(Vector<RefPtr<Touch> >& touches) 44 static PassRefPtrWillBeRawPtr<TouchList> create(WillBeHeapVector<RefPtrWillB eMember<Touch> >& touches)
44 { 45 {
45 return adoptRef(new TouchList(touches)); 46 return adoptRefWillBeNoop(new TouchList(touches));
46 } 47 }
47 48
48 unsigned length() const { return m_values.size(); } 49 unsigned length() const { return m_values.size(); }
49 50
50 Touch* item(unsigned); 51 Touch* item(unsigned);
51 const Touch* item(unsigned) const; 52 const Touch* item(unsigned) const;
52 53
53 void append(const PassRefPtr<Touch> touch) { m_values.append(touch); } 54 void append(const PassRefPtrWillBeRawPtr<Touch> touch) { m_values.append(tou ch); }
55
56 void trace(Visitor*);
54 57
55 private: 58 private:
56 TouchList() 59 TouchList()
57 { 60 {
58 ScriptWrappable::init(this); 61 ScriptWrappable::init(this);
59 } 62 }
60 63
61 TouchList(Vector<RefPtr<Touch> >& touches) 64 TouchList(WillBeHeapVector<RefPtrWillBeMember<Touch> >& touches)
62 { 65 {
63 m_values.swap(touches); 66 m_values.swap(touches);
64 ScriptWrappable::init(this); 67 ScriptWrappable::init(this);
65 } 68 }
66 69
67 Vector<RefPtr<Touch> > m_values; 70 WillBeHeapVector<RefPtrWillBeMember<Touch> > m_values;
68 }; 71 };
69 72
70 } // namespace WebCore 73 } // namespace WebCore
71 74
72 #endif /* TouchList_h */ 75 #endif /* TouchList_h */
OLDNEW
« no previous file with comments | « Source/core/dom/Touch.idl ('k') | Source/core/dom/TouchList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698