| Index: Source/modules/mediasource/SourceBufferList.h
|
| diff --git a/Source/modules/mediasource/WebKitSourceBufferList.h b/Source/modules/mediasource/SourceBufferList.h
|
| similarity index 69%
|
| copy from Source/modules/mediasource/WebKitSourceBufferList.h
|
| copy to Source/modules/mediasource/SourceBufferList.h
|
| index c8a4b5cc08510dbe0558e9df2f948f5a107f0ea8..cbe649c1c2afc464873a495d95dad37489b11d59 100644
|
| --- a/Source/modules/mediasource/WebKitSourceBufferList.h
|
| +++ b/Source/modules/mediasource/SourceBufferList.h
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (C) 2012 Google Inc. All rights reserved.
|
| + * Copyright (C) 2013 Google Inc. All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions are
|
| @@ -28,8 +28,8 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef WebKitSourceBufferList_h
|
| -#define WebKitSourceBufferList_h
|
| +#ifndef SourceBufferList_h
|
| +#define SourceBufferList_h
|
|
|
| #include "bindings/v8/ScriptWrappable.h"
|
| #include "core/dom/EventTarget.h"
|
| @@ -38,39 +38,40 @@
|
|
|
| namespace WebCore {
|
|
|
| -class WebKitSourceBuffer;
|
| +class SourceBuffer;
|
| class GenericEventQueue;
|
|
|
| -class WebKitSourceBufferList : public RefCounted<WebKitSourceBufferList>, public ScriptWrappable, public EventTarget {
|
| +class SourceBufferList : public RefCounted<SourceBufferList>, public ScriptWrappable, public EventTarget {
|
| public:
|
| - static PassRefPtr<WebKitSourceBufferList> create(ScriptExecutionContext* context, GenericEventQueue* asyncEventQueue)
|
| + static PassRefPtr<SourceBufferList> create(ScriptExecutionContext* context, GenericEventQueue* asyncEventQueue)
|
| {
|
| - return adoptRef(new WebKitSourceBufferList(context, asyncEventQueue));
|
| + return adoptRef(new SourceBufferList(context, asyncEventQueue));
|
| }
|
| - virtual ~WebKitSourceBufferList() { }
|
| + virtual ~SourceBufferList();
|
|
|
| - unsigned long length() const;
|
| - WebKitSourceBuffer* item(unsigned index) const;
|
| + 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<WebKitSourceBuffer>);
|
| - bool remove(WebKitSourceBuffer*);
|
| + void add(PassRefPtr<SourceBuffer>);
|
| + void remove(SourceBuffer*);
|
| + bool contains(SourceBuffer* buffer) { return m_list.find(buffer) != notFound; }
|
| void clear();
|
|
|
| // EventTarget interface
|
| virtual const AtomicString& interfaceName() const OVERRIDE;
|
| virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
|
|
|
| - using RefCounted<WebKitSourceBufferList>::ref;
|
| - using RefCounted<WebKitSourceBufferList>::deref;
|
| + using RefCounted<SourceBufferList>::ref;
|
| + using RefCounted<SourceBufferList>::deref;
|
|
|
| protected:
|
| virtual EventTargetData* eventTargetData() OVERRIDE;
|
| virtual EventTargetData* ensureEventTargetData() OVERRIDE;
|
|
|
| private:
|
| - WebKitSourceBufferList(ScriptExecutionContext*, GenericEventQueue*);
|
| + SourceBufferList(ScriptExecutionContext*, GenericEventQueue*);
|
|
|
| - void createAndFireEvent(const AtomicString&);
|
| + void scheduleEvent(const AtomicString&);
|
|
|
| virtual void refEventTarget() OVERRIDE { ref(); }
|
| virtual void derefEventTarget() OVERRIDE { deref(); }
|
| @@ -79,7 +80,7 @@ private:
|
| ScriptExecutionContext* m_scriptExecutionContext;
|
| GenericEventQueue* m_asyncEventQueue;
|
|
|
| - Vector<RefPtr<WebKitSourceBuffer> > m_list;
|
| + Vector<RefPtr<SourceBuffer> > m_list;
|
| };
|
|
|
| } // namespace WebCore
|
|
|