Add a WebKit2 API for setting media volume in a page. Needed for <rdar://problem/10619329>
Created attachment 122974 [details] Patch
Comment on attachment 122974 [details] Patch Like most settings on WKPage, this setting needs to persist even if the Web process crashes and gets relaunched. This means that you need to cache it in a member variable in WebPagePorxy, and add it to WebPageCreationParameters and to WebPageProxy::creationParameters() and the WebPage constructor. Having the value cached in the WebPageProxy would also make it easy to add a getter on WKPage in addition to the setter you’ve added.
(In reply to comment #2) > (From update of attachment 122974 [details]) > Like most settings on WKPage, this setting needs to persist even if the Web process crashes and gets relaunched. This means that you need to cache it in a member variable in WebPagePorxy, and add it to WebPageCreationParameters and to WebPageProxy::creationParameters() and the WebPage constructor. Having the value cached in the WebPageProxy would also make it easy to add a getter on WKPage in addition to the setter you’ve added. Thanks for the review! I'll make the changes you suggested.
Created attachment 123026 [details] Take 2: Make sure WebPageProxy caches the media volume value.
Created attachment 123044 [details] Take 3 Two more fixes: - Need to set the media volume with value from WebPageCreationParameters in WebPage::WebPage(). - Need to set WebPageProxy::m_mediaVolume even if the associated WebPage is no longer valid in the web process, since that updated value should be used when the web process is relaunched.
Committed: http://trac.webkit.org/changeset/105439