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

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

Issue 270253004: Enable oilpan in modules/mediasource (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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) 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 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 24 matching lines...) Expand all
35 #include "core/events/EventTarget.h" 35 #include "core/events/EventTarget.h"
36 #include "platform/heap/Handle.h" 36 #include "platform/heap/Handle.h"
37 #include "wtf/RefCounted.h" 37 #include "wtf/RefCounted.h"
38 #include "wtf/Vector.h" 38 #include "wtf/Vector.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 class SourceBuffer; 42 class SourceBuffer;
43 class GenericEventQueue; 43 class GenericEventQueue;
44 44
45 class SourceBufferList FINAL : public RefCountedWillBeRefCountedGarbageCollected <SourceBufferList>, public ScriptWrappable, public EventTargetWithInlineData { 45 class SourceBufferList FINAL : public RefCountedGarbageCollected<SourceBufferLis t>, public ScriptWrappable, public EventTargetWithInlineData {
46 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedWillBeRefCountedGarbageCollected<S ourceBufferList>); 46 DEFINE_EVENT_TARGET_REFCOUNTING(RefCountedGarbageCollected<SourceBufferList> );
47 public: 47 public:
48 static PassRefPtrWillBeRawPtr<SourceBufferList> create(ExecutionContext* con text, GenericEventQueue* asyncEventQueue) 48 static SourceBufferList* create(ExecutionContext* context, GenericEventQueue * asyncEventQueue)
49 { 49 {
50 return adoptRefWillBeRefCountedGarbageCollected(new SourceBufferList(con text, asyncEventQueue)); 50 return adoptRefCountedGarbageCollected(new SourceBufferList(context, asy ncEventQueue));
51 } 51 }
52 virtual ~SourceBufferList(); 52 virtual ~SourceBufferList();
53 53
54 unsigned long length() const { return m_list.size(); } 54 unsigned long length() const { return m_list.size(); }
55 SourceBuffer* item(unsigned long index) const { return (index < m_list.size( )) ? m_list[index].get() : 0; } 55 SourceBuffer* item(unsigned long index) const { return (index < m_list.size( )) ? m_list[index].get() : 0; }
56 56
57 void add(PassRefPtrWillBeRawPtr<SourceBuffer>); 57 void add(SourceBuffer*);
58 void remove(SourceBuffer*); 58 void remove(SourceBuffer*);
59 bool contains(SourceBuffer* buffer) { return m_list.find(buffer) != kNotFoun d; } 59 bool contains(SourceBuffer* buffer) { return m_list.find(buffer) != kNotFoun d; }
60 void clear(); 60 void clear();
61 61
62 // EventTarget interface 62 // EventTarget interface
63 virtual const AtomicString& interfaceName() const OVERRIDE; 63 virtual const AtomicString& interfaceName() const OVERRIDE;
64 virtual ExecutionContext* executionContext() const OVERRIDE; 64 virtual ExecutionContext* executionContext() const OVERRIDE;
65 65
66 void trace(Visitor*); 66 void trace(Visitor*);
67 67
68 private: 68 private:
69 SourceBufferList(ExecutionContext*, GenericEventQueue*); 69 SourceBufferList(ExecutionContext*, GenericEventQueue*);
70 70
71 void scheduleEvent(const AtomicString&); 71 void scheduleEvent(const AtomicString&);
72 72
73 ExecutionContext* m_executionContext; 73 ExecutionContext* m_executionContext;
74 GenericEventQueue* m_asyncEventQueue; 74 GenericEventQueue* m_asyncEventQueue;
75 75
76 WillBeHeapVector<RefPtrWillBeMember<SourceBuffer> > m_list; 76 HeapVector<Member<SourceBuffer> > m_list;
77 }; 77 };
78 78
79 } // namespace WebCore 79 } // namespace WebCore
80 80
81 #endif 81 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698