[iOS] Provide audio route information when invoking AirPlay picker
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 May 2018 17:51:45 +0000 (17:51 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 May 2018 17:51:45 +0000 (17:51 +0000)
commit7f0cfcf64030da90897a3a9a97de834606d2b397
treeac6d91bb0805550626e210e6b90ef7a810ad34c0
parenta82ff034fa60fc216c6ee767fb2c500c7da25a64
[iOS] Provide audio route information when invoking AirPlay picker
https://bugs.webkit.org/show_bug.cgi?id=185199
<rdar://problem/39853103>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, this requires a specific hardware setup.

* dom/Document.cpp:
(WebCore::Document::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.
* dom/Document.h:

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::showPlaybackTargetPicker): Ditto.

* loader/EmptyClients.h:
* page/ChromeClient.h:

* page/Page.cpp:
(WebCore::Page::showPlaybackTargetPicker): Ditto.
* page/Page.h:

* platform/audio/AudioSession.cpp:
(WebCore::AudioSession::routeSharingPolicy const): Empty implementation for non-iOS ports.
(WebCore::routingContextUID const): Ditto.
* platform/audio/AudioSession.h:

* platform/audio/ios/AudioSessionIOS.mm:
(WebCore::AudioSession::routeSharingPolicy const): Return the route sharing policy.
(WebCore::AudioSession::routingContextUID const): Return the route context UID.

Source/WebCore/PAL:

* pal/spi/mac/AVFoundationSPI.h: Add additional AVAudioSession SPI.

Source/WebKit:

* Scripts/webkit/messages.py:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::showPlaybackTargetPicker):  Pass route sharing policy and routing context UID.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _showPlaybackTargetPicker:fromRect:routeSharingPolicy:routingContextUID:]): Take same.
(-[WKContentView _showPlaybackTargetPicker:fromRect:]): Deleted.

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.

* UIProcess/ios/forms/WKAirPlayRoutePicker.h:
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
(-[WKAirPlayRoutePicker showFromView:routeSharingPolicy:routingContextUID:]): Take same.
(-[WKAirPlayRoutePicker showFromView:]): Deleted.

* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::showPlaybackTargetPicker):

Source/WebKitLegacy/ios:

* WebCoreSupport/WebChromeClientIOS.h:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
31 files changed:
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/mac/AVFoundationSPI.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/html/MediaElementSession.cpp
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/platform/audio/AudioSession.cpp
Source/WebCore/platform/audio/AudioSession.h
Source/WebCore/platform/audio/ios/AudioSessionIOS.mm
Source/WebCore/platform/audio/mac/AudioSessionMac.cpp
Source/WebKit/ChangeLog
Source/WebKit/Scripts/webkit/messages.py
Source/WebKit/UIProcess/PageClient.h
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/WebPageProxy.messages.in
Source/WebKit/UIProcess/ios/PageClientImplIOS.h
Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit/UIProcess/ios/forms/WKAirPlayRoutePicker.h
Source/WebKit/UIProcess/ios/forms/WKAirPlayRoutePicker.mm
Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit/WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm
Source/WebKitLegacy/ios/ChangeLog
Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.h
Source/WebKitLegacy/ios/WebCoreSupport/WebChromeClientIOS.mm