Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.h

Issue 1079323002: Support text track selection in video controls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed UX comment on displaying icons only for duplicate labels and rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 void honorUserPreferencesForAutomaticTextTrackSelection(); 198 void honorUserPreferencesForAutomaticTextTrackSelection();
199 199
200 bool textTracksAreReady() const; 200 bool textTracksAreReady() const;
201 void configureTextTrackDisplay(); 201 void configureTextTrackDisplay();
202 void updateTextTrackDisplay(); 202 void updateTextTrackDisplay();
203 double lastSeekTime() const { return m_lastSeekTime; } 203 double lastSeekTime() const { return m_lastSeekTime; }
204 void textTrackReadyStateChanged(TextTrack*); 204 void textTrackReadyStateChanged(TextTrack*);
205 205
206 void textTrackModeChanged(TextTrack*); 206 void textTrackModeChanged(TextTrack*);
207 void disableAutomaticTextTrackSelection();
207 208
208 // EventTarget function. 209 // EventTarget function.
209 // Both Node (via HTMLElement) and ActiveDOMObject define this method, which 210 // Both Node (via HTMLElement) and ActiveDOMObject define this method, which
210 // causes an ambiguity error at compile time. This class's constructor 211 // causes an ambiguity error at compile time. This class's constructor
211 // ensures that both implementations return document, so return the result 212 // ensures that both implementations return document, so return the result
212 // of one of them here. 213 // of one of them here.
213 using HTMLElement::getExecutionContext; 214 using HTMLElement::getExecutionContext;
214 215
215 bool hasSingleSecurityOrigin() const { return webMediaPlayer() && webMediaPl ayer()->hasSingleSecurityOrigin(); } 216 bool hasSingleSecurityOrigin() const { return webMediaPlayer() && webMediaPl ayer()->hasSingleSecurityOrigin(); }
216 217
217 bool isFullscreen() const; 218 bool isFullscreen() const;
218 void enterFullscreen(); 219 void enterFullscreen();
219 void exitFullscreen(); 220 void exitFullscreen();
220 virtual bool usesOverlayFullscreenVideo() const { return false; } 221 virtual bool usesOverlayFullscreenVideo() const { return false; }
221 222
222 bool hasClosedCaptions() const; 223 bool hasClosedCaptions() const;
223 bool closedCaptionsVisible() const; 224 bool textTracksVisible() const;
224 void setClosedCaptionsVisible(bool);
225 225
226 static void setTextTrackKindUserPreferenceForAllMediaElements(Document*); 226 static void setTextTrackKindUserPreferenceForAllMediaElements(Document*);
227 void automaticTrackSelectionForUpdatedUserPreference(); 227 void automaticTrackSelectionForUpdatedUserPreference();
228 228
229 // Returns the MediaControls, or null if they have not been added yet. 229 // Returns the MediaControls, or null if they have not been added yet.
230 // Note that this can be non-null even if there is no controls attribute. 230 // Note that this can be non-null even if there is no controls attribute.
231 MediaControls* mediaControls() const; 231 MediaControls* mediaControls() const;
232 232
233 // Notifies the media element that the media controls became visible, so 233 // Notifies the media element that the media controls became visible, so
234 // that text track layout may be updated to avoid overlapping them. 234 // that text track layout may be updated to avoid overlapping them.
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 bool m_muted : 1; 554 bool m_muted : 1;
555 bool m_paused : 1; 555 bool m_paused : 1;
556 bool m_seeking : 1; 556 bool m_seeking : 1;
557 557
558 // data has not been loaded since sending a "stalled" event 558 // data has not been loaded since sending a "stalled" event
559 bool m_sentStalledEvent : 1; 559 bool m_sentStalledEvent : 1;
560 560
561 // time has not changed since sending an "ended" event 561 // time has not changed since sending an "ended" event
562 bool m_sentEndEvent : 1; 562 bool m_sentEndEvent : 1;
563 563
564 bool m_closedCaptionsVisible : 1; 564 bool m_ignorePreloadNone : 1;
565 565
566 bool m_ignorePreloadNone : 1; 566 bool m_textTracksVisible : 1;
567 bool m_shouldPerformAutomaticTrackSelection : 1;
568
567 bool m_tracksAreReady : 1; 569 bool m_tracksAreReady : 1;
568 bool m_processingPreferenceChange : 1; 570 bool m_processingPreferenceChange : 1;
569 bool m_remoteRoutesAvailable : 1; 571 bool m_remoteRoutesAvailable : 1;
570 bool m_playingRemotely : 1; 572 bool m_playingRemotely : 1;
571 bool m_isFinalizing : 1; 573 bool m_isFinalizing : 1;
572 // Whether this element is in overlay fullscreen mode. 574 // Whether this element is in overlay fullscreen mode.
573 bool m_inOverlayFullscreenVideo : 1; 575 bool m_inOverlayFullscreenVideo : 1;
574 576
575 Member<AudioTrackList> m_audioTracks; 577 Member<AudioTrackList> m_audioTracks;
576 Member<VideoTrackList> m_videoTracks; 578 Member<VideoTrackList> m_videoTracks;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 inline bool isHTMLMediaElement(const HTMLElement& element) 662 inline bool isHTMLMediaElement(const HTMLElement& element)
661 { 663 {
662 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 664 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
663 } 665 }
664 666
665 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 667 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
666 668
667 } // namespace blink 669 } // namespace blink
668 670
669 #endif // HTMLMediaElement_h 671 #endif // HTMLMediaElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698