Take out MediaPlayback UI assertion when any WebProcess is playing audible media
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 May 2019 22:01:12 +0000 (22:01 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 May 2019 22:01:12 +0000 (22:01 +0000)
commit834c594f8c28d01725035730f7acf27b00006f46
treec48dfca3f9a93abc10a8f31bd8152ae0e2e5f35a
parent275db200f490dc5d1007d3e5310933b8ecb0b78b
Take out MediaPlayback UI assertion when any WebProcess is playing audible media
https://bugs.webkit.org/show_bug.cgi?id=197798

Reviewed by Chris Dumez.

To keep the system from suspending the UIProcess (and all the other constellation of processes that
are necessary to play media), take a UIProcess assertion with the MediaPlayback reason whenever there
is a WebContent process that is playing audible media.

* Platform/spi/ios/AssertionServicesSPI.h:
* UIProcess/ProcessAssertion.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::updatePlayingMediaDidChange):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::setWebProcessIsPlayingAudibleMedia):
(WebKit::WebProcessPool::clearWebProcessIsPlayingAudibleMedia):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::webPageMediaStateDidChange):
* UIProcess/WebProcessProxy.h:
* UIProcess/ios/ProcessAssertionIOS.mm:
(WebKit::toBKSProcessAssertionReason):
(WebKit::ProcessAssertion::ProcessAssertion):
* WebProcess/WebProcess.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/AssertionServicesSPI.h
Source/WebKit/UIProcess/ProcessAssertion.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessPool.h
Source/WebKit/UIProcess/WebProcessProxy.cpp
Source/WebKit/UIProcess/WebProcessProxy.h
Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm