[GPUP] WebContent process should not pull audio session category from the GPU Process
authorpeng.liu6@apple.com <peng.liu6@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 May 2021 16:31:39 +0000 (16:31 +0000)
committerpeng.liu6@apple.com <peng.liu6@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 May 2021 16:31:39 +0000 (16:31 +0000)
commit15c2f97e17ee7f25be02da91665278d8d5528c51
treee1967ac08d605502674702ffb6c44d1178a11e3a
parent4e5df7ef612d2e1588d574b485d4c44cbdb08b46
[GPUP] WebContent process should not pull audio session category from the GPU Process
https://bugs.webkit.org/show_bug.cgi?id=225826

Reviewed by Darin Adler.

Source/WebCore:

Change AudioSession::Category to be an enum class.

* platform/audio/AudioSession.cpp:
(WebCore::AudioSession::categoryOverride const):
(WebCore::AudioSession::category const):
* platform/audio/AudioSession.h:
* platform/audio/cocoa/MediaSessionManagerCocoa.mm:
(WebCore::MediaSessionManagerCocoa::updateSessionState):
* platform/audio/ios/AudioSessionIOS.mm:
(WebCore::AudioSessionPrivate::AudioSessionPrivate):
(WebCore::AudioSession::setCategory):
(WebCore::AudioSession::category const):
* platform/audio/mac/AudioSessionMac.mm:
(WebCore::AudioSession::setCategory):
* platform/audio/mac/SharedRoutingArbitrator.h:
* platform/audio/mac/SharedRoutingArbitrator.mm:
(WebCore::SharedRoutingArbitrator::beginRoutingArbitrationForToken):
* platform/mediastream/mac/BaseAudioSharedUnit.cpp:
(WebCore::BaseAudioSharedUnit::startUnit):
* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::startProducingData):
* testing/Internals.cpp:
(WebCore::Internals::audioSessionCategory const):

Source/WebKit:

Remove `category` and `routeSharingPolicy` from `RemoteAudioSessionConfiguration`
because we should not pull these properties from the GPU process.

Remove IPC message `RemoteAudioSession::ConfigurationChanged` because it is not used.

* GPUProcess/mac/LocalAudioSessionRoutingArbitrator.h:
* GPUProcess/media/RemoteAudioSessionProxy.cpp:
(WebKit::RemoteAudioSessionProxy::configuration):
* GPUProcess/media/RemoteAudioSessionProxy.h:

* GPUProcess/media/RemoteAudioSessionProxyManager.cpp:
(WebKit::categoryCanMixWithOthers):
(WebKit::RemoteAudioSessionProxyManager::updateCategory):

* UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:

* UIProcess/Media/AudioSessionRoutingArbitratorProxy.h:

* WebProcess/GPU/media/RemoteAudioSession.cpp:
(WebKit::RemoteAudioSession::setCategory):
(WebKit::RemoteAudioSession::category const):
(WebKit::RemoteAudioSession::configurationChanged): Deleted.
* WebProcess/GPU/media/RemoteAudioSession.h:
* WebProcess/GPU/media/RemoteAudioSession.messages.in:

* WebProcess/GPU/media/RemoteAudioSessionConfiguration.h:
(WebKit::RemoteAudioSessionConfiguration::encode const):
(WebKit::RemoteAudioSessionConfiguration::decode):

* WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp:

Source/WebKitLegacy/mac:

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences setAudioSessionCategoryOverride:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/DeprecatedGlobalSettings.cpp
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.mm
Source/WebCore/platform/audio/mac/SharedRoutingArbitrator.h
Source/WebCore/platform/audio/mac/SharedRoutingArbitrator.mm
Source/WebCore/platform/mediastream/mac/BaseAudioSharedUnit.cpp
Source/WebCore/platform/mock/MockRealtimeAudioSource.cpp
Source/WebCore/testing/Internals.cpp
Source/WebKit/ChangeLog
Source/WebKit/GPUProcess/mac/LocalAudioSessionRoutingArbitrator.h
Source/WebKit/GPUProcess/media/RemoteAudioSessionProxy.cpp
Source/WebKit/GPUProcess/media/RemoteAudioSessionProxy.h
Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.cpp
Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp
Source/WebKit/UIProcess/Media/AudioSessionRoutingArbitratorProxy.h
Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp
Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.h
Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.messages.in
Source/WebKit/WebProcess/GPU/media/RemoteAudioSessionConfiguration.h
Source/WebKit/WebProcess/Speech/SpeechRecognitionRealtimeMediaSourceManager.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Plugins/WebPluginController.mm
Source/WebKitLegacy/mac/WebView/WebPreferences.mm