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 25 matching lines...) Expand all Loading... |
36 #include "modules/mediasource/SourceBuffer.h" | 36 #include "modules/mediasource/SourceBuffer.h" |
37 #include "modules/mediasource/SourceBufferList.h" | 37 #include "modules/mediasource/SourceBufferList.h" |
38 #include "wtf/RefCounted.h" | 38 #include "wtf/RefCounted.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 class ExceptionState; | 42 class ExceptionState; |
43 | 43 |
44 class MediaSource FINAL : public MediaSourceBase, public ScriptWrappable { | 44 class MediaSource FINAL : public MediaSourceBase, public ScriptWrappable { |
45 public: | 45 public: |
46 static PassRefPtrWillBeRawPtr<MediaSource> create(ExecutionContext*); | 46 static MediaSource* create(ExecutionContext*); |
47 virtual ~MediaSource(); | 47 virtual ~MediaSource(); |
48 | 48 |
49 // MediaSource.idl methods | 49 // MediaSource.idl methods |
50 SourceBufferList* sourceBuffers() { return m_sourceBuffers.get(); } | 50 SourceBufferList* sourceBuffers() { return m_sourceBuffers.get(); } |
51 SourceBufferList* activeSourceBuffers() { return m_activeSourceBuffers.get()
; } | 51 SourceBufferList* activeSourceBuffers() { return m_activeSourceBuffers.get()
; } |
52 SourceBuffer* addSourceBuffer(const String& type, ExceptionState&); | 52 SourceBuffer* addSourceBuffer(const String& type, ExceptionState&); |
53 void removeSourceBuffer(SourceBuffer*, ExceptionState&); | 53 void removeSourceBuffer(SourceBuffer*, ExceptionState&); |
54 static bool isTypeSupported(const String& type); | 54 static bool isTypeSupported(const String& type); |
55 | 55 |
56 // EventTarget interface | 56 // EventTarget interface |
57 virtual const AtomicString& interfaceName() const OVERRIDE; | 57 virtual const AtomicString& interfaceName() const OVERRIDE; |
58 | 58 |
59 virtual void trace(Visitor*) OVERRIDE; | 59 virtual void trace(Visitor*) OVERRIDE; |
60 | 60 |
61 #if !ENABLE(OILPAN) | |
62 using RefCounted<MediaSourceBase>::ref; | |
63 using RefCounted<MediaSourceBase>::deref; | |
64 #endif | |
65 | |
66 private: | 61 private: |
67 explicit MediaSource(ExecutionContext*); | 62 explicit MediaSource(ExecutionContext*); |
68 | 63 |
69 // MediaSourceBase interface | 64 // MediaSourceBase interface |
70 virtual void onReadyStateChange(const AtomicString&, const AtomicString&) OV
ERRIDE; | 65 virtual void onReadyStateChange(const AtomicString&, const AtomicString&) OV
ERRIDE; |
71 virtual Vector<RefPtr<TimeRanges> > activeRanges() const OVERRIDE; | 66 virtual Vector<RefPtr<TimeRanges> > activeRanges() const OVERRIDE; |
72 virtual bool isUpdating() const OVERRIDE; | 67 virtual bool isUpdating() const OVERRIDE; |
73 | 68 |
74 RefPtrWillBeMember<SourceBufferList> m_sourceBuffers; | 69 Member<SourceBufferList> m_sourceBuffers; |
75 RefPtrWillBeMember<SourceBufferList> m_activeSourceBuffers; | 70 Member<SourceBufferList> m_activeSourceBuffers; |
76 }; | 71 }; |
77 | 72 |
78 } // namespace WebCore | 73 } // namespace WebCore |
79 | 74 |
80 #endif | 75 #endif |
OLD | NEW |