X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fmodules%2Fmediasource%2FSourceBufferList.h;h=e7857e74cc4fc4096a6a888d6835699eeed82821;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=cef927f760d9c0f7259fe8b83641527e0c6f746e;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/modules/mediasource/SourceBufferList.h b/src/third_party/WebKit/Source/modules/mediasource/SourceBufferList.h index cef927f..e7857e7 100644 --- a/src/third_party/WebKit/Source/modules/mediasource/SourceBufferList.h +++ b/src/third_party/WebKit/Source/modules/mediasource/SourceBufferList.h @@ -33,6 +33,7 @@ #include "bindings/v8/ScriptWrappable.h" #include "core/events/EventTarget.h" +#include "heap/Handle.h" #include "wtf/RefCounted.h" #include "wtf/Vector.h" @@ -41,19 +42,20 @@ namespace WebCore { class SourceBuffer; class GenericEventQueue; -class SourceBufferList FINAL : public RefCounted, public ScriptWrappable, public EventTargetWithInlineData { - REFCOUNTED_EVENT_TARGET(SourceBufferList); +class SourceBufferList FINAL : public RefCountedWillBeRefCountedGarbageCollected, public ScriptWrappable, public EventTargetWithInlineData { + DECLARE_GC_INFO; + DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected); public: - static PassRefPtr create(ExecutionContext* context, GenericEventQueue* asyncEventQueue) + static PassRefPtrWillBeRawPtr create(ExecutionContext* context, GenericEventQueue* asyncEventQueue) { - return adoptRef(new SourceBufferList(context, asyncEventQueue)); + return adoptRefCountedWillBeRefCountedGarbageCollected(new SourceBufferList(context, asyncEventQueue)); } virtual ~SourceBufferList(); unsigned long length() const { return m_list.size(); } SourceBuffer* item(unsigned long index) const { return (index < m_list.size()) ? m_list[index].get() : 0; } - void add(PassRefPtr); + void add(PassRefPtrWillBeRawPtr); void remove(SourceBuffer*); bool contains(SourceBuffer* buffer) { return m_list.find(buffer) != kNotFound; } void clear(); @@ -62,6 +64,8 @@ public: virtual const AtomicString& interfaceName() const OVERRIDE; virtual ExecutionContext* executionContext() const OVERRIDE; + void trace(Visitor*); + private: SourceBufferList(ExecutionContext*, GenericEventQueue*); @@ -70,7 +74,7 @@ private: ExecutionContext* m_executionContext; GenericEventQueue* m_asyncEventQueue; - Vector > m_list; + WillBeHeapVector > m_list; }; } // namespace WebCore