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

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 988763002: Start separating the text track container from the media controls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 9e4a12733fd5475cf49f5b8794729503c8fc3222..7b7a5223c514b62a99dda086c158fea96596cf46 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -55,6 +55,7 @@
#include "core/html/track/AutomaticTrackSelection.h"
#include "core/html/track/CueTimeline.h"
#include "core/html/track/InbandTextTrack.h"
+#include "core/html/track/TextTrackContainer.h"
#include "core/html/track/TextTrackList.h"
#include "core/html/track/VideoTrack.h"
#include "core/html/track/VideoTrackList.h"
@@ -3183,12 +3184,17 @@ bool HTMLMediaElement::closedCaptionsVisible() const
return m_closedCaptionsVisible;
}
+TextTrackContainer& HTMLMediaElement::ensureTextTrackContainer()
+{
+ ensureMediaControls();
+ return *mediaControls()->textTrackContainer();
+}
+
void HTMLMediaElement::updateTextTrackDisplay()
{
WTF_LOG(Media, "HTMLMediaElement::updateTextTrackDisplay(%p)", this);
- ensureMediaControls();
- mediaControls()->updateTextTrackDisplay();
+ ensureTextTrackContainer().updateDisplay(*this);
}
void HTMLMediaElement::setClosedCaptionsVisible(bool closedCaptionVisible)

Powered by Google App Engine
This is Rietveld 408576698