[iOS] Notify fullscreen controller in UIProcess whether external playback is allowed
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jul 2015 18:20:50 +0000 (18:20 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jul 2015 18:20:50 +0000 (18:20 +0000)
commit38ddcbbe18bbbde7057c3b87da8e5cde49169a8f
treea4a679d10f285b42472678a14262665ec616d2ad
parenta3d572341994b036d202b01c78b91e7472ff4d5b
[iOS] Notify fullscreen controller in UIProcess whether external playback is allowed
https://bugs.webkit.org/show_bug.cgi?id=147343

Reviewed by Brady Eidson.

Source/WebCore:

Pass the value of the MediaElementSession's wirelessVideoPlaybackDisabled() property up through WebKit2 to
WebVideoFullscreenControllerAVKit.

* platform/ios/WebVideoFullscreenControllerAVKit.mm:
(WebVideoFullscreenControllerContext::setWirelessVideoPlaybackDisabled): Pass to the interface on the main thread.
* platform/ios/WebVideoFullscreenInterface.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setWirelessVideoPlaybackDisabled): Sets .allowsExternalPlayback to !disabled.
(WebVideoFullscreenInterfaceAVKit::wirelessVideoPlaybackDisabled): Returns the last value set.
* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::setWebVideoFullscreenInterface): Update the value of wirelessVideoPlaybackDisabled
    if the element is present.
(WebVideoFullscreenModelVideoElement::setVideoElement): Ditto if the interface is present.
(WebVideoFullscreenModelVideoElement::updateForEventName): Update the value either way.

Source/WebKit2:

Pass the boolean property wirelessVideoPlaybackDisabled across the UIProcess/WebProcess boundary.

* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setWirelessVideoPlaybackDisabled):
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenInterfaceContext::setWirelessVideoPlaybackDisabled):
(WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
(WebKit::WebVideoFullscreenManager::setWirelessVideoPlaybackDisabled):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm
Source/WebCore/platform/ios/WebVideoFullscreenInterface.h
Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h
Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm
Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h
Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in
Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm
Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.h
Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm