Update AudioSession route sharing policy
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Apr 2019 18:04:56 +0000 (18:04 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Apr 2019 18:04:56 +0000 (18:04 +0000)
commit2c7b9740f6653edf58a3e9426999279653fe5622
treedc39e0be54577a73f66ba784be84323780411648
parent6751aa53308ab1e9e35b8fbe1a3c8e72bffb128c
Update AudioSession route sharing policy
https://bugs.webkit.org/show_bug.cgi?id=196776
<rdar://problem/46501611>

Reviewed by Jer Noble.

Source/WebCore:

No new tests, updated an API test.

* platform/audio/AudioSession.cpp:
(WebCore::convertEnumerationToString):
* platform/audio/AudioSession.h:
(WTF::LogArgument<WebCore::RouteSharingPolicy>::toString):
(WTF::LogArgument<WebCore::AudioSession::CategoryType>::toString):
* platform/audio/cocoa/MediaSessionManagerCocoa.mm:
(MediaSessionManagerCocoa::updateSessionState):
* platform/audio/ios/AudioSessionIOS.mm:
(WebCore::AudioSession::setCategory):
(WebCore::AudioSession::routeSharingPolicy const):
* platform/audio/mac/AudioSessionMac.cpp:
(WebCore::AudioSession::setCategory):

Source/WebKit:

* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
(-[WKAirPlayRoutePicker showFromView:routeSharingPolicy:routingContextUID:hasVideo:]):

Source/WTF:

* wtf/Platform.h: Define HAVE_ROUTE_SHARING_POLICY_LONG_FORM_VIDEO.

Tools:

* TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
(TestWebKitAPI::routeSharingPolicyLongFormVideo):
(TestWebKitAPI::routeSharingPolicyLongFormAudio):
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/AudioSession.cpp
Source/WebCore/platform/audio/AudioSession.h
Source/WebCore/platform/audio/cocoa/MediaSessionManagerCocoa.mm
Source/WebCore/platform/audio/ios/AudioSessionIOS.mm
Source/WebCore/platform/audio/mac/AudioSessionMac.cpp
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/forms/WKAirPlayRoutePicker.mm
Source/WebKitLegacy/mac/Plugins/WebPluginController.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm