OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. 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 15 matching lines...) Expand all Loading... | |
26 #ifndef VTTRegionList_h | 26 #ifndef VTTRegionList_h |
27 #define VTTRegionList_h | 27 #define VTTRegionList_h |
28 | 28 |
29 #include "core/html/track/vtt/VTTRegion.h" | 29 #include "core/html/track/vtt/VTTRegion.h" |
30 #include "wtf/PassRefPtr.h" | 30 #include "wtf/PassRefPtr.h" |
31 #include "wtf/RefCounted.h" | 31 #include "wtf/RefCounted.h" |
32 #include "wtf/Vector.h" | 32 #include "wtf/Vector.h" |
33 | 33 |
34 namespace WebCore { | 34 namespace WebCore { |
35 | 35 |
36 class VTTRegionList : public RefCounted<VTTRegionList> { | 36 class VTTRegionList FINAL : public RefCountedWillBeGarbageCollected<VTTRegionLis t> { |
37 public: | 37 public: |
38 static PassRefPtr<VTTRegionList> create() | 38 static PassRefPtrWillBeRawPtr<VTTRegionList> create() |
39 { | 39 { |
40 return adoptRef(new VTTRegionList()); | 40 return adoptRefWillBeNoop(new VTTRegionList()); |
41 } | 41 } |
42 | 42 |
43 ~VTTRegionList() { } | |
44 | |
45 unsigned long length() const; | 43 unsigned long length() const; |
46 | 44 |
47 VTTRegion* item(unsigned index) const; | 45 VTTRegion* item(unsigned index) const; |
48 VTTRegion* getRegionById(const String&) const; | 46 VTTRegion* getRegionById(const String&) const; |
49 | 47 |
50 void add(PassRefPtr<VTTRegion>); | 48 void add(PassRefPtrWillBeRawPtr<VTTRegion>); |
51 bool remove(VTTRegion*); | 49 bool remove(VTTRegion*); |
52 | 50 |
51 void trace(Visitor*); | |
52 | |
53 private: | 53 private: |
54 VTTRegionList(); | 54 VTTRegionList(); |
55 void clear(); | 55 void clear(); |
haraken
2014/04/22 02:37:47
This clear() method is unused. You can remove it.
sof
2014/04/22 06:27:52
Nice; removed.
| |
56 | 56 |
57 Vector<RefPtr<VTTRegion> > m_list; | 57 WillBeHeapVector<RefPtrWillBeMember<VTTRegion> > m_list; |
58 }; | 58 }; |
59 | 59 |
60 } // namespace WebCore | 60 } // namespace WebCore |
61 | 61 |
62 #endif | 62 #endif |
OLD | NEW |