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

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

Issue 92763002: Rename addTrack and removeTrack functions to addTextTrack and removeTextTrack. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased to apply cleanly Created 6 years, 11 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
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/platform/graphics/media/MediaPlayer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 8ee8c1c256b422cfa97212097b67451a85504992..018ad75b0ee4cef48480b05d5a501f5ba97eb741 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -2449,7 +2449,7 @@ double HTMLMediaElement::percentLoaded() const
return buffered / duration;
}
-void HTMLMediaElement::mediaPlayerDidAddTrack(WebInbandTextTrack* webTrack)
+void HTMLMediaElement::mediaPlayerDidAddTextTrack(WebInbandTextTrack* webTrack)
{
if (!RuntimeEnabledFeatures::videoTrackEnabled())
return;
@@ -2481,10 +2481,10 @@ void HTMLMediaElement::mediaPlayerDidAddTrack(WebInbandTextTrack* webTrack)
// 9. Fire an event with the name addtrack, that does not bubble and is not cancelable, and that uses the TrackEvent
// interface, with the track attribute initialized to the text track's TextTrack object, at the media element's
// textTracks attribute's TextTrackList object.
- addTrack(textTrack.get());
+ addTextTrack(textTrack);
}
-void HTMLMediaElement::mediaPlayerDidRemoveTrack(WebInbandTextTrack* webTrack)
+void HTMLMediaElement::mediaPlayerDidRemoveTextTrack(WebInbandTextTrack* webTrack)
{
if (!RuntimeEnabledFeatures::videoTrackEnabled())
return;
@@ -2498,7 +2498,7 @@ void HTMLMediaElement::mediaPlayerDidRemoveTrack(WebInbandTextTrack* webTrack)
if (!textTrack)
return;
- removeTrack(textTrack.get());
+ removeTextTrack(textTrack.get());
}
void HTMLMediaElement::closeCaptionTracksChanged()
@@ -2507,14 +2507,14 @@ void HTMLMediaElement::closeCaptionTracksChanged()
mediaControls()->closedCaptionTracksChanged();
}
-void HTMLMediaElement::addTrack(TextTrack* track)
+void HTMLMediaElement::addTextTrack(PassRefPtr<TextTrack> track)
{
textTracks()->append(track);
closeCaptionTracksChanged();
}
-void HTMLMediaElement::removeTrack(TextTrack* track)
+void HTMLMediaElement::removeTextTrack(TextTrack* track)
{
TrackDisplayUpdateScope scope(this);
TextTrackCueList* cues = track->cues();
@@ -2535,7 +2535,7 @@ void HTMLMediaElement::removeAllInbandTracks()
TextTrack* track = m_textTracks->item(i);
if (track->trackType() == TextTrack::InBand)
- removeTrack(track);
+ removeTextTrack(track);
}
}
@@ -2564,7 +2564,7 @@ PassRefPtr<TextTrack> HTMLMediaElement::addTextTrack(const AtomicString& kind, c
// first append the track to the text track list.
// 6. Add the new text track to the media element's list of text tracks.
- addTrack(textTrack.get());
+ addTextTrack(textTrack);
// ... its text track readiness state to the text track loaded state ...
textTrack->setReadinessState(TextTrack::Loaded);
@@ -2600,7 +2600,7 @@ void HTMLMediaElement::didAddTrack(HTMLTrackElement* trackElement)
if (!textTrack)
return;
- addTrack(textTrack.get());
+ addTextTrack(textTrack);
// Do not schedule the track loading until parsing finishes so we don't start before all tracks
// in the markup have been added.
@@ -2638,7 +2638,7 @@ void HTMLMediaElement::didRemoveTrack(HTMLTrackElement* trackElement)
// When a track element's parent element changes and the old parent was a media element,
// then the user agent must remove the track element's corresponding text track from the
// media element's list of text tracks.
- removeTrack(textTrack.get());
+ removeTextTrack(textTrack.get());
size_t index = m_textTracksWhenResourceSelectionBegan.find(textTrack.get());
if (index != kNotFound)
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/platform/graphics/media/MediaPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698