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

Side by Side Diff: third_party/WebKit/Source/modules/mediasource/SourceBuffer.h

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 9 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
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 13 matching lines...) Expand all
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 SourceBuffer_h 31 #ifndef SourceBuffer_h
32 #define SourceBuffer_h 32 #define SourceBuffer_h
33 33
34 #include "bindings/core/v8/ActiveScriptWrappable.h"
34 #include "core/dom/ActiveDOMObject.h" 35 #include "core/dom/ActiveDOMObject.h"
35 #include "core/fileapi/FileReaderLoaderClient.h" 36 #include "core/fileapi/FileReaderLoaderClient.h"
36 #include "modules/EventTargetModules.h" 37 #include "modules/EventTargetModules.h"
37 #include "modules/mediasource/TrackDefaultList.h" 38 #include "modules/mediasource/TrackDefaultList.h"
38 #include "platform/AsyncMethodRunner.h" 39 #include "platform/AsyncMethodRunner.h"
39 #include "platform/weborigin/KURL.h" 40 #include "platform/weborigin/KURL.h"
40 #include "public/platform/WebSourceBufferClient.h" 41 #include "public/platform/WebSourceBufferClient.h"
41 #include "wtf/RefCounted.h" 42 #include "wtf/RefCounted.h"
42 #include "wtf/text/WTFString.h" 43 #include "wtf/text/WTFString.h"
43 44
44 namespace blink { 45 namespace blink {
45 46
46 class DOMArrayBuffer; 47 class DOMArrayBuffer;
47 class DOMArrayBufferView; 48 class DOMArrayBufferView;
48 class ExceptionState; 49 class ExceptionState;
49 class FileReaderLoader; 50 class FileReaderLoader;
50 class GenericEventQueue; 51 class GenericEventQueue;
51 class MediaSource; 52 class MediaSource;
52 class Stream; 53 class Stream;
53 class TimeRanges; 54 class TimeRanges;
54 class WebSourceBuffer; 55 class WebSourceBuffer;
55 56
56 class SourceBuffer final 57 class SourceBuffer final
57 : public RefCountedGarbageCollectedEventTargetWithInlineData<SourceBuffer> 58 : public RefCountedGarbageCollectedEventTargetWithInlineData<SourceBuffer>
59 , public ActiveScriptWrappable
58 , public ActiveDOMObject 60 , public ActiveDOMObject
59 , public FileReaderLoaderClient 61 , public FileReaderLoaderClient
60 , public WebSourceBufferClient { 62 , public WebSourceBufferClient {
61 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(SourceBuffer); 63 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(SourceBuffer);
62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SourceBuffer); 64 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SourceBuffer);
63 DEFINE_WRAPPERTYPEINFO(); 65 DEFINE_WRAPPERTYPEINFO();
64 public: 66 public:
65 static SourceBuffer* create(PassOwnPtr<WebSourceBuffer>, MediaSource*, Gener icEventQueue*); 67 static SourceBuffer* create(PassOwnPtr<WebSourceBuffer>, MediaSource*, Gener icEventQueue*);
66 static const AtomicString& segmentsKeyword(); 68 static const AtomicString& segmentsKeyword();
67 static const AtomicString& sequenceKeyword(); 69 static const AtomicString& sequenceKeyword();
(...skipping 16 matching lines...) Expand all
84 double appendWindowStart() const; 86 double appendWindowStart() const;
85 void setAppendWindowStart(double, ExceptionState&); 87 void setAppendWindowStart(double, ExceptionState&);
86 double appendWindowEnd() const; 88 double appendWindowEnd() const;
87 void setAppendWindowEnd(double, ExceptionState&); 89 void setAppendWindowEnd(double, ExceptionState&);
88 TrackDefaultList* trackDefaults() const { return m_trackDefaults.get(); } 90 TrackDefaultList* trackDefaults() const { return m_trackDefaults.get(); }
89 void setTrackDefaults(TrackDefaultList*, ExceptionState&); 91 void setTrackDefaults(TrackDefaultList*, ExceptionState&);
90 92
91 void abortIfUpdating(); 93 void abortIfUpdating();
92 void removedFromMediaSource(); 94 void removedFromMediaSource();
93 95
96 // ActiveScriptWrappable
97 bool hasPendingActivity() const final;
98
94 // ActiveDOMObject interface 99 // ActiveDOMObject interface
95 bool hasPendingActivity() const override;
96 void suspend() override; 100 void suspend() override;
97 void resume() override; 101 void resume() override;
98 void stop() override; 102 void stop() override;
99 103
100 // EventTarget interface 104 // EventTarget interface
101 ExecutionContext* getExecutionContext() const override; 105 ExecutionContext* getExecutionContext() const override;
102 const AtomicString& interfaceName() const override; 106 const AtomicString& interfaceName() const override;
103 107
104 // WebSourceBufferClient interface 108 // WebSourceBufferClient interface
105 void initializationSegmentReceived() override; 109 void initializationSegmentReceived() override;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 bool m_streamMaxSizeValid; 160 bool m_streamMaxSizeValid;
157 unsigned long long m_streamMaxSize; 161 unsigned long long m_streamMaxSize;
158 Member<AsyncMethodRunner<SourceBuffer>> m_appendStreamAsyncPartRunner; 162 Member<AsyncMethodRunner<SourceBuffer>> m_appendStreamAsyncPartRunner;
159 Member<Stream> m_stream; 163 Member<Stream> m_stream;
160 OwnPtr<FileReaderLoader> m_loader; 164 OwnPtr<FileReaderLoader> m_loader;
161 }; 165 };
162 166
163 } // namespace blink 167 } // namespace blink
164 168
165 #endif // SourceBuffer_h 169 #endif // SourceBuffer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698