| OLD | NEW |
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 namespace WebCore { | 51 namespace WebCore { |
| 52 | 52 |
| 53 class ExceptionState; | 53 class ExceptionState; |
| 54 class FileReaderLoader; | 54 class FileReaderLoader; |
| 55 class GenericEventQueue; | 55 class GenericEventQueue; |
| 56 class MediaSource; | 56 class MediaSource; |
| 57 class Stream; | 57 class Stream; |
| 58 class TimeRanges; | 58 class TimeRanges; |
| 59 | 59 |
| 60 class SourceBuffer FINAL : public RefCountedWillBeRefCountedGarbageCollected<Sou
rceBuffer>, public ActiveDOMObject, public EventTargetWithInlineData, public Scr
iptWrappable, public FileReaderLoaderClient { | 60 class SourceBuffer FINAL : public RefCountedGarbageCollectedWillBeGarbageCollect
edFinalized<SourceBuffer>, public ActiveDOMObject, public EventTargetWithInlineD
ata, public ScriptWrappable, public FileReaderLoaderClient { |
| 61 REFCOUNTED_EVENT_TARGET(SourceBuffer); | 61 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<S
ourceBuffer>); |
| 62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SourceBuffer); | 62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SourceBuffer); |
| 63 public: | 63 public: |
| 64 static PassRefPtrWillBeRawPtr<SourceBuffer> create(PassOwnPtr<blink::WebSour
ceBuffer>, MediaSource*, GenericEventQueue*); | 64 static SourceBuffer* create(PassOwnPtr<blink::WebSourceBuffer>, MediaSource*
, GenericEventQueue*); |
| 65 static const AtomicString& segmentsKeyword(); | 65 static const AtomicString& segmentsKeyword(); |
| 66 static const AtomicString& sequenceKeyword(); | 66 static const AtomicString& sequenceKeyword(); |
| 67 | 67 |
| 68 virtual ~SourceBuffer(); | 68 virtual ~SourceBuffer(); |
| 69 | 69 |
| 70 // SourceBuffer.idl methods | 70 // SourceBuffer.idl methods |
| 71 const AtomicString& mode() const { return m_mode; } | 71 const AtomicString& mode() const { return m_mode; } |
| 72 void setMode(const AtomicString&, ExceptionState&); | 72 void setMode(const AtomicString&, ExceptionState&); |
| 73 bool updating() const { return m_updating; } | 73 bool updating() const { return m_updating; } |
| 74 PassRefPtr<TimeRanges> buffered(ExceptionState&) const; | 74 PassRefPtr<TimeRanges> buffered(ExceptionState&) const; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 void appendStreamDone(bool success); | 116 void appendStreamDone(bool success); |
| 117 void clearAppendStreamState(); | 117 void clearAppendStreamState(); |
| 118 | 118 |
| 119 // FileReaderLoaderClient interface | 119 // FileReaderLoaderClient interface |
| 120 virtual void didStartLoading() OVERRIDE; | 120 virtual void didStartLoading() OVERRIDE; |
| 121 virtual void didReceiveDataForClient(const char* data, unsigned dataLength)
OVERRIDE; | 121 virtual void didReceiveDataForClient(const char* data, unsigned dataLength)
OVERRIDE; |
| 122 virtual void didFinishLoading() OVERRIDE; | 122 virtual void didFinishLoading() OVERRIDE; |
| 123 virtual void didFail(FileError::ErrorCode) OVERRIDE; | 123 virtual void didFail(FileError::ErrorCode) OVERRIDE; |
| 124 | 124 |
| 125 OwnPtr<blink::WebSourceBuffer> m_webSourceBuffer; | 125 OwnPtr<blink::WebSourceBuffer> m_webSourceBuffer; |
| 126 RawPtrWillBeMember<MediaSource> m_source; | 126 Member<MediaSource> m_source; |
| 127 GenericEventQueue* m_asyncEventQueue; | 127 GenericEventQueue* m_asyncEventQueue; |
| 128 | 128 |
| 129 AtomicString m_mode; | 129 AtomicString m_mode; |
| 130 bool m_updating; | 130 bool m_updating; |
| 131 double m_timestampOffset; | 131 double m_timestampOffset; |
| 132 double m_appendWindowStart; | 132 double m_appendWindowStart; |
| 133 double m_appendWindowEnd; | 133 double m_appendWindowEnd; |
| 134 | 134 |
| 135 Vector<unsigned char> m_pendingAppendData; | 135 Vector<unsigned char> m_pendingAppendData; |
| 136 size_t m_pendingAppendDataOffset; | 136 size_t m_pendingAppendDataOffset; |
| 137 AsyncMethodRunner<SourceBuffer> m_appendBufferAsyncPartRunner; | 137 AsyncMethodRunner<SourceBuffer> m_appendBufferAsyncPartRunner; |
| 138 | 138 |
| 139 double m_pendingRemoveStart; | 139 double m_pendingRemoveStart; |
| 140 double m_pendingRemoveEnd; | 140 double m_pendingRemoveEnd; |
| 141 AsyncMethodRunner<SourceBuffer> m_removeAsyncPartRunner; | 141 AsyncMethodRunner<SourceBuffer> m_removeAsyncPartRunner; |
| 142 | 142 |
| 143 bool m_streamMaxSizeValid; | 143 bool m_streamMaxSizeValid; |
| 144 unsigned long long m_streamMaxSize; | 144 unsigned long long m_streamMaxSize; |
| 145 AsyncMethodRunner<SourceBuffer> m_appendStreamAsyncPartRunner; | 145 AsyncMethodRunner<SourceBuffer> m_appendStreamAsyncPartRunner; |
| 146 RefPtrWillBeMember<Stream> m_stream; | 146 RefPtrWillBeMember<Stream> m_stream; |
| 147 OwnPtr<FileReaderLoader> m_loader; | 147 OwnPtr<FileReaderLoader> m_loader; |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 } // namespace WebCore | 150 } // namespace WebCore |
| 151 | 151 |
| 152 #endif | 152 #endif |
| OLD | NEW |