[EME] Add Setting for accessing storage location for MediaKeys data
https://bugs.webkit.org/show_bug.cgi?id=138147
Reviewed by Brady Eidson.
Source/WebCore:
Allow MediaPlayerPrivateAVFoundationObjC to query for the MediaKeys storage directory
by piping that request down from WebKit and WebKit2 into Settings.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaKeysStorageDirectory): Get the location from Settings and
append the current origin.
* html/HTMLMediaElement.h:
* page/Settings.h:
(WebCore::Settings::setMediaKeysStorageDirectory): Simple setter.
(WebCore::Settings::mediaKeysStorageDirectory): Simple accessor.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::mediaKeysStorageDirectory): Pass through to m_client.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerMediaKeysStorageDirectory): Default implementation.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::streamSession): Fetch the location from MediaPlayer.
(WebCore::sessionStorageDirectory): Deleted.
Source/WebKit/mac:
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Set default location.
(-[WebPreferences mediaKeysStorageDirectory]): Simple accessor.
(-[WebPreferences setMediaKeysStorageDirectory:]): Simple setter.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Pass location from WebPreferences into Settings.
Source/WebKit2:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Pass from WebMediaKeyStorageManager into Settings.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175400
268f45cc-cd09-0410-ab3c-
d52691b4dbfc