[EME] Add Setting for accessing storage location for MediaKeys data
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Oct 2014 00:18:21 +0000 (00:18 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Oct 2014 00:18:21 +0000 (00:18 +0000)
commit382e1e75f8affd9b1d1afaef6777b5144ca97fa2
treef0279dbeb25cb7bc7909b22858d8177252551dc3
parent017d4779d1a9f9a3d6820e53fbfbbbcd7df8363f
[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
14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/page/Settings.h
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/WebPage.cpp