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

Side by Side Diff: Source/modules/mediasource/WebKitSourceBufferList.h

Issue 14619016: Add WebKit prefix to MediaSource,SourceBuffer, and SourceBufferList objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef SourceBufferList_h 31 #ifndef WebKitSourceBufferList_h
32 #define SourceBufferList_h 32 #define WebKitSourceBufferList_h
33 33
34 #include "core/dom/EventTarget.h" 34 #include "core/dom/EventTarget.h"
35 #include "wtf/RefCounted.h" 35 #include "wtf/RefCounted.h"
36 #include "wtf/Vector.h" 36 #include "wtf/Vector.h"
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 class SourceBuffer; 40 class WebKitSourceBuffer;
41 class GenericEventQueue; 41 class GenericEventQueue;
42 42
43 class SourceBufferList : public RefCounted<SourceBufferList>, public EventTarget { 43 class WebKitSourceBufferList : public RefCounted<WebKitSourceBufferList>, public EventTarget {
44 public: 44 public:
45 static PassRefPtr<SourceBufferList> create(ScriptExecutionContext* context, GenericEventQueue* asyncEventQueue) 45 static PassRefPtr<WebKitSourceBufferList> create(ScriptExecutionContext* con text, GenericEventQueue* asyncEventQueue)
46 { 46 {
47 return adoptRef(new SourceBufferList(context, asyncEventQueue)); 47 return adoptRef(new WebKitSourceBufferList(context, asyncEventQueue));
48 } 48 }
49 virtual ~SourceBufferList() { } 49 virtual ~WebKitSourceBufferList() { }
50 50
51 unsigned long length() const; 51 unsigned long length() const;
52 SourceBuffer* item(unsigned index) const; 52 WebKitSourceBuffer* item(unsigned index) const;
53 53
54 void add(PassRefPtr<SourceBuffer>); 54 void add(PassRefPtr<WebKitSourceBuffer>);
55 bool remove(SourceBuffer*); 55 bool remove(WebKitSourceBuffer*);
56 void clear(); 56 void clear();
57 57
58 // EventTarget interface 58 // EventTarget interface
59 virtual const AtomicString& interfaceName() const OVERRIDE; 59 virtual const AtomicString& interfaceName() const OVERRIDE;
60 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE; 60 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
61 61
62 using RefCounted<SourceBufferList>::ref; 62 using RefCounted<WebKitSourceBufferList>::ref;
63 using RefCounted<SourceBufferList>::deref; 63 using RefCounted<WebKitSourceBufferList>::deref;
64 64
65 protected: 65 protected:
66 virtual EventTargetData* eventTargetData() OVERRIDE; 66 virtual EventTargetData* eventTargetData() OVERRIDE;
67 virtual EventTargetData* ensureEventTargetData() OVERRIDE; 67 virtual EventTargetData* ensureEventTargetData() OVERRIDE;
68 68
69 private: 69 private:
70 SourceBufferList(ScriptExecutionContext*, GenericEventQueue*); 70 WebKitSourceBufferList(ScriptExecutionContext*, GenericEventQueue*);
71 71
72 void createAndFireEvent(const AtomicString&); 72 void createAndFireEvent(const AtomicString&);
73 73
74 virtual void refEventTarget() OVERRIDE { ref(); } 74 virtual void refEventTarget() OVERRIDE { ref(); }
75 virtual void derefEventTarget() OVERRIDE { deref(); } 75 virtual void derefEventTarget() OVERRIDE { deref(); }
76 76
77 EventTargetData m_eventTargetData; 77 EventTargetData m_eventTargetData;
78 ScriptExecutionContext* m_scriptExecutionContext; 78 ScriptExecutionContext* m_scriptExecutionContext;
79 GenericEventQueue* m_asyncEventQueue; 79 GenericEventQueue* m_asyncEventQueue;
80 80
81 Vector<RefPtr<SourceBuffer> > m_list; 81 Vector<RefPtr<WebKitSourceBuffer> > m_list;
82 }; 82 };
83 83
84 } // namespace WebCore 84 } // namespace WebCore
85 85
86 #endif 86 #endif
OLDNEW
« no previous file with comments | « Source/modules/mediasource/WebKitSourceBuffer.idl ('k') | Source/modules/mediasource/WebKitSourceBufferList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698