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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 static const AtomicString& endedKeyword(); | 57 static const AtomicString& endedKeyword(); |
58 | 58 |
59 virtual ~MediaSourceBase(); | 59 virtual ~MediaSourceBase(); |
60 | 60 |
61 void addedToRegistry(); | 61 void addedToRegistry(); |
62 void removedFromRegistry(); | 62 void removedFromRegistry(); |
63 void openIfInEndedState(); | 63 void openIfInEndedState(); |
64 bool isOpen() const; | 64 bool isOpen() const; |
65 | 65 |
66 // HTMLMediaSource | 66 // HTMLMediaSource |
67 virtual bool attachToElement(HTMLMediaElement*) OVERRIDE; | 67 virtual bool attachToElement(HTMLMediaElement*) OVERRIDE FINAL; |
68 virtual void setWebMediaSourceAndOpen(PassOwnPtr<blink::WebMediaSource>) OVE
RRIDE; | 68 virtual void setWebMediaSourceAndOpen(PassOwnPtr<blink::WebMediaSource>) OVE
RRIDE FINAL; |
69 virtual void close() OVERRIDE; | 69 virtual void close() OVERRIDE FINAL; |
70 virtual bool isClosed() const OVERRIDE; | 70 virtual bool isClosed() const OVERRIDE FINAL; |
71 virtual double duration() const OVERRIDE; | 71 virtual double duration() const OVERRIDE FINAL; |
72 virtual PassRefPtr<TimeRanges> buffered() const OVERRIDE; | 72 virtual PassRefPtr<TimeRanges> buffered() const OVERRIDE FINAL; |
73 virtual void refHTMLMediaSource() OVERRIDE { ref(); } | 73 virtual void refHTMLMediaSource() OVERRIDE FINAL { ref(); } |
74 virtual void derefHTMLMediaSource() OVERRIDE { deref(); } | 74 virtual void derefHTMLMediaSource() OVERRIDE FINAL { deref(); } |
75 | 75 |
76 void setDuration(double, ExceptionState&); | 76 void setDuration(double, ExceptionState&); |
77 const AtomicString& readyState() const { return m_readyState; } | 77 const AtomicString& readyState() const { return m_readyState; } |
78 void setReadyState(const AtomicString&); | 78 void setReadyState(const AtomicString&); |
79 void endOfStream(const AtomicString& error, ExceptionState&); | 79 void endOfStream(const AtomicString& error, ExceptionState&); |
80 | 80 |
81 | 81 |
82 // ActiveDOMObject interface | 82 // ActiveDOMObject interface |
83 virtual bool hasPendingActivity() const OVERRIDE; | 83 virtual bool hasPendingActivity() const OVERRIDE FINAL; |
84 virtual void stop() OVERRIDE; | 84 virtual void stop() OVERRIDE FINAL; |
85 | 85 |
86 // EventTarget interface | 86 // EventTarget interface |
87 virtual ExecutionContext* executionContext() const OVERRIDE; | 87 virtual ExecutionContext* executionContext() const OVERRIDE FINAL; |
88 | 88 |
89 // URLRegistrable interface | 89 // URLRegistrable interface |
90 virtual URLRegistry& registry() const OVERRIDE; | 90 virtual URLRegistry& registry() const OVERRIDE FINAL; |
91 | 91 |
92 protected: | 92 protected: |
93 explicit MediaSourceBase(ExecutionContext*); | 93 explicit MediaSourceBase(ExecutionContext*); |
94 | 94 |
95 virtual void onReadyStateChange(const AtomicString& oldState, const AtomicSt
ring& newState) = 0; | 95 virtual void onReadyStateChange(const AtomicString& oldState, const AtomicSt
ring& newState) = 0; |
96 virtual Vector<RefPtr<TimeRanges> > activeRanges() const = 0; | 96 virtual Vector<RefPtr<TimeRanges> > activeRanges() const = 0; |
97 | 97 |
98 PassOwnPtr<blink::WebSourceBuffer> createWebSourceBuffer(const String& type,
const Vector<String>& codecs, ExceptionState&); | 98 PassOwnPtr<blink::WebSourceBuffer> createWebSourceBuffer(const String& type,
const Vector<String>& codecs, ExceptionState&); |
99 void scheduleEvent(const AtomicString& eventName); | 99 void scheduleEvent(const AtomicString& eventName); |
100 GenericEventQueue* asyncEventQueue() const { return m_asyncEventQueue.get();
} | 100 GenericEventQueue* asyncEventQueue() const { return m_asyncEventQueue.get();
} |
101 | 101 |
102 private: | 102 private: |
103 OwnPtr<blink::WebMediaSource> m_webMediaSource; | 103 OwnPtr<blink::WebMediaSource> m_webMediaSource; |
104 AtomicString m_readyState; | 104 AtomicString m_readyState; |
105 OwnPtr<GenericEventQueue> m_asyncEventQueue; | 105 OwnPtr<GenericEventQueue> m_asyncEventQueue; |
106 HTMLMediaElement* m_attachedElement; | 106 HTMLMediaElement* m_attachedElement; |
107 }; | 107 }; |
108 | 108 |
109 } | 109 } |
110 | 110 |
111 #endif | 111 #endif |
OLD | NEW |