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

Unified Diff: Source/modules/mediasource/SourceBufferList.h

Issue 16625011: Add minimal implementation of unprefixed MediaSource API that has feature parity with prefixed API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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
Index: Source/modules/mediasource/SourceBufferList.h
diff --git a/Source/modules/mediasource/WebKitSourceBufferList.h b/Source/modules/mediasource/SourceBufferList.h
similarity index 73%
copy from Source/modules/mediasource/WebKitSourceBufferList.h
copy to Source/modules/mediasource/SourceBufferList.h
index c8a4b5cc08510dbe0558e9df2f948f5a107f0ea8..753b3aab1c48961cf10c7965d551be55831ed676 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,37 +38,38 @@
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;
+ SourceBuffer* item(unsigned index) const;
- void add(PassRefPtr<WebKitSourceBuffer>);
- bool remove(WebKitSourceBuffer*);
+ void add(PassRefPtr<SourceBuffer>);
+ void remove(SourceBuffer*);
+ bool contains(SourceBuffer*);
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&);
@@ -79,7 +80,7 @@ private:
ScriptExecutionContext* m_scriptExecutionContext;
GenericEventQueue* m_asyncEventQueue;
- Vector<RefPtr<WebKitSourceBuffer> > m_list;
+ Vector<RefPtr<SourceBuffer> > m_list;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698