Chromium Code Reviews| Index: Source/core/html/HTMLMediaElement.h |
| diff --git a/Source/core/html/HTMLMediaElement.h b/Source/core/html/HTMLMediaElement.h |
| index 5a1ab2d7f1c2e118bde314d677a5b9d70b2b57a7..03aa98e6e2885e8a1054e2b5473c95c4f2a88af8 100644 |
| --- a/Source/core/html/HTMLMediaElement.h |
| +++ b/Source/core/html/HTMLMediaElement.h |
| @@ -49,6 +49,7 @@ namespace WebCore { |
| class AudioSourceProvider; |
| class MediaElementAudioSourceNode; |
| #endif |
| +class AudioTrackList; |
| class ContentType; |
| class Event; |
| class ExceptionState; |
| @@ -62,6 +63,7 @@ class HTMLMediaSource; |
| class TextTrackList; |
| class TimeRanges; |
| class URLRegistry; |
| +class VideoTrackList; |
| typedef PODIntervalTree<double, TextTrackCue*> CueIntervalTree; |
| typedef CueIntervalTree::IntervalType CueInterval; |
| @@ -163,6 +165,12 @@ public: |
| virtual bool canPlay() const OVERRIDE FINAL; |
| + AudioTrackList& audioTracks(); |
| + void audioTrackChanged(const AtomicString& audioTrackID, bool enabled); |
| + |
| + VideoTrackList& videoTracks(); |
| + void selectedVideoTrackChanged(const AtomicString& selectedTrackID); |
| + |
| PassRefPtr<TextTrack> addTextTrack(const AtomicString& kind, const AtomicString& label, const AtomicString& language, ExceptionState&); |
| PassRefPtr<TextTrack> addTextTrack(const AtomicString& kind, const AtomicString& label, ExceptionState& exceptionState) { return addTextTrack(kind, label, emptyAtom, exceptionState); } |
| PassRefPtr<TextTrack> addTextTrack(const AtomicString& kind, ExceptionState& exceptionState) { return addTextTrack(kind, emptyAtom, emptyAtom, exceptionState); } |
| @@ -181,6 +189,11 @@ public: |
| void didAddTrackElement(HTMLTrackElement*); |
| void didRemoveTrackElement(HTMLTrackElement*); |
| + void addVideoTrack(const AtomicString& id, blink::WebMediaPlayerClient::VideoTrackKind, const AtomicString& label, const AtomicString& language, bool selected); |
| + void removeVideoTrack(const AtomicString& id); |
| + void addAudioTrack(const AtomicString& id, blink::WebMediaPlayerClient::AudioTrackKind, const AtomicString& label, const AtomicString& language, bool enabled); |
| + void removeAudioTrack(const AtomicString& id); |
| + |
| virtual void mediaPlayerDidAddTextTrack(blink::WebInbandTextTrack*) OVERRIDE FINAL; |
| virtual void mediaPlayerDidRemoveTextTrack(blink::WebInbandTextTrack*) OVERRIDE FINAL; |
| // FIXME: Remove this when WebMediaPlayerClientImpl::loadInternal does not depend on it. |
| @@ -413,6 +426,16 @@ private: |
| bool isBlockedOnMediaController() const; |
| bool isAutoplaying() const { return m_autoplaying; } |
| + // Creates placeholder AudioTrack and/or VideoTrack objects when WebMemediaPlayer objects |
| + // advertise they have audio and/or video, but don't explicity signal them via |
| + // mediaPlayerDidAddAudioTrack() and mediaPlayerDidAddVideoTrack(). |
| + // FIXME: Remove this once all WebMediaPlayer implementations properly report their track info. |
| + void createPlaceholderTracksIfNecessary(); |
| + |
| + // Sets the selected/enabled tracks if they aren't set before we initially |
| + // transition to HAVE_METADATA. |
| + void selectInitialTracksIfNecessary(); |
| + |
| Timer<HTMLMediaElement> m_loadTimer; |
| Timer<HTMLMediaElement> m_progressEventTimer; |
| Timer<HTMLMediaElement> m_playbackProgressTimer; |
| @@ -497,6 +520,8 @@ private: |
| bool m_processingPreferenceChange : 1; |
| double m_lastTextTrackUpdateTime; |
| + RefPtr<AudioTrackList> m_audioTracks; |
|
philipj_slow
2014/03/09 09:04:14
I realize you're following the existing style, but
philipj_slow
2014/03/09 16:26:43
On second though my suggestion doesn't make sense
acolwell GONE FROM CHROMIUM
2014/03/18 22:02:15
I moved the list creation to the constructor since
|
| + RefPtr<VideoTrackList> m_videoTracks; |
| RefPtr<TextTrackList> m_textTracks; |
| Vector<RefPtr<TextTrack> > m_textTracksWhenResourceSelectionBegan; |