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

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

Issue 14936003: Remove unused code behind USE(PLATFORM_TEXT_TRACK_MENU) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 7 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/core/html/track/InbandTextTrack.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 da2f50570f85163e6666d8182608f6e4a2ae3e74..69884e7906c2a03a03a361871fe279d38d14e820 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -109,10 +109,6 @@
#include "MediaKeys.h"
#endif
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-#include "core/platform/graphics/PlatformTextTrack.h"
-#endif
-
using namespace std;
namespace WebCore {
@@ -2587,80 +2583,10 @@ void HTMLMediaElement::mediaPlayerDidRemoveTrack(PassRefPtr<InbandTextTrackPriva
removeTrack(textTrack.get());
}
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-void HTMLMediaElement::setSelectedTextTrack(PassRefPtr<PlatformTextTrack> platformTrack)
-{
- if (!m_textTracks)
- return;
-
- TrackDisplayUpdateScope scope(this);
-
- if (!platformTrack) {
- setSelectedTextTrack(0);
- return;
- }
-
- TextTrack* textTrack;
- size_t i;
- for (i = 0; i < m_textTracks->length(); ++i) {
- textTrack = m_textTracks->item(i);
-
- if (textTrack->platformTextTrack() == platformTrack)
- break;
- }
-
- if (i == m_textTracks->length())
- return;
- setSelectedTextTrack(textTrack);
-}
-
-Vector<RefPtr<PlatformTextTrack> > HTMLMediaElement::platformTextTracks()
-{
- if (!m_textTracks || !m_textTracks->length())
- return Vector<RefPtr<PlatformTextTrack> >();
-
- Vector<RefPtr<PlatformTextTrack> > platformTracks;
- for (size_t i = 0; i < m_textTracks->length(); ++i)
- platformTracks.append(m_textTracks->item(i)->platformTextTrack());
-
- return platformTracks;
-}
-
-void HTMLMediaElement::notifyMediaPlayerOfTextTrackChanges()
-{
- if (!m_textTracks || !m_textTracks->length() || !platformTextTrackMenu())
- return;
-
- m_platformMenu->tracksDidChange();
-}
-
-PlatformTextTrackMenuInterface* HTMLMediaElement::platformTextTrackMenu()
-{
- if (m_platformMenu)
- return m_platformMenu.get();
-
- if (!m_player->implementsTextTrackControls())
- return 0;
-
- m_platformMenu = m_player->textTrackMenu();
- if (!m_platformMenu)
- return 0;
-
- m_platformMenu->setClient(this);
-
- return m_platformMenu.get();
-}
-#endif // #if USE(PLATFORM_TEXT_TRACK_MENU)
-
void HTMLMediaElement::closeCaptionTracksChanged()
{
if (hasMediaControls())
mediaControls()->closedCaptionTracksChanged();
-
-#if USE(PLATFORM_TEXT_TRACK_MENU)
- if (m_player->implementsTextTrackControls())
- scheduleDelayedAction(TextTrackChangesNotification);
-#endif
}
void HTMLMediaElement::addTrack(TextTrack* track)
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/track/InbandTextTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698