Remove dead code: resetMediaState.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Oct 2018 20:14:10 +0000 (20:14 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Oct 2018 20:14:10 +0000 (20:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190355

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-10-08
Reviewed by Jon Lee.

Source/WebCore:

No new tests because no behavior change.

Remove resetMediaState since it is no longer used.

* platform/cocoa/PlaybackSessionInterface.h:
(WebCore::PlaybackSessionInterface::~PlaybackSessionInterface):
* platform/ios/PlaybackSessionInterfaceAVKit.h:
* platform/ios/PlaybackSessionInterfaceAVKit.mm:
(WebCore::PlaybackSessionInterfaceAVKit::resetMediaState): Deleted.
* platform/ios/WebAVPlayerController.h:
* platform/ios/WebAVPlayerController.mm:
(-[WebAVPlayerController resetMediaState]): Deleted.
* platform/mac/PlaybackSessionInterfaceMac.h:
* platform/mac/PlaybackSessionInterfaceMac.mm:
(WebCore::PlaybackSessionInterfaceMac::resetMediaState): Deleted.

Source/WebKit:

Remove resetMediaState since it is no longer used.

* UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
* UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in:
* UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
(WebKit::PlaybackSessionManagerProxy::resetMediaState): Deleted.
* WebProcess/cocoa/PlaybackSessionManager.h:
* WebProcess/cocoa/PlaybackSessionManager.mm:
(WebKit::PlaybackSessionInterfaceContext::resetMediaState): Deleted.

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

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/cocoa/PlaybackSessionInterface.h
Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.h
Source/WebCore/platform/ios/PlaybackSessionInterfaceAVKit.mm
Source/WebCore/platform/ios/WebAVPlayerController.h
Source/WebCore/platform/ios/WebAVPlayerController.mm
Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.h
Source/WebCore/platform/mac/PlaybackSessionInterfaceMac.mm
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.h
Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in
Source/WebKit/UIProcess/Cocoa/PlaybackSessionManagerProxy.mm
Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.h
Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm

index 2cc9854..2caaaba 100644 (file)
@@ -1,5 +1,28 @@
 2018-10-08  Jeremy Jones  <jeremyj@apple.com>
 
+        Remove dead code: resetMediaState.
+        https://bugs.webkit.org/show_bug.cgi?id=190355
+
+        Reviewed by Jon Lee.
+
+        No new tests because no behavior change.
+
+        Remove resetMediaState since it is no longer used.
+
+        * platform/cocoa/PlaybackSessionInterface.h:
+        (WebCore::PlaybackSessionInterface::~PlaybackSessionInterface):
+        * platform/ios/PlaybackSessionInterfaceAVKit.h:
+        * platform/ios/PlaybackSessionInterfaceAVKit.mm:
+        (WebCore::PlaybackSessionInterfaceAVKit::resetMediaState): Deleted.
+        * platform/ios/WebAVPlayerController.h:
+        * platform/ios/WebAVPlayerController.mm:
+        (-[WebAVPlayerController resetMediaState]): Deleted.
+        * platform/mac/PlaybackSessionInterfaceMac.h:
+        * platform/mac/PlaybackSessionInterfaceMac.mm:
+        (WebCore::PlaybackSessionInterfaceMac::resetMediaState): Deleted.
+
+2018-10-08  Jeremy Jones  <jeremyj@apple.com>
+
         Use MediaPlayerEnums::VideoGravity in VideoFullscreenModel.
         https://bugs.webkit.org/show_bug.cgi?id=190357
 
index cdf2bbf..31ec6f2 100644 (file)
@@ -37,7 +37,6 @@ class TimeRanges;
 class PlaybackSessionInterface {
 public:
     virtual ~PlaybackSessionInterface() { };
-    virtual void resetMediaState() = 0;
 };
 
 }
index 8580191..f0aa777 100644 (file)
@@ -64,9 +64,6 @@ public:
     virtual ~PlaybackSessionInterfaceAVKit();
     PlaybackSessionModel* playbackSessionModel() const { return m_playbackSessionModel; }
 
-    // PlaybackSessionInterface
-    WEBCORE_EXPORT void resetMediaState() override;
-
     // PlaybackSessionModelClient
     WEBCORE_EXPORT void durationChanged(double) override;
     WEBCORE_EXPORT void currentTimeChanged(double currentTime, double anchorTime) override;
index 0a28548..7d595d5 100644 (file)
@@ -77,11 +77,6 @@ PlaybackSessionInterfaceAVKit::~PlaybackSessionInterfaceAVKit()
     invalidate();
 }
 
-void PlaybackSessionInterfaceAVKit::resetMediaState()
-{
-    [m_playerController resetMediaState];
-}
-
 void PlaybackSessionInterfaceAVKit::durationChanged(double duration)
 {
     WebAVPlayerController* playerController = m_playerController.get();
index a45346c..12118d4 100644 (file)
@@ -96,8 +96,6 @@ class PlaybackSessionInterfaceAVKit;
 
 @property (NS_NONATOMIC_IOSONLY, retain, readwrite) AVValueTiming *minTiming;
 @property (NS_NONATOMIC_IOSONLY, retain, readwrite) AVValueTiming *maxTiming;
-
-- (void)resetMediaState;
 @end
 
 #endif
index 3721800..b746210 100644 (file)
@@ -625,37 +625,6 @@ static double WebAVPlayerControllerLiveStreamSeekableTimeRangeMinimumDuration =
     return [NSSet setWithObjects:@"hasLiveStreamingContent", @"minTiming", @"maxTiming", @"seekableTimeRangesLastModifiedTime", nil];
 }
 
-- (void)resetMediaState
-{
-    self.contentDuration = 0;
-    self.contentDurationWithinEndTimes = 0;
-    self.loadedTimeRanges = @[];
-
-    self.canPlay = NO;
-    self.canPause = NO;
-    self.canTogglePlayback = NO;
-    self.hasEnabledAudio = NO;
-    self.canSeek = NO;
-    self.status = AVPlayerControllerStatusUnknown;
-
-    self.minTiming = nil;
-    self.maxTiming = nil;
-    self.timing = nil;
-    self.rate = 0;
-    self.volume = 0;
-
-    self.seekableTimeRanges = [NSMutableArray array];
-
-    self.canScanBackward = NO;
-
-    self.audioMediaSelectionOptions = nil;
-    self.currentAudioMediaSelectionOption = nil;
-
-    self.legibleMediaSelectionOptions = nil;
-    self.currentLegibleMediaSelectionOption = nil;
-    _liveStreamEventModePossible = YES;
-}
-
 @end
 
 @implementation WebAVMediaSelectionOption
index e7db397..209b095 100644 (file)
@@ -49,9 +49,6 @@ public:
     virtual ~PlaybackSessionInterfaceMac();
     PlaybackSessionModel* playbackSessionModel() const;
 
-    // PlaybackSessionInterface
-    void resetMediaState() final;
-
     // PlaybackSessionModelClient
     void durationChanged(double) final;
     void currentTimeChanged(double /*currentTime*/, double /*anchorTime*/) final;
index b86266d..58fe62a 100644 (file)
@@ -66,10 +66,6 @@ PlaybackSessionModel* PlaybackSessionInterfaceMac::playbackSessionModel() const
     return m_playbackSessionModel;
 }
 
-void PlaybackSessionInterfaceMac::resetMediaState()
-{
-}
-
 void PlaybackSessionInterfaceMac::durationChanged(double duration)
 {
 #if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
index 88c62ef..0b1b2e0 100644 (file)
@@ -1,5 +1,22 @@
 2018-10-08  Jeremy Jones  <jeremyj@apple.com>
 
+        Remove dead code: resetMediaState.
+        https://bugs.webkit.org/show_bug.cgi?id=190355
+
+        Reviewed by Jon Lee.
+
+        Remove resetMediaState since it is no longer used.
+
+        * UIProcess/Cocoa/PlaybackSessionManagerProxy.h:
+        * UIProcess/Cocoa/PlaybackSessionManagerProxy.messages.in:
+        * UIProcess/Cocoa/PlaybackSessionManagerProxy.mm:
+        (WebKit::PlaybackSessionManagerProxy::resetMediaState): Deleted.
+        * WebProcess/cocoa/PlaybackSessionManager.h:
+        * WebProcess/cocoa/PlaybackSessionManager.mm:
+        (WebKit::PlaybackSessionInterfaceContext::resetMediaState): Deleted.
+
+2018-10-08  Jeremy Jones  <jeremyj@apple.com>
+
         Use MediaPlayerEnums::VideoGravity in VideoFullscreenModel.
         https://bugs.webkit.org/show_bug.cgi?id=190357
 
index a2773e6..53b9bd0 100644 (file)
@@ -199,7 +199,6 @@ private:
     // Messages from PlaybackSessionManager
     void setUpPlaybackControlsManagerWithID(uint64_t contextId);
     void clearPlaybackControlsManager();
-    void resetMediaState(uint64_t contextId);
     void currentTimeChanged(uint64_t contextId, double currentTime, double hostTime);
     void bufferedTimeChanged(uint64_t contextId, double bufferedTime);
     void seekableRangesVectorChanged(uint64_t contextId, Vector<std::pair<double, double>> ranges, double lastModifiedTime, double liveUpdateInterval);
index b31b582..07cae8c 100644 (file)
@@ -22,7 +22,6 @@
 
 #if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
 messages -> PlaybackSessionManagerProxy {
-    ResetMediaState(uint64_t contextId)
     CurrentTimeChanged(uint64_t contextId, double currentTime, double hostTime)
     BufferedTimeChanged(uint64_t contextId, double bufferedTime)
     SeekableRangesVectorChanged(uint64_t contextId, Vector<std::pair<double, double>> ranges, double lastModifiedTime, double liveUpdateInterval)
index dc36171..ad54318 100644 (file)
@@ -394,11 +394,6 @@ void PlaybackSessionManagerProxy::clearPlaybackControlsManager()
     m_page->videoControlsManagerDidChange();
 }
 
-void PlaybackSessionManagerProxy::resetMediaState(uint64_t contextId)
-{
-    ensureInterface(contextId).resetMediaState();
-}
-
 void PlaybackSessionManagerProxy::currentTimeChanged(uint64_t contextId, double currentTime, double hostTime)
 {
     ensureModel(contextId).currentTimeChanged(currentTime);
index f0de62b..5cfe79d 100644 (file)
@@ -70,9 +70,6 @@ public:
 private:
     friend class VideoFullscreenInterfaceContext;
 
-    // PlaybackSessionInterface
-    void resetMediaState() final;
-
     // PlaybackSessionModelClient
     void durationChanged(double) final;
     void currentTimeChanged(double currentTime, double anchorTime) final;
@@ -128,7 +125,6 @@ protected:
     void removeClientForContext(uint64_t contextId);
 
     // Interface to PlaybackSessionInterfaceContext
-    void resetMediaState(uint64_t contextId);
     void durationChanged(uint64_t contextId, double);
     void currentTimeChanged(uint64_t contextId, double currentTime, double anchorTime);
     void bufferedTimeChanged(uint64_t contextId, double bufferedTime);
index d0aec25..018aa68 100644 (file)
@@ -64,12 +64,6 @@ PlaybackSessionInterfaceContext::~PlaybackSessionInterfaceContext()
 {
 }
 
-void PlaybackSessionInterfaceContext::resetMediaState()
-{
-    if (m_manager)
-        m_manager->resetMediaState(m_contextId);
-}
-
 void PlaybackSessionInterfaceContext::durationChanged(double duration)
 {
     if (m_manager)
@@ -322,11 +316,6 @@ WebCore::HTMLMediaElement* PlaybackSessionManager::currentPlaybackControlsElemen
 
 #pragma mark Interface to PlaybackSessionInterfaceContext:
 
-void PlaybackSessionManager::resetMediaState(uint64_t contextId)
-{
-    m_page->send(Messages::PlaybackSessionManagerProxy::ResetMediaState(contextId), m_page->pageID());
-}
-
 void PlaybackSessionManager::durationChanged(uint64_t contextId, double duration)
 {
     m_page->send(Messages::PlaybackSessionManagerProxy::DurationChanged(contextId, duration), m_page->pageID());