| 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 21 matching lines...) Expand all Loading... |
| 32 #define WebKitMediaSource_h | 32 #define WebKitMediaSource_h |
| 33 | 33 |
| 34 #include "bindings/v8/ScriptWrappable.h" | 34 #include "bindings/v8/ScriptWrappable.h" |
| 35 #include "modules/mediasource/MediaSourceBase.h" | 35 #include "modules/mediasource/MediaSourceBase.h" |
| 36 #include "modules/mediasource/WebKitSourceBuffer.h" | 36 #include "modules/mediasource/WebKitSourceBuffer.h" |
| 37 #include "modules/mediasource/WebKitSourceBufferList.h" | 37 #include "modules/mediasource/WebKitSourceBufferList.h" |
| 38 #include "wtf/RefCounted.h" | 38 #include "wtf/RefCounted.h" |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace WebCore { |
| 41 | 41 |
| 42 class ExceptionState; | |
| 43 | |
| 44 class WebKitMediaSource : public MediaSourceBase, public ScriptWrappable { | 42 class WebKitMediaSource : public MediaSourceBase, public ScriptWrappable { |
| 45 public: | 43 public: |
| 46 static PassRefPtr<WebKitMediaSource> create(ScriptExecutionContext*); | 44 static PassRefPtr<WebKitMediaSource> create(ScriptExecutionContext*); |
| 47 virtual ~WebKitMediaSource() { } | 45 virtual ~WebKitMediaSource() { } |
| 48 | 46 |
| 49 // WebKitMediaSource.idl methods | 47 // WebKitMediaSource.idl methods |
| 50 WebKitSourceBufferList* sourceBuffers(); | 48 WebKitSourceBufferList* sourceBuffers(); |
| 51 WebKitSourceBufferList* activeSourceBuffers(); | 49 WebKitSourceBufferList* activeSourceBuffers(); |
| 52 WebKitSourceBuffer* addSourceBuffer(const String& type, ExceptionState&); | 50 WebKitSourceBuffer* addSourceBuffer(const String& type, ExceptionCode&); |
| 53 void removeSourceBuffer(WebKitSourceBuffer*, ExceptionState&); | 51 void removeSourceBuffer(WebKitSourceBuffer*, ExceptionCode&); |
| 54 static bool isTypeSupported(const String& type); | 52 static bool isTypeSupported(const String& type); |
| 55 | 53 |
| 56 // EventTarget interface | 54 // EventTarget interface |
| 57 virtual const AtomicString& interfaceName() const OVERRIDE; | 55 virtual const AtomicString& interfaceName() const OVERRIDE; |
| 58 | 56 |
| 59 using RefCounted<MediaSourceBase>::ref; | 57 using RefCounted<MediaSourceBase>::ref; |
| 60 using RefCounted<MediaSourceBase>::deref; | 58 using RefCounted<MediaSourceBase>::deref; |
| 61 | 59 |
| 62 private: | 60 private: |
| 63 explicit WebKitMediaSource(ScriptExecutionContext*); | 61 explicit WebKitMediaSource(ScriptExecutionContext*); |
| 64 | 62 |
| 65 // MediaSourceBase interface | 63 // MediaSourceBase interface |
| 66 virtual void onReadyStateChange(const AtomicString&, const AtomicString&) OV
ERRIDE; | 64 virtual void onReadyStateChange(const AtomicString&, const AtomicString&) OV
ERRIDE; |
| 67 virtual Vector<RefPtr<TimeRanges> > activeRanges() const OVERRIDE; | 65 virtual Vector<RefPtr<TimeRanges> > activeRanges() const OVERRIDE; |
| 68 | 66 |
| 69 RefPtr<WebKitSourceBufferList> m_sourceBuffers; | 67 RefPtr<WebKitSourceBufferList> m_sourceBuffers; |
| 70 RefPtr<WebKitSourceBufferList> m_activeSourceBuffers; | 68 RefPtr<WebKitSourceBufferList> m_activeSourceBuffers; |
| 71 }; | 69 }; |
| 72 | 70 |
| 73 } // namespace WebCore | 71 } // namespace WebCore |
| 74 | 72 |
| 75 #endif | 73 #endif |
| OLD | NEW |