Modify Netflix controlsManager quirk to prevent only scrubbing
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Jun 2017 20:29:24 +0000 (20:29 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Jun 2017 20:29:24 +0000 (20:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=172881
-and corresponding-
rdar://problem/32228660

Reviewed by Andy Estes.

Source/WebCore:

Instead of preventing Netflix from getting a controlsManager at all, this patch
ONLY prevents touch bar scrubbing from working. This means that Netflix will now
get controls in the TouchBar, it means that the play/pause and PiP buttons will be
functional, and it means that the timeline will accurately represent the current
time, BUT users will not be able to use the timeline to scrub the video. This also
allows Netflix to work with other MediaRemote clients such as AirPods.

Remove the quirk code from here, since this is no longer the right place to test
if the MediaElement is hosted at Netflix.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::bestMediaElementForShowingPlaybackControlsManager):
(WebCore::needsPlaybackControlsManagerQuirk): Deleted.

Pass around a new bool allowsTouchBarScrubbing.
* platform/cocoa/WebPlaybackSessionModel.h:
(WebCore::WebPlaybackSessionModelClient::allowsTouchBarScrubbingChanged):
* platform/cocoa/WebPlaybackSessionModelMediaElement.h:

Here’s where we check if we need quirky behavior.
* platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
(WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):
(WebCore::WebPlaybackSessionModelMediaElement::allowsTouchBarScrubbing):

Return the bool we have plumbed through tracking whether the current site
allowsTouchBarScrubbing from the existing delegate method
canBeginTouchBarScrubbing. We will always return NO for video elements on Netflix,
and this will prevent users from be able to scrub with the TouchBar on Netflix.
* platform/mac/WebPlaybackControlsManager.h:
* platform/mac/WebPlaybackControlsManager.mm:
(-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):

More plumbing.
* platform/mac/WebPlaybackSessionInterfaceMac.h:
* platform/mac/WebPlaybackSessionInterfaceMac.mm:
(WebCore::WebPlaybackSessionInterfaceMac::allowsTouchBarScrubbingChanged):
(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):

Source/WebKit2:

Plumbing for allowsTouchBarScrubbing. See WebCore ChangeLog for more details.

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

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

16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
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 8d79d12..7228584 100644 (file)
@@ -1,3 +1,49 @@
+2017-06-05  Beth Dakin  <bdakin@apple.com>
+
+        Modify Netflix controlsManager quirk to prevent only scrubbing
+        https://bugs.webkit.org/show_bug.cgi?id=172881
+        -and corresponding-
+        rdar://problem/32228660
+
+        Reviewed by Andy Estes.
+
+        Instead of preventing Netflix from getting a controlsManager at all, this patch 
+        ONLY prevents touch bar scrubbing from working. This means that Netflix will now 
+        get controls in the TouchBar, it means that the play/pause and PiP buttons will be 
+        functional, and it means that the timeline will accurately represent the current 
+        time, BUT users will not be able to use the timeline to scrub the video. This also 
+        allows Netflix to work with other MediaRemote clients such as AirPods.
+
+        Remove the quirk code from here, since this is no longer the right place to test 
+        if the MediaElement is hosted at Netflix.
+        * html/HTMLMediaElement.cpp:
+        (WebCore::HTMLMediaElement::bestMediaElementForShowingPlaybackControlsManager):
+        (WebCore::needsPlaybackControlsManagerQuirk): Deleted.
+
+        Pass around a new bool allowsTouchBarScrubbing.
+        * platform/cocoa/WebPlaybackSessionModel.h:
+        (WebCore::WebPlaybackSessionModelClient::allowsTouchBarScrubbingChanged):
+        * platform/cocoa/WebPlaybackSessionModelMediaElement.h:
+
+        Here’s where we check if we need quirky behavior.
+        * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
+        (WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):
+        (WebCore::WebPlaybackSessionModelMediaElement::allowsTouchBarScrubbing):
+
+        Return the bool we have plumbed through tracking whether the current site 
+        allowsTouchBarScrubbing from the existing delegate method 
+        canBeginTouchBarScrubbing. We will always return NO for video elements on Netflix, 
+        and this will prevent users from be able to scrub with the TouchBar on Netflix.
+        * platform/mac/WebPlaybackControlsManager.h:
+        * platform/mac/WebPlaybackControlsManager.mm:
+        (-[WebPlaybackControlsManager canBeginTouchBarScrubbing]):
+
+        More plumbing.
+        * platform/mac/WebPlaybackSessionInterfaceMac.h:
+        * platform/mac/WebPlaybackSessionInterfaceMac.mm:
+        (WebCore::WebPlaybackSessionInterfaceMac::allowsTouchBarScrubbingChanged):
+        (WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):
+
 2017-06-05  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GStreamer] Deadlock in MediaPlayerPrivateGStreamer::changePipelineState, web process often locks up on seeking in a youtube video that has already fully buffered
index 0c4560a..ca2b929 100644 (file)
@@ -606,19 +606,6 @@ static bool needsAutoplayPlayPauseEventsQuirk(const Document& document)
     return loader && loader->allowsAutoplayQuirks();
 }
 
-static bool needsPlaybackControlsManagerQuirk(Page& page)
-{
-    if (!page.settings().needsSiteSpecificQuirks())
-        return false;
-
-    auto* document = page.mainFrame().document();
-    if (!document)
-        return false;
-
-    String host = document->url().host();
-    return equalLettersIgnoringASCIICase(host, "netflix.com") || host.endsWithIgnoringASCIICase(".netflix.com");
-}
-
 HTMLMediaElement* HTMLMediaElement::bestMediaElementForShowingPlaybackControlsManager(MediaElementSession::PlaybackControlsPurpose purpose)
 {
     auto allSessions = PlatformMediaSessionManager::sharedManager().currentSessionsMatching([] (const PlatformMediaSession& session) {
@@ -643,15 +630,7 @@ HTMLMediaElement* HTMLMediaElement::bestMediaElementForShowingPlaybackControlsMa
     if (!strongestSessionCandidate.isVisibleInViewportOrFullscreen && !strongestSessionCandidate.isPlayingAudio && atLeastOneNonCandidateMayBeConfusedForMainContent)
         return nullptr;
 
-    HTMLMediaElement* strongestElementCandidate = &strongestSessionCandidate.session->element();
-    if (strongestElementCandidate) {
-        if (Page* page = strongestElementCandidate->document().page()) {
-            if (needsPlaybackControlsManagerQuirk(*page))
-                return nullptr;
-        }
-    }
-
-    return strongestElementCandidate;
+    return &strongestSessionCandidate.session->element();
 }
 
 void HTMLMediaElement::registerWithDocument(Document& document)
index 68fab62..900201a 100644 (file)
@@ -78,6 +78,7 @@ public:
     virtual String externalPlaybackLocalizedDeviceName() const = 0;
     virtual bool wirelessVideoPlaybackDisabled() const = 0;
     virtual bool isMuted() const = 0;
+    virtual bool allowsTouchBarScrubbing() const = 0;
 };
 
 class WebPlaybackSessionModelClient {
@@ -97,6 +98,7 @@ public:
     virtual void externalPlaybackChanged(bool /* enabled */, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String& /* localizedDeviceName */) { }
     virtual void wirelessVideoPlaybackDisabledChanged(bool) { }
     virtual void mutedChanged(bool) { }
+    virtual void allowsTouchBarScrubbingChanged(bool) { }
 };
 
 }
index 18d11d7..8ac54ec 100644 (file)
@@ -89,6 +89,7 @@ public:
     String externalPlaybackLocalizedDeviceName() const final;
     bool wirelessVideoPlaybackDisabled() const final;
     bool isMuted() const final;
+    bool allowsTouchBarScrubbing() const final;
 
 protected:
     WEBCORE_EXPORT WebPlaybackSessionModelMediaElement();
index 2bb2010..19bb54a 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"
@@ -170,6 +172,11 @@ 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)
 {
@@ -506,6 +513,26 @@ 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 7bcff4b..9787139 100644 (file)
@@ -166,6 +166,7 @@ private:
     bool wirelessVideoPlaybackDisabled() const override;
     void togglePictureInPicture() override { }
     void toggleMuted() override;
+    bool allowsTouchBarScrubbing() const override { return false; }
 
     // WebPlaybackSessionModelClient
     void durationChanged(double) override;
index 2f5b596..bd6f440 100644 (file)
@@ -51,6 +51,7 @@ WEBCORE_EXPORT
     RetainPtr<AVTouchBarMediaSelectionOption> _currentLegibleTouchBarMediaSelectionOption;
     float _rate;
     BOOL _canTogglePlayback;
+    BOOL _allowsTouchBarScrubbing;
 
     RefPtr<WebCore::WebPlaybackSessionInterfaceMac> _webPlaybackSessionInterfaceMac;
 }
@@ -68,6 +69,7 @@ WEBCORE_EXPORT
 @property BOOL allowsPictureInPicturePlayback;
 @property (getter=isPictureInPictureActive) BOOL pictureInPictureActive;
 @property BOOL canTogglePictureInPicture;
+@property BOOL allowsTouchBarScrubbing;
 
 - (AVTouchBarMediaSelectionOption *)currentAudioTouchBarMediaSelectionOption;
 - (void)setCurrentAudioTouchBarMediaSelectionOption:(AVTouchBarMediaSelectionOption *)option;
index 9e3d71d..ac10e64 100644 (file)
@@ -56,6 +56,7 @@ SOFT_LINK_CLASS_OPTIONAL(AVKit, AVFunctionBarMediaSelectionOption)
 @synthesize allowsPictureInPicturePlayback;
 @synthesize pictureInPictureActive;
 @synthesize canTogglePictureInPicture;
+@synthesize allowsTouchBarScrubbing=_allowsTouchBarScrubbing;
 
 - (void)dealloc
 {
@@ -116,10 +117,11 @@ SOFT_LINK_CLASS_OPTIONAL(AVKit, AVFunctionBarMediaSelectionOption)
 
 - (BOOL)canBeginTouchBarScrubbing
 {
-    // It's not ideal to return YES all the time here. 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 YES;
+    // 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;
 }
 
 - (void)beginTouchBarScrubbing
index 01dfadd..101f9a2 100644 (file)
@@ -62,6 +62,7 @@ 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 3bec035..cac1c80 100644 (file)
@@ -186,6 +186,15 @@ 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)
@@ -228,6 +237,7 @@ 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 679b618..2d6ec8f 100644 (file)
@@ -1,3 +1,24 @@
+2017-06-05  Beth Dakin  <bdakin@apple.com>
+
+        Modify Netflix controlsManager quirk to prevent only scrubbing
+        https://bugs.webkit.org/show_bug.cgi?id=172881
+        -and corresponding-
+        rdar://problem/32228660
+
+        Reviewed by Andy Estes.
+
+        Plumbing for allowsTouchBarScrubbing. See WebCore ChangeLog for more details.
+
+        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
+        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
+        * UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:
+        (WebKit::WebPlaybackSessionModelContext::setAllowsTouchBarScrubbing):
+        (WebKit::WebPlaybackSessionManagerProxy::setAllowsTouchBarScrubbing):
+        * WebProcess/cocoa/WebPlaybackSessionManager.h:
+        * WebProcess/cocoa/WebPlaybackSessionManager.mm:
+        (WebKit::WebPlaybackSessionInterfaceContext::allowsTouchBarScrubbingChanged):
+        (WebKit::WebPlaybackSessionManager::allowsTouchBarScrubbingChanged):
+
 2017-06-05  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Fix GTK+ build with OpenGL disabled after r217779.
index 9041cec..57ad756 100644 (file)
@@ -84,6 +84,7 @@ public:
     void setExternalPlayback(bool, WebPlaybackSessionModel::ExternalPlaybackTargetType, const String&);
     void setWirelessVideoPlaybackDisabled(bool);
     void setMuted(bool);
+    void setAllowsTouchBarScrubbing(bool);
 
 private:
     friend class WebVideoFullscreenModelContext;
@@ -128,6 +129,7 @@ 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;
@@ -151,6 +153,7 @@ private:
     String m_externalPlaybackLocalizedDeviceName;
     bool m_wirelessVideoPlaybackDisabled { false };
     bool m_muted { false };
+    bool m_allowsTouchBarScrubbing { true };
 };
 
 class WebPlaybackSessionManagerProxy : public RefCounted<WebPlaybackSessionManagerProxy>, private IPC::MessageReceiver {
@@ -197,6 +200,7 @@ 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 9a12987..381a803 100644 (file)
@@ -39,6 +39,7 @@ 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 90240f3..4ec05fd 100644 (file)
@@ -251,6 +251,13 @@ 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)
@@ -432,6 +439,11 @@ 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 af3ca72..4be5243 100644 (file)
@@ -88,6 +88,7 @@ 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);
 
@@ -137,6 +138,7 @@ 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 28c7ee9..a05819e 100644 (file)
@@ -155,6 +155,12 @@ 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)
@@ -369,6 +375,11 @@ 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)