Title: [237562] branches/safari-606-branch/Source

Diff

Modified: branches/safari-606-branch/Source/WebCore/ChangeLog (237561 => 237562)


--- branches/safari-606-branch/Source/WebCore/ChangeLog	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebCore/ChangeLog	2018-10-29 20:34:35 UTC (rev 237562)
@@ -1,3 +1,28 @@
+2018-10-29  Kocsen Chung  <[email protected]>
+
+        Apply patch. rdar://problem/45363479
+
+    2018-10-29  Jer Noble  <[email protected]>
+
+            Adopt -setOverrideRouteSharingPolicy:routingContextUID: SPI
+            https://bugs.webkit.org/show_bug.cgi?id=190951
+            <rdar://problem/45213065>
+
+            Reviewed by Alex Christensen.
+
+            Request the correct route policy and context from the VideoFullscreenModel.
+
+            * platform/cocoa/VideoFullscreenModel.h:
+            (WebCore::VideoFullscreenModel::requestRouteSharingPolicyAndContextUID):
+            * platform/cocoa/VideoFullscreenModelVideoElement.h:
+            * platform/cocoa/VideoFullscreenModelVideoElement.mm:
+            (WebCore::VideoFullscreenModelVideoElement::requestRouteSharingPolicyAndContextUID):
+            * platform/ios/VideoFullscreenInterfaceAVKit.h:
+            * platform/ios/VideoFullscreenInterfaceAVKit.mm:
+            (-[WebAVPlayerViewController setWebKitOverrideRouteSharingPolicy:routingContextUID:]):
+            (VideoFullscreenInterfaceAVKit::setVideoFullscreenModel):
+            (VideoFullscreenInterfaceAVKit::doSetup):
+
 2018-10-28  Babak Shafiei  <[email protected]>
 
         Cherry-pick r237466. rdar://problem/45562436

Modified: branches/safari-606-branch/Source/WebCore/PAL/ChangeLog (237561 => 237562)


--- branches/safari-606-branch/Source/WebCore/PAL/ChangeLog	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebCore/PAL/ChangeLog	2018-10-29 20:34:35 UTC (rev 237562)
@@ -1,3 +1,17 @@
+2018-10-29  Kocsen Chung  <[email protected]>
+
+        Apply patch. rdar://problem/45363479
+
+    2018-10-29  Jer Noble  <[email protected]>
+
+            Adopt -setOverrideRouteSharingPolicy:routingContextUID: SPI
+            https://bugs.webkit.org/show_bug.cgi?id=190951
+            <rdar://problem/45213065>
+
+            Reviewed by Alex Christensen.
+
+            * pal/spi/cocoa/AVKitSPI.h:
+
 2018-10-28  Babak Shafiei  <[email protected]>
 
         Cherry-pick r237466. rdar://problem/45562436

Modified: branches/safari-606-branch/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h (237561 => 237562)


--- branches/safari-606-branch/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebCore/PAL/pal/spi/cocoa/AVKitSPI.h	2018-10-29 20:34:35 UTC (rev 237562)
@@ -74,6 +74,7 @@
 @property (nonatomic, readonly, getter=isPictureInPictureActive) BOOL pictureInPictureActive;
 @property (nonatomic, readonly, getter=isPictureInPictureSuspended) BOOL pictureInPictureSuspended;
 @property (nonatomic, readonly) BOOL pictureInPictureWasStartedWhenEnteringBackground;
+- (void)setWebKitOverrideRouteSharingPolicy:(NSUInteger)routeSharingPolicy routingContextUID:(NSString *)routingContextUID;
 @end
 
 @protocol AVPlayerViewControllerDelegate_WebKitOnly <AVPlayerViewControllerDelegate>
@@ -164,6 +165,7 @@
 @property (nonatomic, strong, nullable) AVPlayerController *playerController;
 @property (nonatomic, readonly, getter=isPictureInPictureActive) BOOL pictureInPictureActive;
 @property (nonatomic, readonly) BOOL pictureInPictureWasStartedWhenEnteringBackground;
+- (void)setWebKitOverrideRouteSharingPolicy:(NSUInteger)routeSharingPolicy routingContextUID:(NSString *)routingContextUID;
 @end
 
 NS_ASSUME_NONNULL_END

Modified: branches/safari-606-branch/Source/WebCore/platform/cocoa/VideoFullscreenModel.h (237561 => 237562)


--- branches/safari-606-branch/Source/WebCore/platform/cocoa/VideoFullscreenModel.h	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebCore/platform/cocoa/VideoFullscreenModel.h	2018-10-29 20:34:35 UTC (rev 237562)
@@ -28,9 +28,11 @@
 
 #if PLATFORM(IOS) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
 
+#include "AudioSession.h"
 #include "FloatRect.h"
 #include "HTMLMediaElementEnums.h"
 #include "PlaybackSessionModel.h"
+#include <wtf/CompletionHandler.h>
 
 #if PLATFORM(IOS)
 OBJC_CLASS AVPlayerViewController;
@@ -57,6 +59,8 @@
     virtual FloatSize videoDimensions() const = 0;
     virtual bool hasVideo() const = 0;
 
+    virtual void requestRouteSharingPolicyAndContextUID(CompletionHandler<void(RouteSharingPolicy, String)>&& completionHandler) { completionHandler(RouteSharingPolicy::Default, emptyString()); }
+
 #if PLATFORM(IOS)
     virtual UIViewController *presentingViewController() { return nullptr; }
     virtual UIViewController *createVideoFullscreenViewController(AVPlayerViewController *) { return nullptr; }

Modified: branches/safari-606-branch/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h (237561 => 237562)


--- branches/safari-606-branch/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.h	2018-10-29 20:34:35 UTC (rev 237562)
@@ -72,6 +72,7 @@
     FloatSize videoDimensions() const override { return m_videoDimensions; }
     bool hasVideo() const override { return m_hasVideo; }
 
+    WEBCORE_EXPORT void requestRouteSharingPolicyAndContextUID(CompletionHandler<void(RouteSharingPolicy, String)>&&) override;
 
 protected:
     WEBCORE_EXPORT VideoFullscreenModelVideoElement();

Modified: branches/safari-606-branch/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm (237561 => 237562)


--- branches/safari-606-branch/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebCore/platform/cocoa/VideoFullscreenModelVideoElement.mm	2018-10-29 20:34:35 UTC (rev 237562)
@@ -195,6 +195,12 @@
         m_videoElement->fullscreenModeChanged(videoFullscreenMode);
 }
 
+void VideoFullscreenModelVideoElement::requestRouteSharingPolicyAndContextUID(CompletionHandler<void(RouteSharingPolicy, String)>&& completionHandler)
+{
+    auto& session = AudioSession::sharedSession();
+    completionHandler(session.routeSharingPolicy(), session.routingContextUID());
+}
+
 void VideoFullscreenModelVideoElement::addClient(VideoFullscreenModelClient& client)
 {
     ASSERT(!m_clients.contains(&client));

Modified: branches/safari-606-branch/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.h (237561 => 237562)


--- branches/safari-606-branch/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.h	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.h	2018-10-29 20:34:35 UTC (rev 237562)
@@ -193,6 +193,8 @@
     WTF::Function<void(bool)> m_prepareToInlineCallback;
     RunLoop::Timer<VideoFullscreenInterfaceAVKit> m_watchdogTimer;
     FloatRect m_inlineRect;
+    RouteSharingPolicy m_routeSharingPolicy { RouteSharingPolicy::Default };
+    String m_routingContextUID;
     bool m_allowsPictureInPicturePlayback { false };
     bool m_wirelessVideoPlaybackDisabled { true };
     bool m_shouldReturnToFullscreenWhenStoppingPiP { false };

Modified: branches/safari-606-branch/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm (237561 => 237562)


--- branches/safari-606-branch/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebCore/platform/ios/VideoFullscreenInterfaceAVKit.mm	2018-10-29 20:34:35 UTC (rev 237562)
@@ -543,6 +543,7 @@
 - (void)stopPictureInPicture;
 
 - (BOOL)playerViewControllerShouldHandleDoneButtonTap:(AVPlayerViewController *)playerViewController;
+- (void)setWebKitOverrideRouteSharingPolicy:(NSUInteger)routeSharingPolicy routingContextUID:(NSString *)routingContextUID;
 @end
 NS_ASSUME_NONNULL_END
 
@@ -576,6 +577,16 @@
     return YES;
 }
 
+- (void)setWebKitOverrideRouteSharingPolicy:(NSUInteger)routeSharingPolicy routingContextUID:(NSString *)routingContextUID
+{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunknown-pragmas"
+#pragma clang diagnostic ignored "-Wunguarded-availability-new"
+    if ([_avPlayerViewController respondsToSelector:@selector(setWebKitOverrideRouteSharingPolicy:routingContextUID:)])
+        [_avPlayerViewController setWebKitOverrideRouteSharingPolicy:routeSharingPolicy routingContextUID:routingContextUID];
+#pragma clang diagnostic pop
+}
+
 - (void)enterFullScreenAnimated:(BOOL)animated completionHandler:(void (^)(BOOL success, NSError * __nullable error))completionHandler
 {
 #if PLATFORM(WATCHOS)
@@ -760,9 +771,17 @@
 
     m_videoFullscreenModel = model;
 
-    if (m_videoFullscreenModel)
+    if (m_videoFullscreenModel) {
         m_videoFullscreenModel->addClient(*this);
+        m_videoFullscreenModel->requestRouteSharingPolicyAndContextUID([this, protectedThis = makeRefPtr(this)] (RouteSharingPolicy policy, String contextUID) {
+            m_routeSharingPolicy = policy;
+            m_routingContextUID = contextUID;
 
+            if (m_playerViewController && !m_routingContextUID.isEmpty())
+                [m_playerViewController setWebKitOverrideRouteSharingPolicy:(NSUInteger)m_routeSharingPolicy routingContextUID:m_routingContextUID];
+        });
+    }
+
     hasVideoChanged(m_videoFullscreenModel ? m_videoFullscreenModel->hasVideo() : false);
     videoDimensionsChanged(m_videoFullscreenModel ? m_videoFullscreenModel->videoDimensions() : FloatSize());
 }
@@ -1651,6 +1670,8 @@
     [m_playerViewController setDelegate:m_playerViewControllerDelegate.get()];
     [m_playerViewController setAllowsPictureInPicturePlayback:m_allowsPictureInPicturePlayback];
     [playerController() setPictureInPicturePossible:m_allowsPictureInPicturePlayback];
+    if (!m_routingContextUID.isEmpty())
+        [m_playerViewController setWebKitOverrideRouteSharingPolicy:(NSUInteger)m_routeSharingPolicy routingContextUID:m_routingContextUID];
 
 #if PLATFORM(WATCHOS)
     m_viewController = model()->createVideoFullscreenViewController(m_playerViewController.get().avPlayerViewController);

Modified: branches/safari-606-branch/Source/WebKit/ChangeLog (237561 => 237562)


--- branches/safari-606-branch/Source/WebKit/ChangeLog	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebKit/ChangeLog	2018-10-29 20:34:35 UTC (rev 237562)
@@ -1,3 +1,31 @@
+2018-10-29  Kocsen Chung  <[email protected]>
+
+        Apply patch. rdar://problem/45363479
+
+    2018-10-29  Jer Noble  <[email protected]>
+
+            Adopt -setOverrideRouteSharingPolicy:routingContextUID: SPI
+            https://bugs.webkit.org/show_bug.cgi?id=190951
+            <rdar://problem/45213065>
+
+            Reviewed by Alex Christensen.
+
+            Add an asyncronous reply request to VideoFullscreenManager.
+
+            Drive-by fix: messages.py generates "WTFMove(*arg1, *arg2)" instead of "WTFMove(*arg1), WTFMove(*arg2)"
+            in its reply handler generation.
+
+            * Platform/IPC/MessageSender.h:
+            (IPC::MessageSender::sendWithAsyncReply):
+            * Scripts/webkit/messages.py:
+            * UIProcess/Cocoa/VideoFullscreenManagerProxy.h:
+            * UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:
+            (WebKit::VideoFullscreenModelContext::requestRouteSharingPolicyAndContextUID):
+            * WebProcess/cocoa/VideoFullscreenManager.h:
+            * WebProcess/cocoa/VideoFullscreenManager.messages.in:
+            * WebProcess/cocoa/VideoFullscreenManager.mm:
+            (WebKit::VideoFullscreenManager::requestRouteSharingPolicyAndContextUID):
+
 2018-10-28  Babak Shafiei  <[email protected]>
 
         Cherry-pick r237060. rdar://problem/45435468

Modified: branches/safari-606-branch/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h (237561 => 237562)


--- branches/safari-606-branch/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h	2018-10-29 20:34:35 UTC (rev 237562)
@@ -27,7 +27,9 @@
 
 #if (PLATFORM(IOS) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
 
+#include "GenericCallback.h"
 #include "MessageReceiver.h"
+#include <WebCore/AudioSession.h>
 #include <WebCore/GraphicsLayer.h>
 #include <WebCore/PlatformView.h>
 #include <WebCore/VideoFullscreenChangeObserver.h>
@@ -36,6 +38,7 @@
 #include <wtf/HashSet.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
+#include <wtf/text/WTFString.h>
 
 #if PLATFORM(IOS)
 #include <WebCore/VideoFullscreenInterfaceAVKit.h>
@@ -56,6 +59,8 @@
 class PlaybackSessionModelContext;
 class VideoFullscreenManagerProxy;
 
+typedef GenericCallback<WebCore::RouteSharingPolicy, String> RequestRouteSharingPolicyAndContextUIDCallback;
+
 class VideoFullscreenModelContext final
     : public RefCounted<VideoFullscreenModelContext>
     , public WebCore::VideoFullscreenModel
@@ -89,6 +94,7 @@
     UIViewController *presentingViewController() final;
     UIViewController *createVideoFullscreenViewController(AVPlayerViewController*) final;
 #endif
+    void requestRouteSharingPolicyAndContextUID(CompletionHandler<void(WebCore::RouteSharingPolicy, String)>&&) final;
 
     // VideoFullscreenChangeObserver
     void requestUpdateInlineRect() final;
@@ -123,6 +129,8 @@
     void applicationDidBecomeActive();
     bool isVisible() const;
 
+    void requestRouteSharingPolicyAndContextUID(uint64_t contextId, CompletionHandler<void(WebCore::RouteSharingPolicy, String)>&&);
+
 #if ENABLE(VIDEO_PRESENTATION_MODE)
     bool isPlayingVideoInEnhancedFullscreen() const;
 #endif
@@ -155,6 +163,7 @@
 #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
     void exitFullscreenWithoutAnimationToMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode);
 #endif
+    void requestRouteSharingPolicyAndContextUIDCallback(WebCore::RouteSharingPolicy, String, WebKit::CallbackID);
 
     // Messages to VideoFullscreenManager
     void requestFullscreenMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode, bool finishedWithMedia = false);
@@ -176,6 +185,7 @@
     HashMap<uint64_t, ModelInterfaceTuple> m_contextMap;
     uint64_t m_controlsManagerContextId { 0 };
     HashMap<uint64_t, int> m_clientCounts;
+    CallbackMap m_callbacks;
 };
     
 } // namespace WebKit

Modified: branches/safari-606-branch/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in (237561 => 237562)


--- branches/safari-606-branch/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.messages.in	2018-10-29 20:34:35 UTC (rev 237562)
@@ -35,5 +35,7 @@
 #if PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE)
     ExitFullscreenWithoutAnimationToMode(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode)
 #endif
+
+    RequestRouteSharingPolicyAndContextUIDCallback(enum WebCore::RouteSharingPolicy routeSharingPolicy, String routingContextUID, WebKit::CallbackID callbackID)
 }
 #endif

Modified: branches/safari-606-branch/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm (237561 => 237562)


--- branches/safari-606-branch/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm	2018-10-29 20:34:35 UTC (rev 237562)
@@ -282,6 +282,14 @@
         m_manager->fullscreenMayReturnToInline(m_contextId);
 }
 
+void VideoFullscreenModelContext::requestRouteSharingPolicyAndContextUID(CompletionHandler<void(WebCore::RouteSharingPolicy, String)>&& completionHandler)
+{
+    if (m_manager)
+        m_manager->requestRouteSharingPolicyAndContextUID(m_contextId, WTFMove(completionHandler));
+    else
+        completionHandler(WebCore::RouteSharingPolicy::Default, emptyString());
+}
+
 #pragma mark - VideoFullscreenManagerProxy
 
 RefPtr<VideoFullscreenManagerProxy> VideoFullscreenManagerProxy::create(WebPageProxy& page, PlaybackSessionManagerProxy& playbackSessionManagerProxy)
@@ -364,6 +372,16 @@
         std::get<1>(tuple)->applicationDidBecomeActive();
 }
 
+void VideoFullscreenManagerProxy::requestRouteSharingPolicyAndContextUID(uint64_t contextId, CompletionHandler<void(WebCore::RouteSharingPolicy, String)>&& completion)
+{
+    auto callback = RequestRouteSharingPolicyAndContextUIDCallback::create([completion = WTFMove(completion)] (WebCore::RouteSharingPolicy policy, String contextUID, RequestRouteSharingPolicyAndContextUIDCallback::Error) {
+        completion(policy, contextUID);
+    });
+    auto callbackID = callback->callbackID();
+    m_callbacks.put(WTFMove(callback));
+    m_page->send(Messages::VideoFullscreenManager::RequestRouteSharingPolicyAndContextUID(contextId, callbackID), m_page->pageID());
+}
+
 VideoFullscreenManagerProxy::ModelInterfaceTuple VideoFullscreenManagerProxy::createModelAndInterface(uint64_t contextId)
 {
     auto& playbackSessionModel = m_playbackSessionManagerProxy->ensureModel(contextId);
@@ -503,6 +521,12 @@
 }
 #endif
 
+void VideoFullscreenManagerProxy::requestRouteSharingPolicyAndContextUIDCallback(WebCore::RouteSharingPolicy policy, String contextUID, WebKit::CallbackID callbackID)
+{
+    if (auto callback = m_callbacks.take<RequestRouteSharingPolicyAndContextUIDCallback>(callbackID))
+        callback->performCallbackWithReturnValue(policy, contextUID);
+}
+
 #if PLATFORM(IOS) && ENABLE(FULLSCREEN_API)
 
 void VideoFullscreenManagerProxy::setInlineRect(uint64_t contextId, const WebCore::IntRect& inlineRect, bool visible)

Modified: branches/safari-606-branch/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h (237561 => 237562)


--- branches/safari-606-branch/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.h	2018-10-29 20:34:35 UTC (rev 237562)
@@ -27,7 +27,10 @@
 
 #if (PLATFORM(IOS) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))
 
+#include "Connection.h"
+#include "GenericCallback.h"
 #include "MessageReceiver.h"
+#include "VideoFullscreenManagerMessages.h"
 #include <WebCore/EventListener.h>
 #include <WebCore/HTMLMediaElementEnums.h>
 #include <WebCore/PlatformCALayer.h>
@@ -151,7 +154,8 @@
     void setVideoLayerGravityEnum(uint64_t contextId, unsigned gravity);
     void fullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode);
     void fullscreenMayReturnToInline(uint64_t contextId, bool isPageVisible);
-    
+    void requestRouteSharingPolicyAndContextUID(uint64_t contextId, CallbackID);
+
     WebPage* m_page;
     Ref<PlaybackSessionManager> m_playbackSessionManager;
     HashMap<WebCore::HTMLVideoElement*, uint64_t> m_videoElements;

Modified: branches/safari-606-branch/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.messages.in (237561 => 237562)


--- branches/safari-606-branch/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.messages.in	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.messages.in	2018-10-29 20:34:35 UTC (rev 237562)
@@ -35,5 +35,6 @@
     SetVideoLayerGravityEnum(uint64_t contextId, unsigned gravity)
     FullscreenModeChanged(uint64_t contextId, WebCore::HTMLMediaElementEnums::VideoFullscreenMode videoFullscreenMode)
     FullscreenMayReturnToInline(uint64_t contextId, bool isPageVisible)
+    RequestRouteSharingPolicyAndContextUID(uint64_t contextId, WebKit::CallbackID callbackID)
 }
 #endif

Modified: branches/safari-606-branch/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm (237561 => 237562)


--- branches/safari-606-branch/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm	2018-10-29 20:10:32 UTC (rev 237561)
+++ branches/safari-606-branch/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm	2018-10-29 20:34:35 UTC (rev 237562)
@@ -30,7 +30,6 @@
 #import "Attachment.h"
 #import "Logging.h"
 #import "PlaybackSessionManager.h"
-#import "VideoFullscreenManagerMessages.h"
 #import "VideoFullscreenManagerProxyMessages.h"
 #import "WebCoreArgumentCoders.h"
 #import "WebPage.h"
@@ -559,6 +558,13 @@
         model.videoElement()->scrollIntoViewIfNotVisible(false);
     m_page->send(Messages::VideoFullscreenManagerProxy::PreparedToReturnToInline(contextId, true, inlineVideoFrame(*model.videoElement())), m_page->pageID());
 }
+
+void VideoFullscreenManager::requestRouteSharingPolicyAndContextUID(uint64_t contextId, CallbackID callbackID)
+{
+    ensureModel(contextId).requestRouteSharingPolicyAndContextUID([protectedThis = makeRefPtr(this), callbackID] (WebCore::RouteSharingPolicy policy, String contextUID) {
+        protectedThis->m_page->send(Messages::VideoFullscreenManagerProxy::RequestRouteSharingPolicyAndContextUIDCallback(policy, contextUID, callbackID), protectedThis->m_page->pageID());
+    });
+}
     
 void VideoFullscreenManager::setVideoLayerFrameFenced(uint64_t contextId, WebCore::FloatRect bounds, IPC::Attachment fencePort)
 {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to