OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 196 |
197 void honorUserPreferencesForAutomaticTextTrackSelection(); | 197 void honorUserPreferencesForAutomaticTextTrackSelection(); |
198 | 198 |
199 bool textTracksAreReady() const; | 199 bool textTracksAreReady() const; |
200 void configureTextTrackDisplay(); | 200 void configureTextTrackDisplay(); |
201 void updateTextTrackDisplay(); | 201 void updateTextTrackDisplay(); |
202 double lastSeekTime() const { return m_lastSeekTime; } | 202 double lastSeekTime() const { return m_lastSeekTime; } |
203 void textTrackReadyStateChanged(TextTrack*); | 203 void textTrackReadyStateChanged(TextTrack*); |
204 | 204 |
205 void textTrackModeChanged(TextTrack*); | 205 void textTrackModeChanged(TextTrack*); |
| 206 void disableAutomaticTextTrackSelection(); |
206 | 207 |
207 // EventTarget function. | 208 // EventTarget function. |
208 // Both Node (via HTMLElement) and ActiveDOMObject define this method, which | 209 // Both Node (via HTMLElement) and ActiveDOMObject define this method, which |
209 // causes an ambiguity error at compile time. This class's constructor | 210 // causes an ambiguity error at compile time. This class's constructor |
210 // ensures that both implementations return document, so return the result | 211 // ensures that both implementations return document, so return the result |
211 // of one of them here. | 212 // of one of them here. |
212 using HTMLElement::getExecutionContext; | 213 using HTMLElement::getExecutionContext; |
213 | 214 |
214 bool hasSingleSecurityOrigin() const { return webMediaPlayer() && webMediaPl
ayer()->hasSingleSecurityOrigin(); } | 215 bool hasSingleSecurityOrigin() const { return webMediaPlayer() && webMediaPl
ayer()->hasSingleSecurityOrigin(); } |
215 | 216 |
216 bool isFullscreen() const; | 217 bool isFullscreen() const; |
217 void enterFullscreen(); | 218 void enterFullscreen(); |
218 void exitFullscreen(); | 219 void exitFullscreen(); |
219 virtual bool usesOverlayFullscreenVideo() const { return false; } | 220 virtual bool usesOverlayFullscreenVideo() const { return false; } |
220 | 221 |
221 bool hasClosedCaptions() const; | 222 bool hasClosedCaptions() const; |
222 bool closedCaptionsVisible() const; | 223 bool textTracksVisible() const; |
223 void setClosedCaptionsVisible(bool); | |
224 | 224 |
225 static void setTextTrackKindUserPreferenceForAllMediaElements(Document*); | 225 static void setTextTrackKindUserPreferenceForAllMediaElements(Document*); |
226 void automaticTrackSelectionForUpdatedUserPreference(); | 226 void automaticTrackSelectionForUpdatedUserPreference(); |
227 | 227 |
228 // Returns the MediaControls, or null if they have not been added yet. | 228 // Returns the MediaControls, or null if they have not been added yet. |
229 // Note that this can be non-null even if there is no controls attribute. | 229 // Note that this can be non-null even if there is no controls attribute. |
230 MediaControls* mediaControls() const; | 230 MediaControls* mediaControls() const; |
231 | 231 |
232 // Notifies the media element that the media controls became visible, so | 232 // Notifies the media element that the media controls became visible, so |
233 // that text track layout may be updated to avoid overlapping them. | 233 // that text track layout may be updated to avoid overlapping them. |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 bool m_muted : 1; | 550 bool m_muted : 1; |
551 bool m_paused : 1; | 551 bool m_paused : 1; |
552 bool m_seeking : 1; | 552 bool m_seeking : 1; |
553 | 553 |
554 // data has not been loaded since sending a "stalled" event | 554 // data has not been loaded since sending a "stalled" event |
555 bool m_sentStalledEvent : 1; | 555 bool m_sentStalledEvent : 1; |
556 | 556 |
557 // time has not changed since sending an "ended" event | 557 // time has not changed since sending an "ended" event |
558 bool m_sentEndEvent : 1; | 558 bool m_sentEndEvent : 1; |
559 | 559 |
560 bool m_closedCaptionsVisible : 1; | 560 bool m_ignorePreloadNone : 1; |
561 | 561 |
562 bool m_ignorePreloadNone : 1; | 562 bool m_textTracksVisible : 1; |
| 563 bool m_shouldPerformAutomaticTrackSelection : 1; |
| 564 |
563 bool m_tracksAreReady : 1; | 565 bool m_tracksAreReady : 1; |
564 bool m_processingPreferenceChange : 1; | 566 bool m_processingPreferenceChange : 1; |
565 bool m_remoteRoutesAvailable : 1; | 567 bool m_remoteRoutesAvailable : 1; |
566 bool m_playingRemotely : 1; | 568 bool m_playingRemotely : 1; |
567 // Whether this element is in overlay fullscreen mode. | 569 // Whether this element is in overlay fullscreen mode. |
568 bool m_inOverlayFullscreenVideo : 1; | 570 bool m_inOverlayFullscreenVideo : 1; |
569 | 571 |
570 Member<AudioTrackList> m_audioTracks; | 572 Member<AudioTrackList> m_audioTracks; |
571 Member<VideoTrackList> m_videoTracks; | 573 Member<VideoTrackList> m_videoTracks; |
572 Member<TextTrackList> m_textTracks; | 574 Member<TextTrackList> m_textTracks; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 inline bool isHTMLMediaElement(const HTMLElement& element) | 653 inline bool isHTMLMediaElement(const HTMLElement& element) |
652 { | 654 { |
653 return isHTMLAudioElement(element) || isHTMLVideoElement(element); | 655 return isHTMLAudioElement(element) || isHTMLVideoElement(element); |
654 } | 656 } |
655 | 657 |
656 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); | 658 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); |
657 | 659 |
658 } // namespace blink | 660 } // namespace blink |
659 | 661 |
660 #endif // HTMLMediaElement_h | 662 #endif // HTMLMediaElement_h |
OLD | NEW |