Remove "platform text track menu"
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Aug 2015 00:32:58 +0000 (00:32 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Aug 2015 00:32:58 +0000 (00:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148139

Reviewed by Jer Noble.

Source/WebCore:

No new tests, this patch removes unused code.

* WebCore.xcodeproj/project.pbxproj: Remove PlatformTextTrackMenu.h.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::scheduleDelayedAction): Remove PLATFORM_TEXT_TRACK_MENU.
(WebCore::HTMLMediaElement::pendingActionTimerFired):
(WebCore::HTMLMediaElement::textTrackModeChanged):
(WebCore::HTMLMediaElement::mediaPlayerDidRemoveVideoTrack):
(WebCore::HTMLMediaElement::closeCaptionTracksChanged):
(WebCore::HTMLMediaElement::addAudioTrack):
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::setSelectedTextTrack): Deleted.
(WebCore::HTMLMediaElement::platformTextTracks): Deleted.
(WebCore::HTMLMediaElement::notifyMediaPlayerOfTextTrackChanges): Deleted.
(WebCore::HTMLMediaElement::platformTextTrackMenu): Deleted.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::player):
* html/track/InbandTextTrack.h:
* html/track/TextTrack.cpp:
(WebCore::TextTrack::hasCue):
(WebCore::TextTrack::isMainProgramContent):
(WebCore::TextTrack::platformTextTrack): Deleted.
* html/track/TextTrack.h:
(WebCore::TextTrack::create):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::resetMediaEngines):
(WebCore::MediaPlayer::implementsTextTrackControls): Deleted.
(WebCore::MediaPlayer::textTrackMenu): Deleted.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::tracksChanged):
(WebCore::MediaPlayerPrivateInterface::simulateAudioInterruption):
(WebCore::MediaPlayerPrivateInterface::implementsTextTrackControls): Deleted.
(WebCore::MediaPlayerPrivateInterface::textTrackMenu): Deleted.
* platform/graphics/PlatformTextTrack.h:
* platform/graphics/PlatformTextTrackMenu.h: Removed.

Source/WTF:

* wtf/Platform.h: Remove PLATFORM_TEXT_TRACK_MENU.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188612 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/track/InbandTextTrack.h
Source/WebCore/html/track/TextTrack.cpp
Source/WebCore/html/track/TextTrack.h
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/MediaPlayerPrivate.h
Source/WebCore/platform/graphics/PlatformTextTrack.h
Source/WebCore/platform/graphics/PlatformTextTrackMenu.h [deleted file]

index 9cb7098..5121a06 100644 (file)
@@ -1,3 +1,12 @@
+2015-08-18  Eric Carlson  <eric.carlson@apple.com>
+
+        Remove "platform text track menu"
+        https://bugs.webkit.org/show_bug.cgi?id=148139
+
+        Reviewed by Jer Noble.
+
+        * wtf/Platform.h: Remove PLATFORM_TEXT_TRACK_MENU.
+
 2015-08-18  Filip Pizlo  <fpizlo@apple.com>
 
         WTF::Condition should have a fast path for notifyOne/notifyAll that avoids calling unparkOne/unparkAll
index d37e392..1433977 100644 (file)
 #define HAVE_TIMINGDATAOPTIONS 1
 #endif
 
-#if PLATFORM(IOS)
-#define USE_PLATFORM_TEXT_TRACK_MENU 1
-#endif
-
 #if PLATFORM(COCOA)
 #define USE_AUDIO_SESSION 1
 #endif
index 8450aa8..6b9cccc 100644 (file)
@@ -1,3 +1,47 @@
+2015-08-18  Eric Carlson  <eric.carlson@apple.com>
+
+        Remove "platform text track menu"
+        https://bugs.webkit.org/show_bug.cgi?id=148139
+
+        Reviewed by Jer Noble.
+
+        No new tests, this patch removes unused code.
+
+        * WebCore.xcodeproj/project.pbxproj: Remove PlatformTextTrackMenu.h.
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::scheduleDelayedAction): Remove PLATFORM_TEXT_TRACK_MENU.
+        (WebCore::HTMLMediaElement::pendingActionTimerFired):
+        (WebCore::HTMLMediaElement::textTrackModeChanged):
+        (WebCore::HTMLMediaElement::mediaPlayerDidRemoveVideoTrack):
+        (WebCore::HTMLMediaElement::closeCaptionTracksChanged):
+        (WebCore::HTMLMediaElement::addAudioTrack):
+        (WebCore::HTMLMediaElement::clearMediaPlayer):
+        (WebCore::HTMLMediaElement::setSelectedTextTrack): Deleted.
+        (WebCore::HTMLMediaElement::platformTextTracks): Deleted.
+        (WebCore::HTMLMediaElement::notifyMediaPlayerOfTextTrackChanges): Deleted.
+        (WebCore::HTMLMediaElement::platformTextTrackMenu): Deleted.
+        * html/HTMLMediaElement.h:
+        (WebCore::HTMLMediaElement::player):
+        * html/track/InbandTextTrack.h:
+        * html/track/TextTrack.cpp:
+        (WebCore::TextTrack::hasCue):
+        (WebCore::TextTrack::isMainProgramContent):
+        (WebCore::TextTrack::platformTextTrack): Deleted.
+        * html/track/TextTrack.h:
+        (WebCore::TextTrack::create):
+        * platform/graphics/MediaPlayer.cpp:
+        (WebCore::MediaPlayer::resetMediaEngines):
+        (WebCore::MediaPlayer::implementsTextTrackControls): Deleted.
+        (WebCore::MediaPlayer::textTrackMenu): Deleted.
+        * platform/graphics/MediaPlayer.h:
+        * platform/graphics/MediaPlayerPrivate.h:
+        (WebCore::MediaPlayerPrivateInterface::tracksChanged):
+        (WebCore::MediaPlayerPrivateInterface::simulateAudioInterruption):
+        (WebCore::MediaPlayerPrivateInterface::implementsTextTrackControls): Deleted.
+        (WebCore::MediaPlayerPrivateInterface::textTrackMenu): Deleted.
+        * platform/graphics/PlatformTextTrack.h:
+        * platform/graphics/PlatformTextTrackMenu.h: Removed.
+
 2015-08-18  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Search input results and clear icons are misaligned when padding is added
index e7188f8..2be613e 100644 (file)
                0F6383DE18615B29003E5DB5 /* ThreadedScrollingTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F6383DC18615B29003E5DB5 /* ThreadedScrollingTree.h */; settings = {ATTRIBUTES = (Private, ); }; };
                0F6A12BD1A00923700C6DE72 /* DebugPageOverlays.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F6A12BB1A00923700C6DE72 /* DebugPageOverlays.cpp */; };
                0F6A12BE1A00923700C6DE72 /* DebugPageOverlays.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F6A12BC1A00923700C6DE72 /* DebugPageOverlays.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               0F7D07321884C45C00B4AF86 /* PlatformTextTrackMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 072847E316EBC5B00043CFA4 /* PlatformTextTrackMenu.h */; settings = {ATTRIBUTES = (Private, ); }; };
                0F7D07331884C56C00B4AF86 /* PlatformTextTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 072847E216EBC5B00043CFA4 /* PlatformTextTrack.h */; settings = {ATTRIBUTES = (Private, ); }; };
                0F97A658155DA81E00FADD4C /* DisplayRefreshMonitorIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F97A657155DA81E00FADD4C /* DisplayRefreshMonitorIOS.mm */; };
                0FA24D79162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FA24D77162DF91900A3F4C0 /* GraphicsLayerUpdater.cpp */; };
                07277E4817D018CC0015534D /* JSMediaStreamTrackEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStreamTrackEvent.cpp; sourceTree = "<group>"; };
                07277E4917D018CC0015534D /* JSMediaStreamTrackEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaStreamTrackEvent.h; sourceTree = "<group>"; };
                072847E216EBC5B00043CFA4 /* PlatformTextTrack.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformTextTrack.h; sourceTree = "<group>"; };
-               072847E316EBC5B00043CFA4 /* PlatformTextTrackMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformTextTrackMenu.h; sourceTree = "<group>"; };
                072AE1DF183C0741000A5988 /* PluginReplacement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginReplacement.h; sourceTree = "<group>"; };
                072AE1E0183C0741000A5988 /* QuickTimePluginReplacement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = QuickTimePluginReplacement.mm; sourceTree = "<group>"; };
                072AE1E1183C0741000A5988 /* QuickTimePluginReplacement.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = QuickTimePluginReplacement.css; sourceTree = "<group>"; };
                                0562F9601573F88F0031CA16 /* PlatformLayer.h */,
                                CEEFCD7B19DB33DC003876D7 /* PlatformMediaResourceLoader.h */,
                                072847E216EBC5B00043CFA4 /* PlatformTextTrack.h */,
-                               072847E316EBC5B00043CFA4 /* PlatformTextTrackMenu.h */,
                                074E82B818A69F0E007EF54C /* PlatformTimeRanges.cpp */,
                                074E82B918A69F0E007EF54C /* PlatformTimeRanges.h */,
                                BCAB417F13E356E800D8AAF3 /* Region.cpp */,
                                297BE3D716C03C0E003316BD /* PlatformSpeechSynthesizer.h in Headers */,
                                1AD8F81B11CAB9E900E93E54 /* PlatformStrategies.h in Headers */,
                                0F7D07331884C56C00B4AF86 /* PlatformTextTrack.h in Headers */,
-                               0F7D07321884C45C00B4AF86 /* PlatformTextTrackMenu.h in Headers */,
                                074E82BB18A69F0E007EF54C /* PlatformTimeRanges.h in Headers */,
                                935C476B09AC4D4F00A6AAB4 /* PlatformWheelEvent.h in Headers */,
                                31D591B316697A6C00E6BF02 /* PlugInClient.h in Headers */,
index cd43b37..90e35f3 100644 (file)
 #include "MediaKeys.h"
 #endif
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-#include "PlatformTextTrack.h"
-#endif
-
 #if ENABLE(MEDIA_CONTROLS_SCRIPT)
 #include "JSMediaControlsHost.h"
 #include "MediaControlsHost.h"
@@ -803,11 +799,6 @@ void HTMLMediaElement::scheduleDelayedAction(DelayedActionType actionType)
         setFlags(m_pendingActionFlags, ConfigureTextTracks);
 #endif
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    if (actionType & TextTrackChangesNotification)
-        setFlags(m_pendingActionFlags, TextTrackChangesNotification);
-#endif
-
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
     if (actionType & CheckPlaybackTargetCompatablity)
         setFlags(m_pendingActionFlags, CheckPlaybackTargetCompatablity);
@@ -855,11 +846,6 @@ void HTMLMediaElement::pendingActionTimerFired()
             loadInternal();
     }
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    if (RuntimeEnabledFeatures::sharedFeatures().webkitVideoTrackEnabled() && (m_pendingActionFlags & TextTrackChangesNotification))
-        notifyMediaPlayerOfTextTrackChanges();
-#endif
-
 #if ENABLE(WIRELESS_PLAYBACK_TARGET)
     if (m_pendingActionFlags & CheckPlaybackTargetCompatablity && m_player && m_player->isCurrentPlaybackTargetWireless() && !m_player->canPlayToWirelessPlaybackTarget()) {
         LOG(Media, "HTMLMediaElement::pendingActionTimerFired(%p) - calling setShouldPlayToPlaybackTarget(false)", this);
@@ -1667,11 +1653,6 @@ void HTMLMediaElement::textTrackModeChanged(TextTrack* track)
     if (track->mode() != TextTrack::disabledKeyword() && trackIsLoaded)
         textTrackAddCues(track, track->cues());
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    if (platformTextTrackMenu())
-        platformTextTrackMenu()->trackWasSelected(track->platformTextTrack());
-#endif
-    
     configureTextTrackDisplay(AssumeTextTrackVisibilityChanged);
 
     if (m_textTracks && m_textTracks->contains(track))
@@ -3477,86 +3458,10 @@ void HTMLMediaElement::mediaPlayerDidRemoveVideoTrack(PassRefPtr<VideoTrackPriva
     prpTrack->willBeRemoved();
 }
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-void HTMLMediaElement::setSelectedTextTrack(PassRefPtr<PlatformTextTrack> platformTrack)
-{
-    if (!m_textTracks)
-        return;
-
-    TrackDisplayUpdateScope scope(this);
-
-    if (!platformTrack) {
-        setSelectedTextTrack(TextTrack::captionMenuOffItem());
-        return;
-    }
-
-    TextTrack* textTrack;
-    if (platformTrack == PlatformTextTrack::captionMenuOffItem())
-        textTrack = TextTrack::captionMenuOffItem();
-    else if (platformTrack == PlatformTextTrack::captionMenuAutomaticItem())
-        textTrack = TextTrack::captionMenuAutomaticItem();
-    else {
-        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 || !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 && m_player->implementsTextTrackControls())
-        scheduleDelayedAction(TextTrackChangesNotification);
-#endif
 }
 
 void HTMLMediaElement::addAudioTrack(PassRefPtr<AudioTrack> track)
@@ -4925,13 +4830,6 @@ void HTMLMediaElement::clearMediaPlayer(int flags)
 {
     LOG(Media, "HTMLMediaElement::clearMediaPlayer(%p) - flags = %x", this, (unsigned)flags);
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    if (platformTextTrackMenu()) {
-        m_platformMenu->setClient(nullptr);
-        m_platformMenu = nullptr;
-    }
-#endif
-
 #if ENABLE(VIDEO_TRACK)
     forgetResourceSpecificTracks();
 #endif
index 7423ff6..1b39a57 100644 (file)
@@ -106,9 +106,6 @@ class HTMLMediaElement
     , private TextTrackClient
     , private VideoTrackClient
 #endif
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    , public PlatformTextTrackMenuClient
-#endif
 {
 public:
     MediaPlayer* player() const { return m_player.get(); }
@@ -304,12 +301,6 @@ public:
     virtual Vector<RefPtr<PlatformTextTrack>> outOfBandTrackSources() override;
 #endif
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    virtual void setSelectedTextTrack(PassRefPtr<PlatformTextTrack>) override;
-    virtual Vector<RefPtr<PlatformTextTrack>> platformTextTracks() override;
-    PlatformTextTrackMenuInterface* platformTextTrackMenu();
-#endif
-
     struct TrackGroup;
     void configureTextTrackGroupForLanguage(const TrackGroup&) const;
     void configureTextTracks();
@@ -943,10 +934,6 @@ private:
     RefPtr<MediaKeys> m_mediaKeys;
 #endif
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    RefPtr<PlatformTextTrackMenuInterface> m_platformMenu;
-#endif
-
     std::unique_ptr<MediaElementSession> m_mediaSession;
     PageActivityAssertionToken m_activityToken;
     size_t m_reportedExtraMemoryCost;
index cab7a3d..fd1a9e3 100644 (file)
@@ -85,10 +85,6 @@ private:
     virtual void parseWebVTTCueData(InbandTextTrackPrivate*, const ISOWebVTTCue&) override { ASSERT_NOT_REACHED(); }
 
     virtual MediaTime startTimeVariance() const override;
-
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    virtual InbandTextTrackPrivate* privateTrack() override { return m_private.get(); }
-#endif
 };
 
 } // namespace WebCore
index 2a133a5..ce952f6 100644 (file)
@@ -542,48 +542,6 @@ bool TextTrack::hasCue(TextTrackCue* cue, TextTrackCue::CueMatchRules match)
     return false;
 }
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-PassRefPtr<PlatformTextTrack> TextTrack::platformTextTrack()
-{
-    if (m_platformTextTrack)
-        return m_platformTextTrack;
-
-    PlatformTextTrack::TrackKind platformKind = PlatformTextTrack::Caption;
-    if (kind() == subtitlesKeyword())
-        platformKind = PlatformTextTrack::Subtitle;
-    else if (kind() == captionsKeyword())
-        platformKind = PlatformTextTrack::Caption;
-    else if (kind() == descriptionsKeyword())
-        platformKind = PlatformTextTrack::Description;
-    else if (kind() == chaptersKeyword())
-        platformKind = PlatformTextTrack::Chapter;
-    else if (kind() == metadataKeyword())
-        platformKind = PlatformTextTrack::MetaData;
-    else if (kind() == forcedKeyword())
-        platformKind = PlatformTextTrack::Forced;
-
-    PlatformTextTrack::TrackType type = PlatformTextTrack::OutOfBand;
-    if (m_trackType == TrackElement)
-        type = PlatformTextTrack::OutOfBand;
-    else if (m_trackType == AddTrack)
-        type = PlatformTextTrack::Script;
-    else if (m_trackType == InBand)
-        type = PlatformTextTrack::InBand;
-
-    PlatformTextTrack::TrackMode platformMode = PlatformTextTrack::Disabled;
-    if (TextTrack::hiddenKeyword() == mode())
-        platformMode = PlatformTextTrack::Hidden;
-    else if (TextTrack::disabledKeyword() == mode())
-        platformMode = PlatformTextTrack::Disabled;
-    else if (TextTrack::showingKeyword() == mode())
-        platformMode = PlatformTextTrack::Showing;
-
-    m_platformTextTrack = PlatformTextTrack::create(this, label(), language(), platformMode, platformKind, type, uniqueId());
-
-    return m_platformTextTrack;
-}
-#endif
-
 bool TextTrack::isMainProgramContent() const
 {
     // "Main program" content is intrinsic to the presentation of the media file, regardless of locale. Content such as
index 522e574..6f94885 100644 (file)
 #include <wtf/RefCounted.h>
 #include <wtf/text/WTFString.h>
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-#include "PlatformTextTrack.h"
-#endif
-
 namespace WebCore {
 
 class ScriptExecutionContext;
@@ -61,11 +57,7 @@ public:
     virtual void textTrackRemoveCue(TextTrack*, PassRefPtr<TextTrackCue>) = 0;
 };
 
-class TextTrack : public TrackBase, public EventTargetWithInlineData
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    , public PlatformTextTrackClient
-#endif
-    {
+class TextTrack : public TrackBase, public EventTargetWithInlineData {
 public:
     static Ref<TextTrack> create(ScriptExecutionContext* context, TextTrackClient* client, const AtomicString& kind, const AtomicString& id, const AtomicString& label, const AtomicString& language)
     {
@@ -146,10 +138,6 @@ public:
 
     void removeAllCues();
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    PassRefPtr<PlatformTextTrack> platformTextTrack();
-#endif
-
 #if ENABLE(MEDIA_SOURCE)
     virtual void setLanguage(const AtomicString&) override;
 #endif
@@ -179,12 +167,6 @@ private:
     RefPtr<VTTRegionList> m_regions;
 #endif
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    virtual TextTrack* publicTrack() override { return this; }
-
-    RefPtr<PlatformTextTrack> m_platformTextTrack;
-#endif
-
     TextTrackCueList* ensureTextTrackCueList();
 
     ScriptExecutionContext* m_scriptExecutionContext;
index a64268d..9a4ca65 100644 (file)
@@ -1262,18 +1262,6 @@ Vector<RefPtr<PlatformTextTrack>> MediaPlayer::outOfBandTrackSources()
 
 #endif // ENABLE(VIDEO_TRACK)
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-bool MediaPlayer::implementsTextTrackControls() const
-{
-    return m_private->implementsTextTrackControls();
-}
-
-PassRefPtr<PlatformTextTrackMenuInterface> MediaPlayer::textTrackMenu()
-{
-    return m_private->textTrackMenu();
-}
-#endif // USE(PLATFORM_TEXT_TRACK_MENU)
-
 void MediaPlayer::resetMediaEngines()
 {
     mutableInstalledMediaEnginesVector().clear();
index 67e8843..b4fc643 100644 (file)
 #include "PlatformTextTrack.h"
 #endif
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-#include "PlatformTextTrackMenu.h"
-#endif
-
 OBJC_CLASS AVAsset;
 OBJC_CLASS AVPlayer;
 OBJC_CLASS NSArray;
@@ -586,11 +582,6 @@ public:
 
     static void resetMediaEngines();
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    bool implementsTextTrackControls() const;
-    PassRefPtr<PlatformTextTrackMenuInterface> textTrackMenu();
-#endif
-
 #if USE(GSTREAMER)
     void simulateAudioInterruption();
 #endif
index a201fbb..363724e 100644 (file)
@@ -242,11 +242,6 @@ public:
     virtual void tracksChanged() { };
 #endif
 
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-    virtual bool implementsTextTrackControls() const { return false; }
-    virtual PassRefPtr<PlatformTextTrackMenuInterface> textTrackMenu() { return 0; }
-#endif
-
 #if USE(GSTREAMER)
     virtual void simulateAudioInterruption() { }
 #endif
index 0cf9ab0..20be3d1 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef PlatformTextTrack_h
 #define PlatformTextTrack_h
 
-#if USE(PLATFORM_TEXT_TRACK_MENU) || ENABLE(AVF_CAPTIONS)
+#if ENABLE(AVF_CAPTIONS)
 
 #include <wtf/RefCounted.h>
 #include <wtf/text/WTFString.h>
diff --git a/Source/WebCore/platform/graphics/PlatformTextTrackMenu.h b/Source/WebCore/platform/graphics/PlatformTextTrackMenu.h
deleted file mode 100644 (file)
index 7591abc..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef PlatformTextTrackMenu_h
-#define PlatformTextTrackMenu_h
-
-#if USE(PLATFORM_TEXT_TRACK_MENU)
-
-#include "PlatformTextTrack.h"
-#include <wtf/Noncopyable.h>
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
-class PlatformTextTrack;
-
-class PlatformTextTrackMenuClient {
-public:
-    virtual ~PlatformTextTrackMenuClient() { }
-    
-    virtual void setSelectedTextTrack(PassRefPtr<PlatformTextTrack>) = 0;
-    virtual Vector<RefPtr<PlatformTextTrack>> platformTextTracks() = 0;
-};
-
-class PlatformTextTrackMenuInterface  : public RefCounted<PlatformTextTrackMenuInterface> {
-public:
-    explicit PlatformTextTrackMenuInterface() { }
-    virtual ~PlatformTextTrackMenuInterface() { }
-
-    virtual void tracksDidChange() = 0;
-    virtual void trackWasSelected(PassRefPtr<PlatformTextTrack>) = 0;
-    virtual void setClient(PlatformTextTrackMenuClient*) = 0;
-};
-
-}
-
-#endif // USE(PLATFORM_TEXT_TRACK_MENU)
-#endif // PlatformTextTrackMenu_h