Netflix seeking quirk should also apply to Now Playing, and should always use the
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Jun 2017 21:46:29 +0000 (21:46 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Jun 2017 21:46:29 +0000 (21:46 +0000)
livestream UI
https://bugs.webkit.org/show_bug.cgi?id=173030
-and corresponding-
rdar://problem/32228660

Reviewed by Darin Adler.

Source/WebCore:

This patch rolls out much of https://trac.webkit.org/changeset/217791/webkit in
favor of an approach that can be used to apply the quirk to Now Playing in
addition to Touch Bar. This patch also changes the UI in both Touch Bar and Now
Playing to match live stream UI, which means there is no playhead. This hopefully
makes it less confusing that taps on the timeline will have no effect.

supportsSeeking() should return false for Netflix. That function needs to be
public now.
* html/HTMLMediaElement.cpp:
(WebCore::needsSeekingSupportQuirk):
(WebCore::HTMLMediaElement::supportsSeeking):
* html/HTMLMediaElement.h:

Here is where we get the desired result in Now Playing. Make sure the
currentSession supportsSeeking() before relying on the time and duration info for
the sake of Now Playing.
* platform/audio/mac/MediaSessionManagerMac.mm:
(WebCore::MediaSessionManagerMac::updateNowPlayingInfo):

We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
* platform/cocoa/WebPlaybackSessionModel.h:
(WebCore::WebPlaybackSessionModelClient::mutedChanged):
(WebCore::WebPlaybackSessionModelClient::allowsTouchBarScrubbingChanged): Deleted.
* platform/cocoa/WebPlaybackSessionModelMediaElement.h:
* platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
(WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):

And here is where we get the desired result for Touch Bar. Make sure the the media
element supportsSeeking() before relying on the duration.
(WebCore::WebPlaybackSessionModelMediaElement::duration):

We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
(WebCore::WebPlaybackSessionModelMediaElement::allowsTouchBarScrubbing): Deleted.
* platform/ios/WebVideoFullscreenControllerAVKit.mm:
* platform/mac/WebPlaybackControlsManager.h:

Currently the Touch Bar live stream UI lets you seek, which results in broken
behavior on real live streams and on Netflix. Prevent that by preventing scrubbing
for NaN and infinite durations.
* platform/mac/WebPlaybackControlsManager.mm:
(-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):

We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
* platform/mac/WebPlaybackSessionInterfaceMac.h:
* platform/mac/WebPlaybackSessionInterfaceMac.mm:
(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):
(WebCore::WebPlaybackSessionInterfaceMac::allowsTouchBarScrubbingChanged): Deleted.

Source/WebKit2:

See WebCore ChangeLog for more details. We can roll out allowsTouchBarScrubbing()
and rely on supportsSeeking().

* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
* UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
(WebKit::WebPlaybackSessionModelContext::setAllowsTouchBarScrubbing): Deleted.
(WebKit::WebPlaybackSessionManagerProxy::setAllowsTouchBarScrubbing): Deleted.
* WebProcess/cocoa/WebPlaybackSessionManager.h:
* WebProcess/cocoa/WebPlaybackSessionManager.mm:
(WebKit::WebPlaybackSessionInterfaceContext::allowsTouchBarScrubbingChanged): Deleted.
(WebKit::WebPlaybackSessionManager::allowsTouchBarScrubbingChanged): Deleted.

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

18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm
Source/WebCore/platform/cocoa/WebPlaybackSessionModel.h
Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.h
Source/WebCore/platform/cocoa/WebPlaybackSessionModelMediaElement.mm
Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm
Source/WebCore/platform/mac/WebPlaybackControlsManager.h
Source/WebCore/platform/mac/WebPlaybackControlsManager.mm
Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.h
Source/WebCore/platform/mac/WebPlaybackSessionInterfaceMac.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h
Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in
Source/WebKit2/UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm
Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.h
Source/WebKit2/WebProcess/cocoa/WebPlaybackSessionManager.mm

index 0130fad..69fd8ff 100644 (file)
@@ -1,3 +1,61 @@
+2017-06-06  Beth Dakin  <bdakin@apple.com>
+
+        Netflix seeking quirk should also apply to Now Playing, and should always use the 
+        livestream UI
+        https://bugs.webkit.org/show_bug.cgi?id=173030
+        -and corresponding-
+        rdar://problem/32228660
+
+        Reviewed by Darin Adler.
+
+        This patch rolls out much of https://trac.webkit.org/changeset/217791/webkit in 
+        favor of an approach that can be used to apply the quirk to Now Playing in 
+        addition to Touch Bar. This patch also changes the UI in both Touch Bar and Now 
+        Playing to match live stream UI, which means there is no playhead. This hopefully 
+        makes it less confusing that taps on the timeline will have no effect. 
+
+        supportsSeeking() should return false for Netflix. That function needs to be 
+        public now.
+        * html/HTMLMediaElement.cpp:
+        (WebCore::needsSeekingSupportQuirk):
+        (WebCore::HTMLMediaElement::supportsSeeking):
+        * html/HTMLMediaElement.h:
+
+        Here is where we get the desired result in Now Playing. Make sure the 
+        currentSession supportsSeeking() before relying on the time and duration info for 
+        the sake of Now Playing. 
+        * platform/audio/mac/MediaSessionManagerMac.mm:
+        (WebCore::MediaSessionManagerMac::updateNowPlayingInfo):
+
+        We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
+        * platform/cocoa/WebPlaybackSessionModel.h:
+        (WebCore::WebPlaybackSessionModelClient::mutedChanged):
+        (WebCore::WebPlaybackSessionModelClient::allowsTouchBarScrubbingChanged): Deleted.
+        * platform/cocoa/WebPlaybackSessionModelMediaElement.h:
+        * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
+        (WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):
+
+        And here is where we get the desired result for Touch Bar. Make sure the the media 
+        element supportsSeeking() before relying on the duration. 
+        (WebCore::WebPlaybackSessionModelMediaElement::duration):
+
+        We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
+        (WebCore::WebPlaybackSessionModelMediaElement::allowsTouchBarScrubbing): Deleted.
+        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
+        * platform/mac/WebPlaybackControlsManager.h:
+
+        Currently the Touch Bar live stream UI lets you seek, which results in broken 
+        behavior on real live streams and on Netflix. Prevent that by preventing scrubbing 
+        for NaN and infinite durations.
+        * platform/mac/WebPlaybackControlsManager.mm:
+        (-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):
+
+        We can roll out allowsTouchBarScrubbing() and rely on supportsSeeking().
+        * platform/mac/WebPlaybackSessionInterfaceMac.h:
+        * platform/mac/WebPlaybackSessionInterfaceMac.mm:
+        (WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):
+        (WebCore::WebPlaybackSessionInterfaceMac::allowsTouchBarScrubbingChanged): Deleted.
+
 2017-06-06  Konstantin Tokarev  <annulen@yandex.ru>
 
         Add missing <functional> includes
index 4bdef62..d4d1e7a 100644 (file)
@@ -7095,9 +7095,18 @@ void HTMLMediaElement::didReceiveRemoteControlCommand(PlatformMediaSession::Remo
     }
 }
 
+static bool needsSeekingSupportQuirk(Document& document)
+{
+    if (!document.settings().needsSiteSpecificQuirks())
+        return false;
+            
+    String host = document.topDocument().url().host();
+    return equalLettersIgnoringASCIICase(host, "netflix.com") || host.endsWithIgnoringASCIICase(".netflix.com");
+}
+
 bool HTMLMediaElement::supportsSeeking() const 
 {
-    return !isLiveStream();
+    return !needsSeekingSupportQuirk(document()) && !isLiveStream();
 }
 
 bool HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction(PlatformMediaSession::InterruptionType type) const
index b362b62..9bf479d 100644 (file)
@@ -518,6 +518,8 @@ public:
     bool hasMediaStreamSrcObject() const { return !!m_mediaStreamSrcObject; }
 #endif
 
+    bool supportsSeeking() const override;
+
 protected:
     HTMLMediaElement(const QualifiedName&, Document&, bool createdByParser);
     virtual ~HTMLMediaElement();
@@ -817,7 +819,6 @@ private:
     double mediaSessionCurrentTime() const override { return currentTime(); }
     bool canReceiveRemoteControlCommands() const override { return true; }
     void didReceiveRemoteControlCommand(PlatformMediaSession::RemoteControlCommandType, const PlatformMediaSession::RemoteCommandArgument*) override;
-    bool supportsSeeking() const override;
     bool shouldOverrideBackgroundPlaybackRestriction(PlatformMediaSession::InterruptionType) const override;
     bool shouldOverrideBackgroundLoadingRestriction() const override;
     bool canProduceAudio() const final;
index 1876318..b3c8776 100644 (file)
@@ -155,7 +155,7 @@ void MediaSessionManagerMac::updateNowPlayingInfo()
     });
 
     String title = currentSession->title();
-    double duration = currentSession->duration();
+    double duration = currentSession->supportsSeeking() ? currentSession->duration() : MediaPlayer::invalidTime();
     double rate = currentSession->state() == PlatformMediaSession::Playing ? 1 : 0;
     auto info = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 4, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
 
@@ -174,7 +174,7 @@ void MediaSessionManagerMac::updateNowPlayingInfo()
     CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoPlaybackRate, cfRate);
 
     double currentTime = currentSession->currentTime();
-    if (std::isfinite(currentTime) && currentTime != MediaPlayer::invalidTime()) {
+    if (std::isfinite(currentTime) && currentTime != MediaPlayer::invalidTime() && currentSession->supportsSeeking()) {
         auto cfCurrentTime = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberDoubleType, &currentTime));
         CFDictionarySetValue(info.get(), kMRMediaRemoteNowPlayingInfoElapsedTime, cfCurrentTime.get());
         m_lastUpdatedNowPlayingElapsedTime = currentTime;
index 900201a..68fab62 100644 (file)
@@ -78,7 +78,6 @@ public:
     virtual String externalPlaybackLocalizedDeviceName() const = 0;
     virtual bool wirelessVideoPlaybackDisabled() const = 0;
     virtual bool isMuted() const = 0;
-    virtual bool allowsTouchBarScrubbing() const = 0;
 };
 
 class WebPlaybackSessionModelClient {
@@ -98,7 +97,6 @@ public:
     virtual void externalPlaybackChanged(bool /* enabled */, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String& /* localizedDeviceName */) { }
     virtual void wirelessVideoPlaybackDisabledChanged(bool) { }
     virtual void mutedChanged(bool) { }
-    virtual void allowsTouchBarScrubbingChanged(bool) { }
 };
 
 }
index 8ac54ec..18d11d7 100644 (file)
@@ -89,7 +89,6 @@ public:
     String externalPlaybackLocalizedDeviceName() const final;
     bool wirelessVideoPlaybackDisabled() const final;
     bool isMuted() const final;
-    bool allowsTouchBarScrubbing() const final;
 
 protected:
     WEBCORE_EXPORT WebPlaybackSessionModelMediaElement();
index 19bb54a..cd5008d 100644 (file)
 #import "HTMLElement.h"
 #import "HTMLMediaElement.h"
 #import "Logging.h"
-#import "MainFrame.h"
 #import "MediaControlsHost.h"
 #import "MediaSelectionOption.h"
 #import "Page.h"
 #import "PageGroup.h"
-#import "Settings.h"
 #import "SoftLinking.h"
 #import "TextTrackList.h"
 #import "TimeRanges.h"
@@ -172,11 +170,6 @@ void WebPlaybackSessionModelMediaElement::updateForEventName(const WTF::AtomicSt
         for (auto client : m_clients)
             client->mutedChanged(isMuted());
     }
-    
-    if (all) {
-        for (auto client : m_clients)
-            client->allowsTouchBarScrubbingChanged(allowsTouchBarScrubbing());
-    }
 }
 void WebPlaybackSessionModelMediaElement::addClient(WebPlaybackSessionModelClient& client)
 {
@@ -363,7 +356,9 @@ const AtomicString&  WebPlaybackSessionModelMediaElement::eventNameAll()
 
 double WebPlaybackSessionModelMediaElement::duration() const
 {
-    return m_mediaElement ? m_mediaElement->duration() : 0;
+    if (!m_mediaElement)
+        return 0;
+    return m_mediaElement->supportsSeeking() ? m_mediaElement->duration() : std::numeric_limits<double>::quiet_NaN();
 }
 
 double WebPlaybackSessionModelMediaElement::currentTime() const
@@ -513,26 +508,6 @@ bool WebPlaybackSessionModelMediaElement::isMuted() const
     return m_mediaElement ? m_mediaElement->muted() : false;
 }
 
-bool WebPlaybackSessionModelMediaElement::allowsTouchBarScrubbing() const
-{
-    if (!m_mediaElement)
-        return false;
-        
-    Page* page = m_mediaElement->document().page();
-    if (!page)
-        return false;
-        
-    auto* document = page->mainFrame().document();
-    if (!document)
-        return false;
-        
-    if (!page->settings().needsSiteSpecificQuirks())
-        return true;
-        
-    String host = document->url().host();
-    return !(equalLettersIgnoringASCIICase(host, "netflix.com") || host.endsWithIgnoringASCIICase(".netflix.com"));
-}
-
 }
 
 #endif
index 9787139..7bcff4b 100644 (file)
@@ -166,7 +166,6 @@ private:
     bool wirelessVideoPlaybackDisabled() const override;
     void togglePictureInPicture() override { }
     void toggleMuted() override;
-    bool allowsTouchBarScrubbing() const override { return false; }
 
     // WebPlaybackSessionModelClient
     void durationChanged(double) override;
index d099a4d..705d63b 100644 (file)
@@ -57,7 +57,6 @@ WEBCORE_EXPORT
     RetainPtr<AVTouchBarMediaSelectionOption> _currentLegibleTouchBarMediaSelectionOption;
     float _rate;
     BOOL _canTogglePlayback;
-    BOOL _allowsTouchBarScrubbing;
 
     RefPtr<WebCore::WebPlaybackSessionInterfaceMac> _webPlaybackSessionInterfaceMac;
 }
@@ -75,7 +74,6 @@ WEBCORE_EXPORT
 @property BOOL allowsPictureInPicturePlayback;
 @property (getter=isPictureInPictureActive) BOOL pictureInPictureActive;
 @property BOOL canTogglePictureInPicture;
-@property BOOL allowsTouchBarScrubbing;
 
 - (AVTouchBarMediaSelectionOption *)currentAudioTouchBarMediaSelectionOption;
 - (void)setCurrentAudioTouchBarMediaSelectionOption:(AVTouchBarMediaSelectionOption *)option;
index f33a24a..0a15040 100644 (file)
@@ -56,7 +56,6 @@ SOFT_LINK_CLASS_OPTIONAL(AVKit, AVFunctionBarMediaSelectionOption)
 @synthesize allowsPictureInPicturePlayback;
 @synthesize pictureInPictureActive;
 @synthesize canTogglePictureInPicture;
-@synthesize allowsTouchBarScrubbing=_allowsTouchBarScrubbing;
 
 - (void)dealloc
 {
@@ -117,11 +116,11 @@ SOFT_LINK_CLASS_OPTIONAL(AVKit, AVFunctionBarMediaSelectionOption)
 
 - (BOOL)canBeginTouchBarScrubbing
 {
-    // At this time, _allowsTouchBarScrubbing is always YES except for Netflix, which requires a quirk to
-    // disable scrubbing. It's not ideal to return YES for all other media. The intent of the API is that
-    // we return NO when the media is being scrubbed via the on-screen scrubber. But we can only possibly
-    // get the right answer for media that uses the default controls.
-    return _allowsTouchBarScrubbing;
+    // At this time, we return YES for all media that is not a live stream and media that is not Netflix. (A Netflix
+    // quirk means we pretend Netflix is a live stream for Touch Bar.) It's not ideal to return YES all the time for
+    // other media. The intent of the API is that we return NO when the media is being scrubbed via the on-screen scrubber.
+    // But we can only possibly get the right answer for media that uses the default controls.
+    return std::isfinite(_contentDuration);;
 }
 
 - (void)beginTouchBarScrubbing
index 101f9a2..01dfadd 100644 (file)
@@ -62,7 +62,6 @@ public:
     WEBCORE_EXPORT void audioMediaSelectionIndexChanged(uint64_t) final;
     WEBCORE_EXPORT void legibleMediaSelectionIndexChanged(uint64_t) final;
     WEBCORE_EXPORT void externalPlaybackChanged(bool /* enabled */, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String& /* localizedDeviceName */) final;
-    WEBCORE_EXPORT void allowsTouchBarScrubbingChanged(bool allowsTouchBarScrubbing) final;
 
     WEBCORE_EXPORT void invalidate();
     WEBCORE_EXPORT void ensureControlsManager();
index cac1c80..3bec035 100644 (file)
@@ -186,15 +186,6 @@ void WebPlaybackSessionInterfaceMac::externalPlaybackChanged(bool enabled, WebPl
 #endif
 }
 
-void WebPlaybackSessionInterfaceMac::allowsTouchBarScrubbingChanged(bool allowsTouchBarScrubbing)
-{
-#if ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
-    [playBackControlsManager() setAllowsTouchBarScrubbing:allowsTouchBarScrubbing];
-#else
-    UNUSED_PARAM(allowsTouchBarScrubbing);
-#endif
-}
-
 void WebPlaybackSessionInterfaceMac::invalidate()
 {
     if (!m_playbackSessionModel)
@@ -237,7 +228,6 @@ void WebPlaybackSessionInterfaceMac::setPlayBackControlsManager(WebPlaybackContr
     manager.playing = m_playbackSessionModel->isPlaying();
     [manager setAudioMediaSelectionOptions:m_playbackSessionModel->audioMediaSelectionOptions() withSelectedIndex:static_cast<NSUInteger>(m_playbackSessionModel->audioMediaSelectedIndex())];
     [manager setLegibleMediaSelectionOptions:m_playbackSessionModel->legibleMediaSelectionOptions() withSelectedIndex:static_cast<NSUInteger>(m_playbackSessionModel->legibleMediaSelectedIndex())];
-    manager.allowsTouchBarScrubbing = m_playbackSessionModel->allowsTouchBarScrubbing();
 }
 
 void WebPlaybackSessionInterfaceMac::updatePlaybackControlsManagerTiming(double currentTime, double anchorTime, double playbackRate, bool isPlaying)
index ad0bc90..abf3e3f 100644 (file)
@@ -1,3 +1,26 @@
+2017-06-06  Beth Dakin  <bdakin@apple.com>
+
+        Netflix seeking quirk should also apply to Now Playing, and should always use the 
+        livestream UI
+        https://bugs.webkit.org/show_bug.cgi?id=173030
+        -and corresponding-
+        rdar://problem/32228660
+
+        Reviewed by Darin Adler.
+
+        See WebCore ChangeLog for more details. We can roll out allowsTouchBarScrubbing() 
+        and rely on supportsSeeking().
+
+        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
+        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
+        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
+        (WebKit::WebPlaybackSessionModelContext::setAllowsTouchBarScrubbing): Deleted.
+        (WebKit::WebPlaybackSessionManagerProxy::setAllowsTouchBarScrubbing): Deleted.
+        * WebProcess/cocoa/WebPlaybackSessionManager.h:
+        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
+        (WebKit::WebPlaybackSessionInterfaceContext::allowsTouchBarScrubbingChanged): Deleted.
+        (WebKit::WebPlaybackSessionManager::allowsTouchBarScrubbingChanged): Deleted.
+
 2017-06-06  Jer Noble  <jer.noble@apple.com>
 
         [Cocoa] Set defaults for mediaContentTypesRequiringHardwareSupport setting
index 57ad756..9041cec 100644 (file)
@@ -84,7 +84,6 @@ public:
     void setExternalPlayback(bool, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String&);
     void setWirelessVideoPlaybackDisabled(bool);
     void setMuted(bool);
-    void setAllowsTouchBarScrubbing(bool);
 
 private:
     friend class WebVideoFullscreenModelContext;
@@ -129,7 +128,6 @@ private:
     String externalPlaybackLocalizedDeviceName() const final { return m_externalPlaybackLocalizedDeviceName; }
     bool wirelessVideoPlaybackDisabled() const final { return m_wirelessVideoPlaybackDisabled; }
     bool isMuted() const final { return m_muted; }
-    bool allowsTouchBarScrubbing() const final { return m_allowsTouchBarScrubbing; }
 
     WebPlaybackSessionManagerProxy* m_manager;
     uint64_t m_contextId;
@@ -153,7 +151,6 @@ private:
     String m_externalPlaybackLocalizedDeviceName;
     bool m_wirelessVideoPlaybackDisabled { false };
     bool m_muted { false };
-    bool m_allowsTouchBarScrubbing { true };
 };
 
 class WebPlaybackSessionManagerProxy : public RefCounted<WebPlaybackSessionManagerProxy>, private IPC::MessageReceiver {
@@ -200,7 +197,6 @@ private:
     void setRate(uint64_t contextId, bool isPlaying, double rate);
     void handleControlledElementIDResponse(uint64_t, String) const;
     void setMuted(uint64_t contextId, bool muted);
-    void setAllowsTouchBarScrubbing(uint64_t contextId, bool allowsTouchBarScrubbing);
 
     // Messages to WebPlaybackSessionManager
     void play(uint64_t contextId);
index 381a803..9a12987 100644 (file)
@@ -39,7 +39,6 @@ messages -> WebPlaybackSessionManagerProxy {
     SetMuted(uint64_t contextId, bool muted);
     SetUpPlaybackControlsManagerWithID(uint64_t contextId)
     ClearPlaybackControlsManager()
-    SetAllowsTouchBarScrubbing(uint64_t contextId, bool allowsTouchBarScrubbing)
 
     HandleControlledElementIDResponse(uint64_t contextId, String id)
 }
index 4ec05fd..90240f3 100644 (file)
@@ -251,13 +251,6 @@ void WebPlaybackSessionModelContext::setMuted(bool muted)
         client->mutedChanged(muted);
 }
 
-void WebPlaybackSessionModelContext::setAllowsTouchBarScrubbing(bool allowsTouchBarScrubbing)
-{
-    m_allowsTouchBarScrubbing = allowsTouchBarScrubbing;
-    for (auto* client : m_clients)
-        client->allowsTouchBarScrubbingChanged(allowsTouchBarScrubbing);
-}
-
 #pragma mark - WebPlaybackSessionManagerProxy
 
 RefPtr<WebPlaybackSessionManagerProxy> WebPlaybackSessionManagerProxy::create(WebPageProxy& page)
@@ -439,11 +432,6 @@ void WebPlaybackSessionManagerProxy::setMuted(uint64_t contextId, bool muted)
     ensureModel(contextId).setMuted(muted);
 }
 
-void WebPlaybackSessionManagerProxy::setAllowsTouchBarScrubbing(uint64_t contextId, bool allowsTouchBarScrubbing)
-{
-    ensureModel(contextId).setAllowsTouchBarScrubbing(allowsTouchBarScrubbing);
-}
-
 void WebPlaybackSessionManagerProxy::setDuration(uint64_t contextId, double duration)
 {
     ensureModel(contextId).setDuration(duration);
index 4be5243..af3ca72 100644 (file)
@@ -88,7 +88,6 @@ private:
     void externalPlaybackChanged(bool enabled, WebCore::WebPlaybackSessionModel::ExternalPlaybackTargetType, const String& localizedDeviceName) final;
     void wirelessVideoPlaybackDisabledChanged(bool) final;
     void mutedChanged(bool) final;
-    void allowsTouchBarScrubbingChanged(bool) final;
 
     WebPlaybackSessionInterfaceContext(WebPlaybackSessionManager&, uint64_t contextId);
 
@@ -138,7 +137,6 @@ protected:
     void externalPlaybackChanged(uint64_t contextId, bool enabled, WebCore::WebPlaybackSessionModel::ExternalPlaybackTargetType, String localizedDeviceName);
     void wirelessVideoPlaybackDisabledChanged(uint64_t contextId, bool);
     void mutedChanged(uint64_t contextId, bool);
-    void allowsTouchBarScrubbingChanged(uint64_t contextId, bool);
 
     // Messages from WebPlaybackSessionManagerProxy
     void play(uint64_t contextId);
index a05819e..28c7ee9 100644 (file)
@@ -155,12 +155,6 @@ void WebPlaybackSessionInterfaceContext::mutedChanged(bool muted)
         m_manager->mutedChanged(m_contextId, muted);
 }
 
-void WebPlaybackSessionInterfaceContext::allowsTouchBarScrubbingChanged(bool allowsTouchBarScrubbing)
-{
-    if (m_manager)
-        m_manager->allowsTouchBarScrubbingChanged(m_contextId, allowsTouchBarScrubbing);
-}
-
 #pragma mark - WebPlaybackSessionManager
 
 Ref<WebPlaybackSessionManager> WebPlaybackSessionManager::create(WebPage& page)
@@ -375,11 +369,6 @@ void WebPlaybackSessionManager::mutedChanged(uint64_t contextId, bool muted)
     m_page->send(Messages::WebPlaybackSessionManagerProxy::SetMuted(contextId, muted));
 }
 
-void WebPlaybackSessionManager::allowsTouchBarScrubbingChanged(uint64_t contextId, bool allowsTouchBarScrubbing)
-{
-    m_page->send(Messages::WebPlaybackSessionManagerProxy::SetAllowsTouchBarScrubbing(contextId, allowsTouchBarScrubbing), m_page->pageID());
-}
-
 #pragma mark Messages from WebPlaybackSessionManagerProxy:
 
 void WebPlaybackSessionManager::play(uint64_t contextId)