<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[178484] branches/safari-600.5-branch/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/178484">178484</a></dd>
<dt>Author</dt> <dd>dburkart@apple.com</dd>
<dt>Date</dt> <dd>2015-01-14 19:46:13 -0800 (Wed, 14 Jan 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/175400">r175400</a>. <rdar://problem/19424166></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6005branchSourceWebCoreChangeLog">branches/safari-600.5-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmlHTMLMediaElementcpp">branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCorehtmlHTMLMediaElementh">branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCorepageSettingsh">branches/safari-600.5-branch/Source/WebCore/page/Settings.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsMediaPlayercpp">branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.cpp</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsMediaPlayerh">branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.h</a></li>
<li><a href="#branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateMediaSourceAVFObjCmm">branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm</a></li>
<li><a href="#branchessafari6005branchSourceWebKitmacChangeLog">branches/safari-600.5-branch/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#branchessafari6005branchSourceWebKitmacWebViewWebPreferenceKeysPrivateh">branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h</a></li>
<li><a href="#branchessafari6005branchSourceWebKitmacWebViewWebPreferencesmm">branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebPreferences.mm</a></li>
<li><a href="#branchessafari6005branchSourceWebKitmacWebViewWebPreferencesPrivateh">branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h</a></li>
<li><a href="#branchessafari6005branchSourceWebKitmacWebViewWebViewmm">branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#branchessafari6005branchSourceWebKit2ChangeLog">branches/safari-600.5-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari6005branchSourceWebKit2WebProcessWebPageWebPagecpp">branches/safari-600.5-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6005branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/ChangeLog (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/ChangeLog        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebCore/ChangeLog        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -1,5 +1,34 @@
</span><span class="cx"> 2015-01-14 Dana Burkart <dburkart@apple.com>
</span><span class="cx">
</span><ins>+ Merged r175400. <rdar://problem/19424166>
+
+ 2014-10-30 Jer Noble <jer.noble@apple.com>
+
+ [EME] Add Setting for accessing storage location for MediaKeys data
+ https://bugs.webkit.org/show_bug.cgi?id=138147
+
+ Reviewed by Brady Eidson.
+
+ 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.
+
+2015-01-14 Dana Burkart <dburkart@apple.com>
+
</ins><span class="cx"> Merged r175333. <rdar://problem/19424165>
</span><span class="cx">
</span><span class="cx"> 2014-10-29 Jer Noble <jer.noble@apple.com>
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.cpp (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.cpp        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.cpp        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -2238,6 +2238,23 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+String HTMLMediaElement::mediaPlayerMediaKeysStorageDirectory() const
+{
+ Settings* settings = document().settings();
+ if (!settings)
+ return emptyString();
+
+ String storageDirectory = settings->mediaKeysStorageDirectory();
+ if (storageDirectory.isEmpty())
+ return emptyString();
+
+ SecurityOrigin* origin = document().securityOrigin();
+ if (!origin)
+ return emptyString();
+
+ return pathByAppendingComponent(storageDirectory, origin->databaseIdentifier());
+}
+
</ins><span class="cx"> void HTMLMediaElement::setMediaKeys(MediaKeys* mediaKeys)
</span><span class="cx"> {
</span><span class="cx"> if (m_mediaKeys == mediaKeys)
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.h (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.h        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebCore/html/HTMLMediaElement.h        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -544,6 +544,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><span class="cx"> virtual bool mediaPlayerKeyNeeded(MediaPlayer*, Uint8Array*) override;
</span><ins>+ virtual String mediaPlayerMediaKeysStorageDirectory() const override;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(IOS_AIRPLAY)
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCorepageSettingsh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/page/Settings.h (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/page/Settings.h        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebCore/page/Settings.h        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -267,6 +267,11 @@
</span><span class="cx"> static bool shouldManageAudioSessionCategory() { return gManageAudioSession; }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA_V2)
+ void setMediaKeysStorageDirectory(const String& directory) { m_mediaKeysStorageDirectory = directory; }
+ const String& mediaKeysStorageDirectory() const { return m_mediaKeysStorageDirectory; }
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx"> explicit Settings(Page*);
</span><span class="cx">
</span><span class="lines">@@ -346,6 +351,10 @@
</span><span class="cx"> static bool gManageAudioSession;
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA_V2)
+ String m_mediaKeysStorageDirectory;
+#endif
+
</ins><span class="cx"> static double gHiddenPageDOMTimerAlignmentInterval;
</span><span class="cx">
</span><span class="cx"> static bool gLowPowerVideoAudioBufferSizeEnabled;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsMediaPlayercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.cpp (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.cpp        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.cpp        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -1177,6 +1177,11 @@
</span><span class="cx"> return m_mediaPlayerClient->mediaPlayerKeyNeeded(this, initData);
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><ins>+
+String MediaPlayer::mediaKeysStorageDirectory() const
+{
+ return m_mediaPlayerClient->mediaPlayerMediaKeysStorageDirectory();
+}
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> String MediaPlayer::referrer() const
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsMediaPlayerh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.h (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.h        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/MediaPlayer.h        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -222,6 +222,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><span class="cx"> virtual bool mediaPlayerKeyNeeded(MediaPlayer*, Uint8Array*) { return false; }
</span><ins>+ virtual String mediaPlayerMediaKeysStorageDirectory() const { return emptyString(); }
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(IOS_AIRPLAY)
</span><span class="lines">@@ -529,6 +530,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><span class="cx"> bool keyNeeded(Uint8Array* initData);
</span><ins>+ String mediaKeysStorageDirectory() const;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> String referrer() const;
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebCoreplatformgraphicsavfoundationobjcMediaPlayerPrivateMediaSourceAVFObjCmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #if ENABLE(MEDIA_SOURCE) && USE(AVFOUNDATION)
</span><span class="cx">
</span><span class="cx"> #import "CDMSessionMediaSourceAVFObjC.h"
</span><ins>+#import "FileSystem.h"
</ins><span class="cx"> #import "Logging.h"
</span><span class="cx"> #import "MediaSourcePrivateAVFObjC.h"
</span><span class="cx"> #import "MediaSourcePrivateClient.h"
</span><span class="lines">@@ -662,29 +663,24 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(ENCRYPTED_MEDIA_V2)
</span><del>-static const String& sessionStorageDirectory()
-{
- static NeverDestroyed<String> sessionDirectoryPath;
-
- if (sessionDirectoryPath.get().isEmpty()) {
- char cacheDirectoryPath[PATH_MAX];
- if (!confstr(_CS_DARWIN_USER_CACHE_DIR, cacheDirectoryPath, PATH_MAX))
- return WTF::emptyString();
-
- sessionDirectoryPath.get().append(String(cacheDirectoryPath, strlen(cacheDirectoryPath)));
- sessionDirectoryPath.get().append(ASCIILiteral("AVStreamSession/"));
- }
-
- return sessionDirectoryPath.get();
-}
-
</del><span class="cx"> AVStreamSession* MediaPlayerPrivateMediaSourceAVFObjC::streamSession()
</span><span class="cx"> {
</span><span class="cx"> if (!getAVStreamSessionClass() || ![getAVStreamSessionClass() instancesRespondToSelector:@selector(initWithStorageDirectoryAtURL:)])
</span><span class="cx"> return nil;
</span><span class="cx">
</span><del>- if (!m_streamSession)
- m_streamSession = adoptNS([[getAVStreamSessionClass() alloc] initWithStorageDirectoryAtURL:[NSURL fileURLWithPath:sessionStorageDirectory()]]);
</del><ins>+ if (!m_streamSession) {
+ String storageDirectory = m_player->mediaKeysStorageDirectory();
+ if (storageDirectory.isEmpty())
+ return nil;
+
+ if (!fileExists(storageDirectory)) {
+ if (!makeAllDirectories(storageDirectory))
+ return nil;
+ }
+
+ String storagePath = pathByAppendingComponent(storageDirectory, "SecureStop.plist");
+ m_streamSession = adoptNS([[getAVStreamSessionClass() alloc] initWithStorageDirectoryAtURL:[NSURL fileURLWithPath:storagePath]]);
+ }
</ins><span class="cx"> return m_streamSession.get();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebKit/mac/ChangeLog (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebKit/mac/ChangeLog        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebKit/mac/ChangeLog        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2015-01-14 Dana Burkart <dburkart@apple.com>
+
+ Merged r175400. <rdar://problem/19424166>
+
+ 2014-10-30 Jer Noble <jer.noble@apple.com>
+
+ [EME] Add Setting for accessing storage location for MediaKeys data
+ https://bugs.webkit.org/show_bug.cgi?id=138147
+
+ Reviewed by Brady Eidson.
+
+ * 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.
+
</ins><span class="cx"> 2015-01-07 Matthew Hanson <matthew_hanson@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r178056. rdar://problem/19300492
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebKitmacWebViewWebPreferenceKeysPrivateh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -148,6 +148,7 @@
</span><span class="cx"> #define WebKitImageControlsEnabledPreferenceKey @"WebKitImageControlsEnabled"
</span><span class="cx"> #define WebKitGamepadsEnabledPreferenceKey @"WebKitGamepadsEnabled"
</span><span class="cx"> #define WebKitServiceControlsEnabledPreferenceKey @"WebKitServiceControlsEnabled"
</span><ins>+#define WebKitMediaKeysStorageDirectoryKey @"WebKitMediaKeysStorageDirectory"
</ins><span class="cx">
</span><span class="cx"> #if !TARGET_OS_IPHONE
</span><span class="cx"> // These are private both because callers should be using the cover methods and because the
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebKitmacWebViewWebPreferencesmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebPreferences.mm (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebPreferences.mm        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebPreferences.mm        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -591,6 +591,9 @@
</span><span class="cx"> [NSNumber numberWithBool:NO], WebKitServiceControlsEnabledPreferenceKey,
</span><span class="cx"> #endif
</span><span class="cx"> [NSNumber numberWithBool:NO], WebKitEnableInheritURIQueryComponentPreferenceKey,
</span><ins>+#if ENABLE(ENCRYPTED_MEDIA_V2)
+ @"~/Library/WebKit/MediaKeys", WebKitMediaKeysStorageDirectoryKey,
+#endif
</ins><span class="cx"> nil];
</span><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><span class="lines">@@ -2543,6 +2546,16 @@
</span><span class="cx"> [self _setBoolValue:enabled forKey:WebKitShouldConvertPositionStyleOnCopyPreferenceKey];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (NSString *)mediaKeysStorageDirectory
+{
+ return [[self _stringValueForKey:WebKitMediaKeysStorageDirectoryKey] stringByStandardizingPath];
+}
+
+- (void)setMediaKeysStorageDirectory:(NSString *)directory
+{
+ [self _setStringValue:directory forKey:WebKitMediaKeysStorageDirectoryKey];
+}
+
</ins><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> @implementation WebPreferences (WebInternal)
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebKitmacWebViewWebPreferencesPrivateh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -438,6 +438,9 @@
</span><span class="cx"> - (void)setGamepadsEnabled:(BOOL)flag;
</span><span class="cx"> - (BOOL)gamepadsEnabled;
</span><span class="cx">
</span><ins>+- (void)setMediaKeysStorageDirectory:(NSString *)directory;
+- (NSString *)mediaKeysStorageDirectory;
+
</ins><span class="cx"> #if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < 80000
</span><span class="cx"> - (void)_setAllowCompositingLayerVisualDegradation:(BOOL)flag;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebView.mm (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebView.mm        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebKit/mac/WebView/WebView.mm        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -2452,6 +2452,10 @@
</span><span class="cx"> [[self window] setAcceleratedDrawingEnabled:[preferences acceleratedDrawingEnabled]];
</span><span class="cx"> [WAKView _setInterpolationQuality:[preferences _interpolationQuality]];
</span><span class="cx"> #endif
</span><ins>+
+#if ENABLE(ENCRYPTED_MEDIA_V2)
+ settings.setMediaKeysStorageDirectory([preferences mediaKeysStorageDirectory]);
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static inline IMP getMethod(id o, SEL s)
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebKit2/ChangeLog (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebKit2/ChangeLog        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebKit2/ChangeLog        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -1,5 +1,19 @@
</span><span class="cx"> 2015-01-14 Dana Burkart <dburkart@apple.com>
</span><span class="cx">
</span><ins>+ Merged r175400. <rdar://problem/19424166>
+
+ 2014-10-30 Jer Noble <jer.noble@apple.com>
+
+ [EME] Add Setting for accessing storage location for MediaKeys data
+ https://bugs.webkit.org/show_bug.cgi?id=138147
+
+ Reviewed by Brady Eidson.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage): Pass from WebMediaKeyStorageManager into Settings.
+
+2015-01-14 Dana Burkart <dburkart@apple.com>
+
</ins><span class="cx"> Merged r175288. <rdar://problem/19480393>
</span><span class="cx">
</span><span class="cx"> 2014-10-28 Jer Noble <jer.noble@apple.com>
</span></span></pre></div>
<a id="branchessafari6005branchSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.5-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (178483 => 178484)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.5-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-01-15 03:36:52 UTC (rev 178483)
+++ branches/safari-600.5-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-01-15 03:46:13 UTC (rev 178484)
</span><span class="lines">@@ -80,6 +80,7 @@
</span><span class="cx"> #include "WebInspector.h"
</span><span class="cx"> #include "WebInspectorClient.h"
</span><span class="cx"> #include "WebInspectorMessages.h"
</span><ins>+#include "WebMediaKeyStorageManager.h"
</ins><span class="cx"> #include "WebNotificationClient.h"
</span><span class="cx"> #include "WebOpenPanelResultListener.h"
</span><span class="cx"> #include "WebPageCreationParameters.h"
</span><span class="lines">@@ -475,6 +476,12 @@
</span><span class="cx">
</span><span class="cx"> for (auto& mimeType : parameters.mimeTypesWithCustomContentProviders)
</span><span class="cx"> m_mimeTypesWithCustomContentProviders.add(mimeType);
</span><ins>+
+
+#if ENABLE(ENCRYPTED_MEDIA_V2)
+ if (WebMediaKeyStorageManager* manager = WebProcess::shared().supplement<WebMediaKeyStorageManager>())
+ m_page->settings().setMediaKeysStorageDirectory(manager->mediaKeyStorageDirectory());
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPage::reinitializeWebPage(const WebPageCreationParameters& parameters)
</span></span></pre>
</div>
</div>
</body>
</html>