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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 static bool throwExceptionIfRemoved(bool isRemoved, ExceptionState& exceptionSta
te) | 46 static bool throwExceptionIfRemoved(bool isRemoved, ExceptionState& exceptionSta
te) |
47 { | 47 { |
48 if (isRemoved) { | 48 if (isRemoved) { |
49 exceptionState.throwDOMException(InvalidStateError, "This SourceBuffer h
as been removed from its parent MediaSource."); | 49 exceptionState.throwDOMException(InvalidStateError, "This SourceBuffer h
as been removed from its parent MediaSource."); |
50 return true; | 50 return true; |
51 } | 51 } |
52 return false; | 52 return false; |
53 } | 53 } |
54 | 54 |
55 DEFINE_GC_INFO(WebKitSourceBuffer); | |
56 | |
57 PassRefPtrWillBeRawPtr<WebKitSourceBuffer> WebKitSourceBuffer::create(PassOwnPtr
<WebSourceBuffer> webSourceBuffer, PassRefPtrWillBeRawPtr<WebKitMediaSource> sou
rce) | 55 PassRefPtrWillBeRawPtr<WebKitSourceBuffer> WebKitSourceBuffer::create(PassOwnPtr
<WebSourceBuffer> webSourceBuffer, PassRefPtrWillBeRawPtr<WebKitMediaSource> sou
rce) |
58 { | 56 { |
59 return adoptRefWillBeNoop(new WebKitSourceBuffer(webSourceBuffer, source)); | 57 return adoptRefWillBeNoop(new WebKitSourceBuffer(webSourceBuffer, source)); |
60 } | 58 } |
61 | 59 |
62 WebKitSourceBuffer::WebKitSourceBuffer(PassOwnPtr<WebSourceBuffer> webSourceBuff
er, PassRefPtrWillBeRawPtr<WebKitMediaSource> source) | 60 WebKitSourceBuffer::WebKitSourceBuffer(PassOwnPtr<WebSourceBuffer> webSourceBuff
er, PassRefPtrWillBeRawPtr<WebKitMediaSource> source) |
63 : m_webSourceBuffer(webSourceBuffer) | 61 : m_webSourceBuffer(webSourceBuffer) |
64 , m_source(source) | 62 , m_source(source) |
65 , m_timestampOffset(0) | 63 , m_timestampOffset(0) |
66 { | 64 { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 { | 170 { |
173 return !m_source; | 171 return !m_source; |
174 } | 172 } |
175 | 173 |
176 void WebKitSourceBuffer::trace(Visitor* visitor) | 174 void WebKitSourceBuffer::trace(Visitor* visitor) |
177 { | 175 { |
178 visitor->trace(m_source); | 176 visitor->trace(m_source); |
179 } | 177 } |
180 | 178 |
181 } // namespace WebCore | 179 } // namespace WebCore |
OLD | NEW |