Chromium Code Reviews| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 // an InvalidStateError exception and abort these steps. | 129 // an InvalidStateError exception and abort these steps. |
| 130 if (throwExceptionIfRemoved(isRemoved(), exceptionState)) | 130 if (throwExceptionIfRemoved(isRemoved(), exceptionState)) |
| 131 return; | 131 return; |
| 132 | 132 |
| 133 // 5. If the readyState attribute of media source is in the "ended" state th en run the following steps: | 133 // 5. If the readyState attribute of media source is in the "ended" state th en run the following steps: |
| 134 // 5.1. Set the readyState attribute of media source to "open" | 134 // 5.1. Set the readyState attribute of media source to "open" |
| 135 // 5.2. Queue a task to fire a simple event named sourceopen at media source . | 135 // 5.2. Queue a task to fire a simple event named sourceopen at media source . |
| 136 m_source->openIfInEndedState(); | 136 m_source->openIfInEndedState(); |
| 137 | 137 |
| 138 // Steps 6 & beyond are handled by m_webSourceBuffer. | 138 // Steps 6 & beyond are handled by m_webSourceBuffer. |
| 139 m_webSourceBuffer->append(data->data(), data->length()); | 139 |
| 140 // |dummyNewTimestampOffset| is ignored because the prefixed API does not al low appends to update | |
|
jamesr
2014/02/27 01:49:56
if the parameter is only optionally needed by call
wolenetz
2014/02/27 03:29:58
Done.
| |
| 141 // timestampOffset. | |
| 142 double dummyNewTimestampOffset; | |
| 143 m_webSourceBuffer->append(data->data(), data->length(), &dummyNewTimestampOf fset); | |
| 140 } | 144 } |
| 141 | 145 |
| 142 void WebKitSourceBuffer::abort(ExceptionState& exceptionState) | 146 void WebKitSourceBuffer::abort(ExceptionState& exceptionState) |
| 143 { | 147 { |
| 144 // Section 3.2 abort() method steps. | 148 // Section 3.2 abort() method steps. |
| 145 // 1. If this object has been removed from the sourceBuffers attribute of th e parent media source | 149 // 1. If this object has been removed from the sourceBuffers attribute of th e parent media source |
| 146 // then throw an InvalidStateError exception and abort these steps. | 150 // then throw an InvalidStateError exception and abort these steps. |
| 147 // 2. If the readyState attribute of the parent media source is not in the " open" state | 151 // 2. If the readyState attribute of the parent media source is not in the " open" state |
| 148 // then throw an InvalidStateError exception and abort these steps. | 152 // then throw an InvalidStateError exception and abort these steps. |
| 149 if (throwExceptionIfRemoved(isRemoved(), exceptionState)) | 153 if (throwExceptionIfRemoved(isRemoved(), exceptionState)) |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 170 { | 174 { |
| 171 return !m_source; | 175 return !m_source; |
| 172 } | 176 } |
| 173 | 177 |
| 174 void WebKitSourceBuffer::trace(Visitor* visitor) | 178 void WebKitSourceBuffer::trace(Visitor* visitor) |
| 175 { | 179 { |
| 176 visitor->trace(m_source); | 180 visitor->trace(m_source); |
| 177 } | 181 } |
| 178 | 182 |
| 179 } // namespace WebCore | 183 } // namespace WebCore |
| OLD | NEW |