| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 437 | 437 | 
| 438     onReadyStateChange(oldState, state); | 438     onReadyStateChange(oldState, state); | 
| 439 } | 439 } | 
| 440 | 440 | 
| 441 void MediaSource::endOfStream(const AtomicString& error, ExceptionState& excepti
     onState) | 441 void MediaSource::endOfStream(const AtomicString& error, ExceptionState& excepti
     onState) | 
| 442 { | 442 { | 
| 443     DEFINE_STATIC_LOCAL(const AtomicString, network, ("network", AtomicString::C
     onstructFromLiteral)); | 443     DEFINE_STATIC_LOCAL(const AtomicString, network, ("network", AtomicString::C
     onstructFromLiteral)); | 
| 444     DEFINE_STATIC_LOCAL(const AtomicString, decode, ("decode", AtomicString::Con
     structFromLiteral)); | 444     DEFINE_STATIC_LOCAL(const AtomicString, decode, ("decode", AtomicString::Con
     structFromLiteral)); | 
| 445 | 445 | 
| 446     if (error == network) { | 446     if (error == network) { | 
| 447         endOfStreamInternal(blink::WebMediaSource::EndOfStreamStatusNetworkError
     , exceptionState); | 447         endOfStreamInternal(WebMediaSource::EndOfStreamStatusNetworkError, excep
     tionState); | 
| 448     } else if (error == decode) { | 448     } else if (error == decode) { | 
| 449         endOfStreamInternal(blink::WebMediaSource::EndOfStreamStatusDecodeError,
      exceptionState); | 449         endOfStreamInternal(WebMediaSource::EndOfStreamStatusDecodeError, except
     ionState); | 
| 450     } else { | 450     } else { | 
| 451         ASSERT_NOT_REACHED(); // IDL enforcement should prevent this case. | 451         ASSERT_NOT_REACHED(); // IDL enforcement should prevent this case. | 
| 452     } | 452     } | 
| 453 } | 453 } | 
| 454 | 454 | 
| 455 void MediaSource::endOfStream(ExceptionState& exceptionState) | 455 void MediaSource::endOfStream(ExceptionState& exceptionState) | 
| 456 { | 456 { | 
| 457     endOfStreamInternal(blink::WebMediaSource::EndOfStreamStatusNoError, excepti
     onState); | 457     endOfStreamInternal(WebMediaSource::EndOfStreamStatusNoError, exceptionState
     ); | 
| 458 } | 458 } | 
| 459 | 459 | 
| 460 void MediaSource::endOfStreamInternal(const blink::WebMediaSource::EndOfStreamSt
     atus eosStatus, ExceptionState& exceptionState) | 460 void MediaSource::endOfStreamInternal(const WebMediaSource::EndOfStreamStatus eo
     sStatus, ExceptionState& exceptionState) | 
| 461 { | 461 { | 
| 462     // 2.2 http://www.w3.org/TR/media-source/#widl-MediaSource-endOfStream-void-
     EndOfStreamError-error | 462     // 2.2 http://www.w3.org/TR/media-source/#widl-MediaSource-endOfStream-void-
     EndOfStreamError-error | 
| 463     // 1. If the readyState attribute is not in the "open" state then throw an | 463     // 1. If the readyState attribute is not in the "open" state then throw an | 
| 464     // InvalidStateError exception and abort these steps. | 464     // InvalidStateError exception and abort these steps. | 
| 465     // 2. If the updating attribute equals true on any SourceBuffer in sourceBuf
     fers, then throw an | 465     // 2. If the updating attribute equals true on any SourceBuffer in sourceBuf
     fers, then throw an | 
| 466     // InvalidStateError exception and abort these steps. | 466     // InvalidStateError exception and abort these steps. | 
| 467     if (throwExceptionIfClosedOrUpdating(isOpen(), isUpdating(), exceptionState)
     ) | 467     if (throwExceptionIfClosedOrUpdating(isOpen(), isUpdating(), exceptionState)
     ) | 
| 468         return; | 468         return; | 
| 469 | 469 | 
| 470     // 3. Run the end of stream algorithm with the error parameter set to error. | 470     // 3. Run the end of stream algorithm with the error parameter set to error. | 
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 564 | 564 | 
| 565     m_asyncEventQueue->enqueueEvent(event.release()); | 565     m_asyncEventQueue->enqueueEvent(event.release()); | 
| 566 } | 566 } | 
| 567 | 567 | 
| 568 URLRegistry& MediaSource::registry() const | 568 URLRegistry& MediaSource::registry() const | 
| 569 { | 569 { | 
| 570     return MediaSourceRegistry::registry(); | 570     return MediaSourceRegistry::registry(); | 
| 571 } | 571 } | 
| 572 | 572 | 
| 573 } // namespace blink | 573 } // namespace blink | 
| OLD | NEW | 
|---|