| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "platform/RuntimeEnabledFeatures.h" | 46 #include "platform/RuntimeEnabledFeatures.h" |
| 47 #include "platform/TraceEvent.h" | 47 #include "platform/TraceEvent.h" |
| 48 #include "public/platform/WebMediaSource.h" | 48 #include "public/platform/WebMediaSource.h" |
| 49 #include "public/platform/WebSourceBuffer.h" | 49 #include "public/platform/WebSourceBuffer.h" |
| 50 #include "wtf/Uint8Array.h" | 50 #include "wtf/Uint8Array.h" |
| 51 #include "wtf/text/CString.h" | 51 #include "wtf/text/CString.h" |
| 52 | 52 |
| 53 using blink::WebMediaSource; | 53 using blink::WebMediaSource; |
| 54 using blink::WebSourceBuffer; | 54 using blink::WebSourceBuffer; |
| 55 | 55 |
| 56 namespace WebCore { | 56 namespace blink { |
| 57 | 57 |
| 58 static bool throwExceptionIfClosedOrUpdating(bool isOpen, bool isUpdating, Excep
tionState& exceptionState) | 58 static bool throwExceptionIfClosedOrUpdating(bool isOpen, bool isUpdating, Excep
tionState& exceptionState) |
| 59 { | 59 { |
| 60 if (!isOpen) { | 60 if (!isOpen) { |
| 61 exceptionState.throwDOMException(InvalidStateError, "The MediaSource's r
eadyState is not 'open'."); | 61 exceptionState.throwDOMException(InvalidStateError, "The MediaSource's r
eadyState is not 'open'."); |
| 62 return true; | 62 return true; |
| 63 } | 63 } |
| 64 if (isUpdating) { | 64 if (isUpdating) { |
| 65 exceptionState.throwDOMException(InvalidStateError, "The 'updating' attr
ibute is true on one or more of this MediaSource's SourceBuffers."); | 65 exceptionState.throwDOMException(InvalidStateError, "The 'updating' attr
ibute is true on one or more of this MediaSource's SourceBuffers."); |
| 66 return true; | 66 return true; |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 event->setTarget(this); | 558 event->setTarget(this); |
| 559 | 559 |
| 560 m_asyncEventQueue->enqueueEvent(event.release()); | 560 m_asyncEventQueue->enqueueEvent(event.release()); |
| 561 } | 561 } |
| 562 | 562 |
| 563 URLRegistry& MediaSource::registry() const | 563 URLRegistry& MediaSource::registry() const |
| 564 { | 564 { |
| 565 return MediaSourceRegistry::registry(); | 565 return MediaSourceRegistry::registry(); |
| 566 } | 566 } |
| 567 | 567 |
| 568 } // namespace WebCore | 568 } // namespace blink |
| OLD | NEW |