OLD | NEW |
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 14 matching lines...) Expand all Loading... |
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 WebKitSourceBuffer_h | 31 #ifndef WebKitSourceBuffer_h |
32 #define WebKitSourceBuffer_h | 32 #define WebKitSourceBuffer_h |
33 | 33 |
34 #include "bindings/v8/ScriptWrappable.h" | 34 #include "bindings/v8/ScriptWrappable.h" |
| 35 #include "core/dom/ExceptionCode.h" |
35 #include "wtf/PassRefPtr.h" | 36 #include "wtf/PassRefPtr.h" |
36 #include "wtf/RefCounted.h" | 37 #include "wtf/RefCounted.h" |
37 #include "wtf/text/WTFString.h" | 38 #include "wtf/text/WTFString.h" |
38 | 39 |
39 namespace WebCore { | 40 namespace WebCore { |
40 | 41 class WebKitMediaSource; |
41 class ExceptionState; | |
42 class SourceBufferPrivate; | 42 class SourceBufferPrivate; |
43 class TimeRanges; | 43 class TimeRanges; |
44 class WebKitMediaSource; | |
45 | 44 |
46 class WebKitSourceBuffer : public RefCounted<WebKitSourceBuffer>, public ScriptW
rappable { | 45 class WebKitSourceBuffer : public RefCounted<WebKitSourceBuffer>, public ScriptW
rappable { |
47 public: | 46 public: |
48 static PassRefPtr<WebKitSourceBuffer> create(PassOwnPtr<SourceBufferPrivate>
, PassRefPtr<WebKitMediaSource>); | 47 static PassRefPtr<WebKitSourceBuffer> create(PassOwnPtr<SourceBufferPrivate>
, PassRefPtr<WebKitMediaSource>); |
49 | 48 |
50 virtual ~WebKitSourceBuffer(); | 49 virtual ~WebKitSourceBuffer(); |
51 | 50 |
52 // WebKitSourceBuffer.idl methods | 51 // WebKitSourceBuffer.idl methods |
53 PassRefPtr<TimeRanges> buffered(ExceptionState&) const; | 52 PassRefPtr<TimeRanges> buffered(ExceptionCode&) const; |
54 double timestampOffset() const; | 53 double timestampOffset() const; |
55 void setTimestampOffset(double, ExceptionState&); | 54 void setTimestampOffset(double, ExceptionCode&); |
56 void append(PassRefPtr<Uint8Array> data, ExceptionState&); | 55 void append(PassRefPtr<Uint8Array> data, ExceptionCode&); |
57 void abort(ExceptionState&); | 56 void abort(ExceptionCode&); |
58 | 57 |
59 void removedFromMediaSource(); | 58 void removedFromMediaSource(); |
60 | 59 |
61 private: | 60 private: |
62 WebKitSourceBuffer(PassOwnPtr<SourceBufferPrivate>, PassRefPtr<WebKitMediaSo
urce>); | 61 WebKitSourceBuffer(PassOwnPtr<SourceBufferPrivate>, PassRefPtr<WebKitMediaSo
urce>); |
63 | 62 |
64 bool isRemoved() const; | 63 bool isRemoved() const; |
65 | 64 |
66 OwnPtr<SourceBufferPrivate> m_private; | 65 OwnPtr<SourceBufferPrivate> m_private; |
67 RefPtr<WebKitMediaSource> m_source; | 66 RefPtr<WebKitMediaSource> m_source; |
68 | 67 |
69 double m_timestampOffset; | 68 double m_timestampOffset; |
70 }; | 69 }; |
71 | 70 |
72 } // namespace WebCore | 71 } // namespace WebCore |
73 | 72 |
74 #endif | 73 #endif |
OLD | NEW |