<!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>[177692] trunk/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/177692">177692</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2014-12-23 12:29:26 -0800 (Tue, 23 Dec 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Rename WebContext to WebProcessPool
https://bugs.webkit.org/show_bug.cgi?id=139909
Rubber-stamped by Anders Carlsson.
Source/WebCore:
Merge SessionID and SessionIDHash into one file to make auto-generation of
HashMaps with SessionIDs easier.
* WebCore.xcodeproj/project.pbxproj:
* loader/cache/MemoryCache.h:
* page/SessionID.h:
(WTF::SessionIDHash::hash):
(WTF::SessionIDHash::equal):
(WTF::HashTraits<WebCore::SessionID>::emptyValue):
(WTF::HashTraits<WebCore::SessionID>::constructDeletedValue):
(WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
* page/SessionIDHash.h: Removed.
Source/WebKit2:
- Major renames:
WebContext -> WebProcessPool
WebContextConfiguration -> WebProcessPoolConfiguration
API::ContextConfiguration -> API::ProcessPoolConfiguration
* File list elided *</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreloadercacheMemoryCacheh">trunk/Source/WebCore/loader/cache/MemoryCache.h</a></li>
<li><a href="#trunkSourceWebCorepageSessionIDh">trunk/Source/WebCore/page/SessionID.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2DerivedSourcesmake">trunk/Source/WebKit2/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkProcesscpp">trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIAPIObjecth">trunk/Source/WebKit2/Shared/API/APIObject.h</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIAPIURLRequestcpp">trunk/Source/WebKit2/Shared/API/APIURLRequest.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedCocoaAPIObjectmm">trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedSessionTrackerh">trunk/Source/WebKit2/Shared/SessionTracker.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParametersh">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacObjCObjectGraphCodersmm">trunk/Source/WebKit2/Shared/mac/ObjCObjectGraphCoders.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIDownloadClienth">trunk/Source/WebKit2/UIProcess/API/APIDownloadClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPILegacyContextHistoryClienth">trunk/Source/WebKit2/UIProcess/API/APILegacyContextHistoryClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKAPICasth">trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKContextcpp">trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKContextConfigurationRefcpp">trunk/Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPreferencescpp">trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICmacWKContextPrivateMacmm">trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICmacWKPagePrivateMaccpp">trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKBrowsingContextControllermm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKProcessGroupmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolInternalh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolInternal.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewInternalh">trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaDownloadClienth">trunk/Source/WebKit2/UIProcess/Cocoa/DownloadClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaDownloadClientmm">trunk/Source/WebKit2/UIProcess/Cocoa/DownloadClient.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDatabasesDatabaseProcessProxycpp">trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDatabasesDatabaseProcessProxyh">trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDownloadsDownloadProxycpp">trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDownloadsDownloadProxyh">trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDownloadsDownloadProxyMapcpp">trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxyMap.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDownloadsDownloadProxyMaph">trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxyMap.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkCustomProtocolsCustomProtocolManagerProxyh">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkCustomProtocolsmacCustomProtocolManagerProxyMacmm">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkNetworkProcessProxycpp">trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkNetworkProcessProxyh">trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNotificationsWebNotificationManagerProxycpp">trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNotificationsWebNotificationManagerProxyh">trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPluginsPlugInAutoStartProvidercpp">trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPluginsPlugInAutoStartProviderh">trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPluginsPluginProcessManagercpp">trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPluginsPluginProcessProxycpp">trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPluginsWebPluginSiteDataManagercpp">trunk/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPluginsWebPluginSiteDataManagerh">trunk/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessVisitedLinkProvidercpp">trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessVisitedLinkProviderh">trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebApplicationCacheManagerProxycpp">trunk/Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebApplicationCacheManagerProxyh">trunk/Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextClientcpp">trunk/Source/WebKit2/UIProcess/WebContextClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextClienth">trunk/Source/WebKit2/UIProcess/WebContextClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextConnectionClientcpp">trunk/Source/WebKit2/UIProcess/WebContextConnectionClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextConnectionClienth">trunk/Source/WebKit2/UIProcess/WebContextConnectionClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextInjectedBundleClientcpp">trunk/Source/WebKit2/UIProcess/WebContextInjectedBundleClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextInjectedBundleClienth">trunk/Source/WebKit2/UIProcess/WebContextInjectedBundleClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextSupplementh">trunk/Source/WebKit2/UIProcess/WebContextSupplement.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextUserMessageCodersh">trunk/Source/WebKit2/UIProcess/WebContextUserMessageCoders.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebCookieManagerProxycpp">trunk/Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebCookieManagerProxyh">trunk/Source/WebKit2/UIProcess/WebCookieManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebDatabaseManagerProxycpp">trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebDatabaseManagerProxyh">trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebFrameProxycpp">trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebGeolocationManagerProxycpp">trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebGeolocationManagerProxyh">trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebIconDatabasecpp">trunk/Source/WebKit2/UIProcess/WebIconDatabase.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebIconDatabaseh">trunk/Source/WebKit2/UIProcess/WebIconDatabase.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebInspectorProxycpp">trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebInspectorProxyh">trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebKeyValueStorageManagercpp">trunk/Source/WebKit2/UIProcess/WebKeyValueStorageManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebKeyValueStorageManagerh">trunk/Source/WebKit2/UIProcess/WebKeyValueStorageManager.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebMediaCacheManagerProxycpp">trunk/Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebMediaCacheManagerProxyh">trunk/Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebOriginDataManagerProxycpp">trunk/Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebOriginDataManagerProxyh">trunk/Source/WebKit2/UIProcess/WebOriginDataManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPreferencescpp">trunk/Source/WebKit2/UIProcess/WebPreferences.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxycpp">trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxyh">trunk/Source/WebKit2/UIProcess/WebProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebResourceCacheManagerProxycpp">trunk/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebResourceCacheManagerProxyh">trunk/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebsiteDataWebsiteDataStorecpp">trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSmm">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewh">trunk/Source/WebKit2/UIProcess/ios/WKContentView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewmm">trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKGeolocationProviderIOSh">trunk/Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKGeolocationProviderIOSmm">trunk/Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWebProcessProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacServicesControllerh">trunk/Source/WebKit2/UIProcess/mac/ServicesController.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacServicesControllermm">trunk/Source/WebKit2/UIProcess/mac/ServicesController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWKActionMenuControllermm">trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWKFullKeyboardAccessWatchermm">trunk/Source/WebKit2/UIProcess/mac/WKFullKeyboardAccessWatcher.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebContextMenuProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebInspectorProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebPageProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebProcessProxyMacmm">trunk/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWindowServerConnectionmm">trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsPDFPDFPluginmm">trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcessh">trunk/Source/WebKit2/WebProcess/WebProcess.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIProcessPoolConfigurationcpp">trunk/Source/WebKit2/UIProcess/APIProcessPoolConfiguration.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIProcessPoolConfigurationh">trunk/Source/WebKit2/UIProcess/APIProcessPoolConfiguration.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebProcessPoolCocoamm">trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolcpp">trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolh">trunk/Source/WebKit2/UIProcess/WebProcessPool.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolmessagesin">trunk/Source/WebKit2/UIProcess/WebProcessPool.messages.in</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorepageSessionIDHashh">trunk/Source/WebCore/page/SessionIDHash.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIContextConfigurationcpp">trunk/Source/WebKit2/UIProcess/APIContextConfiguration.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIContextConfigurationh">trunk/Source/WebKit2/UIProcess/APIContextConfiguration.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextcpp">trunk/Source/WebKit2/UIProcess/WebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContexth">trunk/Source/WebKit2/UIProcess/WebContext.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextmessagesin">trunk/Source/WebKit2/UIProcess/WebContext.messages.in</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacWebContextMacmm">trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebCore/ChangeLog        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2014-12-23 Sam Weinig <sam@webkit.org>
+
+ Rename WebContext to WebProcessPool
+ https://bugs.webkit.org/show_bug.cgi?id=139909
+
+ Rubber-stamped by Anders Carlsson.
+
+ Merge SessionID and SessionIDHash into one file to make auto-generation of
+ HashMaps with SessionIDs easier.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * loader/cache/MemoryCache.h:
+ * page/SessionID.h:
+ (WTF::SessionIDHash::hash):
+ (WTF::SessionIDHash::equal):
+ (WTF::HashTraits<WebCore::SessionID>::emptyValue):
+ (WTF::HashTraits<WebCore::SessionID>::constructDeletedValue):
+ (WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
+ * page/SessionIDHash.h: Removed.
+
</ins><span class="cx"> 2014-12-23 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> platform/mac/editing/input/devanagari-ligature.html is flaky on Yosemite, ligature fails to form
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -2335,7 +2335,6 @@
</span><span class="cx">                 75793ED40D0CE85B007FC0AC /* DOMMessageEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 75793ED10D0CE85B007FC0AC /* DOMMessageEvent.mm */; };
</span><span class="cx">                 75793ED50D0CE85B007FC0AC /* DOMMessageEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 75793ED20D0CE85B007FC0AC /* DOMMessageEventInternal.h */; };
</span><span class="cx">                 759CB837192DA9190012BC64 /* ControlStates.h in Headers */ = {isa = PBXBuildFile; fileRef = 311C08BC18E35D6800B65615 /* ControlStates.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                75DCC7B818B81C8800A57128 /* SessionIDHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 75DCC7B718B81C8800A57128 /* SessionIDHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><span class="cx">                 760847CE19A6A27800428CCC /* AutocompleteErrorEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 760847CD19A6A27700428CCC /* AutocompleteErrorEvent.h */; };
</span><span class="cx">                 7633A72613D8B33A008501B6 /* LocaleToScriptMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 7633A72413D8B33A008501B6 /* LocaleToScriptMapping.h */; };
</span><span class="cx">                 7633A72713D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7633A72513D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp */; };
</span><span class="lines">@@ -9527,7 +9526,6 @@
</span><span class="cx">                 75793ED00D0CE85B007FC0AC /* DOMMessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMMessageEvent.h; sourceTree = "<group>"; };
</span><span class="cx">                 75793ED10D0CE85B007FC0AC /* DOMMessageEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMMessageEvent.mm; sourceTree = "<group>"; };
</span><span class="cx">                 75793ED20D0CE85B007FC0AC /* DOMMessageEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMMessageEventInternal.h; sourceTree = "<group>"; };
</span><del>-                75DCC7B718B81C8800A57128 /* SessionIDHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionIDHash.h; sourceTree = "<group>"; };
</del><span class="cx">                 760847CD19A6A27700428CCC /* AutocompleteErrorEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AutocompleteErrorEvent.h; sourceTree = "<group>"; };
</span><span class="cx">                 760847CF19A6A28600428CCC /* AutocompleteErrorEvent.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = AutocompleteErrorEvent.idl; sourceTree = "<group>"; };
</span><span class="cx">                 7633A72413D8B33A008501B6 /* LocaleToScriptMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocaleToScriptMapping.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -16763,7 +16761,6 @@
</span><span class="cx">                                 974D2DA2146A535D00D51F8B /* SecurityPolicy.cpp */,
</span><span class="cx">                                 974D2DA3146A535D00D51F8B /* SecurityPolicy.h */,
</span><span class="cx">                                 756B2CE018B7101600FECFAA /* SessionID.h */,
</span><del>-                                75DCC7B718B81C8800A57128 /* SessionIDHash.h */,
</del><span class="cx">                                 14C9A5E90B3D105F005A0232 /* Settings.cpp */,
</span><span class="cx">                                 F587863A02DE3A1401EA4122 /* Settings.h */,
</span><span class="cx">                                 BC59DEF8169DEDC30016AC34 /* Settings.in */,
</span><span class="lines">@@ -26115,7 +26112,6 @@
</span><span class="cx">                                 A75E497610752ACB00C9B896 /* SerializedScriptValue.h in Headers */,
</span><span class="cx">                                 2D93AEE319DF5641002A86C3 /* ServicesOverlayController.h in Headers */,
</span><span class="cx">                                 756B2CE118B7101600FECFAA /* SessionID.h in Headers */,
</span><del>-                                75DCC7B818B81C8800A57128 /* SessionIDHash.h in Headers */,
</del><span class="cx">                                 93309E10099E64920056E581 /* SetNodeAttributeCommand.h in Headers */,
</span><span class="cx">                                 B8DBDB4C130B0F8A00F5CDB1 /* SetSelectionCommand.h in Headers */,
</span><span class="cx">                                 93F1994F08245E59001E9ABC /* Settings.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheMemoryCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/MemoryCache.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/MemoryCache.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebCore/loader/cache/MemoryCache.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">
</span><span class="cx"> #include "NativeImagePtr.h"
</span><span class="cx"> #include "SecurityOriginHash.h"
</span><del>-#include "SessionIDHash.h"
</del><ins>+#include "SessionID.h"
</ins><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span></span></pre></div>
<a id="trunkSourceWebCorepageSessionIDh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/SessionID.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/SessionID.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebCore/page/SessionID.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -26,6 +26,9 @@
</span><span class="cx"> #ifndef SessionID_h
</span><span class="cx"> #define SessionID_h
</span><span class="cx">
</span><ins>+#include <wtf/HashFunctions.h>
+#include <wtf/HashTraits.h>
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class SessionID {
</span><span class="lines">@@ -47,6 +50,28 @@
</span><span class="cx"> uint64_t m_sessionID;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-} // namespace WebCore
</del><ins>+}
</ins><span class="cx">
</span><ins>+namespace WTF {
+
+// The empty value is emptySessionID(), the deleted value is (-1)
+struct SessionIDHash {
+ static unsigned hash(const WebCore::SessionID& p) { return (unsigned)p.sessionID(); }
+ static bool equal(const WebCore::SessionID& a, const WebCore::SessionID& b) { return a == b; }
+ static const bool safeToCompareToEmptyOrDeleted = true;
+};
+template<> struct HashTraits<WebCore::SessionID> : GenericHashTraits<WebCore::SessionID> {
+ static const uint64_t deletedValueIdentifier = 0xffffffffffffffff;
+ static const bool needsDestruction = false;
+ static WebCore::SessionID emptyValue() { return WebCore::SessionID::emptySessionID(); }
+
+ static void constructDeletedValue(WebCore::SessionID& slot) { slot = WebCore::SessionID(deletedValueIdentifier); }
+ static bool isDeletedValue(const WebCore::SessionID& slot) { return slot == WebCore::SessionID(deletedValueIdentifier); }
+};
+template<> struct DefaultHash<WebCore::SessionID> {
+ typedef SessionIDHash Hash;
+};
+
+}
+
</ins><span class="cx"> #endif // SessionID_h
</span></span></pre></div>
<a id="trunkSourceWebCorepageSessionIDHashh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/page/SessionIDHash.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/SessionIDHash.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebCore/page/SessionIDHash.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -1,55 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef SessionIDHash_h
-#define SessionIDHash_h
-
-#include "SessionID.h"
-#include <wtf/HashFunctions.h>
-#include <wtf/HashTraits.h>
-
-namespace WTF {
-
-// The empty value is emptySessionID(), the deleted value is (-1)
-struct SessionIDHash {
- static unsigned hash(const WebCore::SessionID& p) { return (unsigned)p.sessionID(); }
- static bool equal(const WebCore::SessionID& a, const WebCore::SessionID& b) { return a == b; }
- static const bool safeToCompareToEmptyOrDeleted = true;
-};
-template<> struct HashTraits<WebCore::SessionID> : GenericHashTraits<WebCore::SessionID> {
- static const uint64_t deletedValueIdentifier = 0xffffffffffffffff;
- static const bool needsDestruction = false;
- static WebCore::SessionID emptyValue() { return WebCore::SessionID::emptySessionID(); }
-
- static void constructDeletedValue(WebCore::SessionID& slot) { slot = WebCore::SessionID(deletedValueIdentifier); }
- static bool isDeletedValue(const WebCore::SessionID& slot) { return slot == WebCore::SessionID(deletedValueIdentifier); }
-};
-template<> struct DefaultHash<WebCore::SessionID> {
- typedef SessionIDHash Hash;
-};
-
-}
-
-#endif // SessionIDHash_h
</del></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/ChangeLog        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-12-23 Sam Weinig <sam@webkit.org>
+
+ Rename WebContext to WebProcessPool
+ https://bugs.webkit.org/show_bug.cgi?id=139909
+
+ Rubber-stamped by Anders Carlsson.
+
+ - Major renames:
+ WebContext -> WebProcessPool
+ WebContextConfiguration -> WebProcessPoolConfiguration
+ API::ContextConfiguration -> API::ProcessPoolConfiguration
+
+ * File list elided *
+
</ins><span class="cx"> 2014-12-23 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Only call shouldTransformGraph once per graph
</span></span></pre></div>
<a id="trunkSourceWebKit2DerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/DerivedSources.make (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/DerivedSources.make        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/DerivedSources.make        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -107,7 +107,6 @@
</span><span class="cx"> WebApplicationCacheManager \
</span><span class="cx"> WebApplicationCacheManagerProxy \
</span><span class="cx"> WebConnection \
</span><del>- WebContext \
</del><span class="cx"> WebCookieManager \
</span><span class="cx"> WebCookieManagerProxy \
</span><span class="cx"> WebDatabaseManager \
</span><span class="lines">@@ -132,6 +131,7 @@
</span><span class="cx"> WebPageProxy \
</span><span class="cx"> WebProcess \
</span><span class="cx"> WebProcessConnection \
</span><ins>+ WebProcessPool \
</ins><span class="cx"> WebProcessProxy \
</span><span class="cx"> WebResourceCacheManager \
</span><span class="cx"> WebResourceCacheManagerProxy \
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -41,8 +41,8 @@
</span><span class="cx"> #include "RemoteNetworkingContext.h"
</span><span class="cx"> #include "SessionTracker.h"
</span><span class="cx"> #include "StatisticsData.h"
</span><del>-#include "WebContextMessages.h"
</del><span class="cx"> #include "WebCookieManager.h"
</span><ins>+#include "WebProcessPoolMessages.h"
</ins><span class="cx"> #include "WebsiteDataTypes.h"
</span><span class="cx"> #include <WebCore/Logging.h>
</span><span class="cx"> #include <WebCore/MemoryPressureHandler.h>
</span><span class="lines">@@ -297,7 +297,7 @@
</span><span class="cx"> data.statisticsNumbers.set("DownloadsActiveCount", shared().downloadManager().activeDownloadCount());
</span><span class="cx"> data.statisticsNumbers.set("OutstandingAuthenticationChallengesCount", shared().authenticationManager().outstandingAuthenticationChallengeCount());
</span><span class="cx">
</span><del>- parentProcessConnection()->send(Messages::WebContext::DidGetStatistics(data, callbackID), 0);
</del><ins>+ parentProcessConnection()->send(Messages::WebProcessPool::DidGetStatistics(data, callbackID), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void NetworkProcess::terminate()
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIAPIObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/APIObject.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/APIObject.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/Shared/API/APIObject.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -102,8 +102,6 @@
</span><span class="cx"> BatteryStatus,
</span><span class="cx"> CacheManager,
</span><span class="cx"> ColorPickerResultListener,
</span><del>- Context,
- ContextConfiguration,
</del><span class="cx"> CookieManager,
</span><span class="cx"> DatabaseManager,
</span><span class="cx"> Download,
</span><span class="lines">@@ -129,6 +127,8 @@
</span><span class="cx"> OriginDataManager,
</span><span class="cx"> Page,
</span><span class="cx"> PageGroup,
</span><ins>+ ProcessPool,
+ ProcessPoolConfiguration,
</ins><span class="cx"> PluginSiteDataManager,
</span><span class="cx"> Preferences,
</span><span class="cx"> Session,
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIAPIURLRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/APIURLRequest.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/APIURLRequest.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/Shared/API/APIURLRequest.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -26,8 +26,8 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "APIURLRequest.h"
</span><span class="cx">
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> using namespace WebKit;
</span><span class="lines">@@ -44,14 +44,13 @@
</span><span class="cx"> return ResourceRequest::defaultTimeoutInterval();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-// FIXME: This function should really be on WebContext.
</del><ins>+// FIXME: This function should really be on WebProcessPool or WebPageProxy.
</ins><span class="cx"> void URLRequest::setDefaultTimeoutInterval(double timeoutInterval)
</span><span class="cx"> {
</span><span class="cx"> ResourceRequest::setDefaultTimeoutInterval(timeoutInterval);
</span><span class="cx">
</span><del>- const Vector<WebContext*>& contexts = WebContext::allContexts();
- for (size_t i = 0; i < contexts.size(); ++i)
- contexts[i]->setDefaultRequestTimeoutInterval(timeoutInterval);
</del><ins>+ for (auto* processPool : WebProcessPool::allProcessPools())
+ processPool->setDefaultRequestTimeoutInterval(timeoutInterval);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void URLRequest::encode(IPC::ArgumentEncoder& encoder) const
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedCocoaAPIObjectmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx"> wrapper = NSAllocateObject([WKConnection self], size, nullptr);
</span><span class="cx"> break;
</span><span class="cx">
</span><del>- case Type::Context:
</del><ins>+ case Type::ProcessPool:
</ins><span class="cx"> wrapper = [WKProcessPool alloc];
</span><span class="cx"> break;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedSessionTrackerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/SessionTracker.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/SessionTracker.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/Shared/SessionTracker.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> #define SessionTracker_h
</span><span class="cx">
</span><span class="cx"> #include <WebCore/NetworkStorageSession.h>
</span><del>-#include <WebCore/SessionIDHash.h>
</del><ins>+#include <WebCore/SessionID.h>
</ins><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #include "CacheModel.h"
</span><span class="cx"> #include "SandboxExtension.h"
</span><span class="cx"> #include "TextCheckerState.h"
</span><del>-#include <WebCore/SessionIDHash.h>
</del><ins>+#include <WebCore/SessionID.h>
</ins><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> #include <wtf/text/StringHash.h>
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacObjCObjectGraphCodersmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/ObjCObjectGraphCoders.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/ObjCObjectGraphCoders.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/Shared/mac/ObjCObjectGraphCoders.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -261,7 +261,7 @@
</span><span class="cx"> };
</span><span class="cx">
</span><span class="cx">
</span><del>-// WebContext Additions
</del><ins>+// ProcessPool Additions
</ins><span class="cx">
</span><span class="cx"> class WebContextObjCObjectGraphEncoderImpl : public ObjCObjectGraphEncoder<WebContextObjCObjectGraphEncoderImpl> {
</span><span class="cx"> public:
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIDownloadClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIDownloadClient.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIDownloadClient.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/APIDownloadClient.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> class AuthenticationChallengeProxy;
</span><span class="cx"> class DownloadProxy;
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> namespace API {
</span><span class="lines">@@ -45,17 +45,17 @@
</span><span class="cx"> public:
</span><span class="cx"> virtual ~DownloadClient() { }
</span><span class="cx">
</span><del>- virtual void didStart(WebKit::WebContext*, WebKit::DownloadProxy*) { }
- virtual void didReceiveAuthenticationChallenge(WebKit::WebContext*, WebKit::DownloadProxy*, WebKit::AuthenticationChallengeProxy*) { }
- virtual void didReceiveResponse(WebKit::WebContext*, WebKit::DownloadProxy*, const WebCore::ResourceResponse&) { }
- virtual void didReceiveData(WebKit::WebContext*, WebKit::DownloadProxy*, uint64_t) { }
- virtual bool shouldDecodeSourceDataOfMIMEType(WebKit::WebContext*, WebKit::DownloadProxy*, const WTF::String&) { return true; }
- virtual WTF::String decideDestinationWithSuggestedFilename(WebKit::WebContext*, WebKit::DownloadProxy*, const WTF::String&, bool&) { return { }; }
- virtual void didCreateDestination(WebKit::WebContext*, WebKit::DownloadProxy*, const WTF::String&) { }
- virtual void didFinish(WebKit::WebContext*, WebKit::DownloadProxy*) { }
- virtual void didFail(WebKit::WebContext*, WebKit::DownloadProxy*, const WebCore::ResourceError&) { }
- virtual void didCancel(WebKit::WebContext*, WebKit::DownloadProxy*) { }
- virtual void processDidCrash(WebKit::WebContext*, WebKit::DownloadProxy*) { }
</del><ins>+ virtual void didStart(WebKit::WebProcessPool*, WebKit::DownloadProxy*) { }
+ virtual void didReceiveAuthenticationChallenge(WebKit::WebProcessPool*, WebKit::DownloadProxy*, WebKit::AuthenticationChallengeProxy*) { }
+ virtual void didReceiveResponse(WebKit::WebProcessPool*, WebKit::DownloadProxy*, const WebCore::ResourceResponse&) { }
+ virtual void didReceiveData(WebKit::WebProcessPool*, WebKit::DownloadProxy*, uint64_t) { }
+ virtual bool shouldDecodeSourceDataOfMIMEType(WebKit::WebProcessPool*, WebKit::DownloadProxy*, const WTF::String&) { return true; }
+ virtual WTF::String decideDestinationWithSuggestedFilename(WebKit::WebProcessPool*, WebKit::DownloadProxy*, const WTF::String&, bool&) { return { }; }
+ virtual void didCreateDestination(WebKit::WebProcessPool*, WebKit::DownloadProxy*, const WTF::String&) { }
+ virtual void didFinish(WebKit::WebProcessPool*, WebKit::DownloadProxy*) { }
+ virtual void didFail(WebKit::WebProcessPool*, WebKit::DownloadProxy*, const WebCore::ResourceError&) { }
+ virtual void didCancel(WebKit::WebProcessPool*, WebKit::DownloadProxy*) { }
+ virtual void processDidCrash(WebKit::WebProcessPool*, WebKit::DownloadProxy*) { }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace API
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPILegacyContextHistoryClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APILegacyContextHistoryClient.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APILegacyContextHistoryClient.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/APILegacyContextHistoryClient.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -29,9 +29,9 @@
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><del>-class WebContext;
</del><span class="cx"> class WebFrameProxy;
</span><span class="cx"> class WebPageProxy;
</span><ins>+class WebProcessPool;
</ins><span class="cx"> struct WebNavigationDataStore;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -41,11 +41,11 @@
</span><span class="cx"> public:
</span><span class="cx"> virtual ~LegacyContextHistoryClient() { }
</span><span class="cx">
</span><del>- virtual void didNavigateWithNavigationData(WebKit::WebContext&, WebKit::WebPageProxy&, const WebKit::WebNavigationDataStore&, WebKit::WebFrameProxy&) { }
- virtual void didPerformClientRedirect(WebKit::WebContext&, WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
- virtual void didPerformServerRedirect(WebKit::WebContext&, WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
- virtual void didUpdateHistoryTitle(WebKit::WebContext&, WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
- virtual void populateVisitedLinks(WebKit::WebContext&) { }
</del><ins>+ virtual void didNavigateWithNavigationData(WebKit::WebProcessPool&, WebKit::WebPageProxy&, const WebKit::WebNavigationDataStore&, WebKit::WebFrameProxy&) { }
+ virtual void didPerformClientRedirect(WebKit::WebProcessPool&, WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
+ virtual void didPerformServerRedirect(WebKit::WebProcessPool&, WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
+ virtual void didUpdateHistoryTitle(WebKit::WebProcessPool&, WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
+ virtual void populateVisitedLinks(WebKit::WebProcessPool&) { }
</ins><span class="cx"> virtual bool addsVisitedLinks() const { return false; }
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKAPICasth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -51,8 +51,8 @@
</span><span class="cx"> #include <WebCore/Settings.h>
</span><span class="cx">
</span><span class="cx"> namespace API {
</span><del>-class ContextConfiguration;
</del><span class="cx"> class NavigationData;
</span><ins>+class ProcessPoolConfiguration;
</ins><span class="cx"> class SessionState;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -71,7 +71,6 @@
</span><span class="cx"> class WebBatteryStatus;
</span><span class="cx"> class WebResourceCacheManagerProxy;
</span><span class="cx"> class WebColorPickerResultListenerProxy;
</span><del>-class WebContext;
</del><span class="cx"> class WebCookieManagerProxy;
</span><span class="cx"> class WebCredential;
</span><span class="cx"> class WebDatabaseManagerProxy;
</span><span class="lines">@@ -96,6 +95,7 @@
</span><span class="cx"> class WebPageProxy;
</span><span class="cx"> class WebPluginSiteDataManager;
</span><span class="cx"> class WebPreferences;
</span><ins>+class WebProcessPool;
</ins><span class="cx"> class WebProtectionSpace;
</span><span class="cx"> class WebRenderLayer;
</span><span class="cx"> class WebRenderObject;
</span><span class="lines">@@ -113,8 +113,8 @@
</span><span class="cx"> WK_ADD_API_MAPPING(WKBundleHitTestResultMediaType, BundleHitTestResultMediaType)
</span><span class="cx"> WK_ADD_API_MAPPING(WKResourceCacheManagerRef, WebResourceCacheManagerProxy)
</span><span class="cx"> WK_ADD_API_MAPPING(WKColorPickerResultListenerRef, WebColorPickerResultListenerProxy)
</span><del>-WK_ADD_API_MAPPING(WKContextRef, WebContext)
-WK_ADD_API_MAPPING(WKContextConfigurationRef, API::ContextConfiguration)
</del><ins>+WK_ADD_API_MAPPING(WKContextRef, WebProcessPool)
+WK_ADD_API_MAPPING(WKContextConfigurationRef, API::ProcessPoolConfiguration)
</ins><span class="cx"> WK_ADD_API_MAPPING(WKCookieManagerRef, WebCookieManagerProxy)
</span><span class="cx"> WK_ADD_API_MAPPING(WKCredentialRef, WebCredential)
</span><span class="cx"> WK_ADD_API_MAPPING(WKDatabaseManagerRef, WebDatabaseManagerProxy)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -27,10 +27,10 @@
</span><span class="cx"> #include "WKContextPrivate.h"
</span><span class="cx">
</span><span class="cx"> #include "APIClient.h"
</span><del>-#include "APIContextConfiguration.h"
</del><span class="cx"> #include "APIDownloadClient.h"
</span><span class="cx"> #include "APILegacyContextHistoryClient.h"
</span><span class="cx"> #include "APINavigationData.h"
</span><ins>+#include "APIProcessPoolConfiguration.h"
</ins><span class="cx"> #include "APIURLRequest.h"
</span><span class="cx"> #include "AuthenticationChallengeProxy.h"
</span><span class="cx"> #include "DownloadProxy.h"
</span><span class="lines">@@ -38,9 +38,9 @@
</span><span class="cx"> #include "WKContextConfigurationRef.h"
</span><span class="cx"> #include "WKRetainPtr.h"
</span><span class="cx"> #include "WebCertificateInfo.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebIconDatabase.h"
</span><span class="cx"> #include "WebPluginSiteDataManager.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include <wtf/PassRefPtr.h>
</span><span class="cx"> #include <wtf/RefPtr.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx">
</span><span class="cx"> WKTypeID WKContextGetTypeID()
</span><span class="cx"> {
</span><del>- return toAPI(WebContext::APIType);
</del><ins>+ return toAPI(WebProcessPool::APIType);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WKContextRef WKContextCreate()
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx">
</span><span class="cx"> WKContextRef WKContextCreateWithConfiguration(WKContextConfigurationRef configuration)
</span><span class="cx"> {
</span><del>- return toAPI(WebContext::create(toImpl(configuration)->webContextConfiguration()).leakRef());
</del><ins>+ return toAPI(WebProcessPool::create(toImpl(configuration)->webProcessPoolConfiguration()).leakRef());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WKContextSetClient(WKContextRef contextRef, const WKContextClientBase* wkClient)
</span><span class="lines">@@ -116,45 +116,45 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- virtual void didNavigateWithNavigationData(WebContext& context, WebPageProxy& page, const WebNavigationDataStore& navigationDataStore, WebFrameProxy& frame) override
</del><ins>+ virtual void didNavigateWithNavigationData(WebProcessPool& processPool, WebPageProxy& page, const WebNavigationDataStore& navigationDataStore, WebFrameProxy& frame) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didNavigateWithNavigationData)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> RefPtr<API::NavigationData> navigationData = API::NavigationData::create(navigationDataStore);
</span><del>- m_client.didNavigateWithNavigationData(toAPI(&context), toAPI(&page), toAPI(navigationData.get()), toAPI(&frame), m_client.base.clientInfo);
</del><ins>+ m_client.didNavigateWithNavigationData(toAPI(&processPool), toAPI(&page), toAPI(navigationData.get()), toAPI(&frame), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void didPerformClientRedirect(WebContext& context, WebPageProxy& page, const String& sourceURL, const String& destinationURL, WebFrameProxy& frame) override
</del><ins>+ virtual void didPerformClientRedirect(WebProcessPool& processPool, WebPageProxy& page, const String& sourceURL, const String& destinationURL, WebFrameProxy& frame) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didPerformClientRedirect)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didPerformClientRedirect(toAPI(&context), toAPI(&page), toURLRef(sourceURL.impl()), toURLRef(destinationURL.impl()), toAPI(&frame), m_client.base.clientInfo);
</del><ins>+ m_client.didPerformClientRedirect(toAPI(&processPool), toAPI(&page), toURLRef(sourceURL.impl()), toURLRef(destinationURL.impl()), toAPI(&frame), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void didPerformServerRedirect(WebContext& context, WebPageProxy& page, const String& sourceURL, const String& destinationURL, WebFrameProxy& frame) override
</del><ins>+ virtual void didPerformServerRedirect(WebProcessPool& processPool, WebPageProxy& page, const String& sourceURL, const String& destinationURL, WebFrameProxy& frame) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didPerformServerRedirect)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didPerformServerRedirect(toAPI(&context), toAPI(&page), toURLRef(sourceURL.impl()), toURLRef(destinationURL.impl()), toAPI(&frame), m_client.base.clientInfo);
</del><ins>+ m_client.didPerformServerRedirect(toAPI(&processPool), toAPI(&page), toURLRef(sourceURL.impl()), toURLRef(destinationURL.impl()), toAPI(&frame), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void didUpdateHistoryTitle(WebContext& context, WebPageProxy& page, const String& title, const String& url, WebFrameProxy& frame) override
</del><ins>+ virtual void didUpdateHistoryTitle(WebProcessPool& processPool, WebPageProxy& page, const String& title, const String& url, WebFrameProxy& frame) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didUpdateHistoryTitle)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didUpdateHistoryTitle(toAPI(&context), toAPI(&page), toAPI(title.impl()), toURLRef(url.impl()), toAPI(&frame), m_client.base.clientInfo);
</del><ins>+ m_client.didUpdateHistoryTitle(toAPI(&processPool), toAPI(&page), toAPI(title.impl()), toURLRef(url.impl()), toAPI(&frame), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void populateVisitedLinks(WebContext& context) override
</del><ins>+ virtual void populateVisitedLinks(WebProcessPool& processPool) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.populateVisitedLinks)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.populateVisitedLinks(toAPI(&context), m_client.base.clientInfo);
</del><ins>+ m_client.populateVisitedLinks(toAPI(&processPool), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> virtual bool addsVisitedLinks() const override
</span><span class="lines">@@ -163,12 +163,12 @@
</span><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><del>- WebKit::WebContext& context = *toImpl(contextRef);
- context.setHistoryClient(std::make_unique<HistoryClient>(wkClient));
</del><ins>+ WebProcessPool& processPool = *toImpl(contextRef);
+ processPool.setHistoryClient(std::make_unique<HistoryClient>(wkClient));
</ins><span class="cx">
</span><del>- bool addsVisitedLinks = context.historyClient().addsVisitedLinks();
</del><ins>+ bool addsVisitedLinks = processPool.historyClient().addsVisitedLinks();
</ins><span class="cx">
</span><del>- for (auto& process : context.processes()) {
</del><ins>+ for (auto& process : processPool.processes()) {
</ins><span class="cx"> for (auto& page : process->pages())
</span><span class="cx"> page->setAddsVisitedLinks(addsVisitedLinks);
</span><span class="cx"> }
</span><span class="lines">@@ -183,93 +183,93 @@
</span><span class="cx"> initialize(client);
</span><span class="cx"> }
</span><span class="cx"> private:
</span><del>- virtual void didStart(WebContext* webContext, DownloadProxy* downloadProxy) override
</del><ins>+ virtual void didStart(WebProcessPool* processPool, DownloadProxy* downloadProxy) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didStart)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didStart(toAPI(webContext), toAPI(downloadProxy), m_client.base.clientInfo);
</del><ins>+ m_client.didStart(toAPI(processPool), toAPI(downloadProxy), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void didReceiveAuthenticationChallenge(WebContext* webContext, DownloadProxy* downloadProxy, AuthenticationChallengeProxy* authenticationChallengeProxy) override
</del><ins>+ virtual void didReceiveAuthenticationChallenge(WebProcessPool* processPool, DownloadProxy* downloadProxy, AuthenticationChallengeProxy* authenticationChallengeProxy) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didReceiveAuthenticationChallenge)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didReceiveAuthenticationChallenge(toAPI(webContext), toAPI(downloadProxy), toAPI(authenticationChallengeProxy), m_client.base.clientInfo);
</del><ins>+ m_client.didReceiveAuthenticationChallenge(toAPI(processPool), toAPI(downloadProxy), toAPI(authenticationChallengeProxy), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void didReceiveResponse(WebContext* webContext, DownloadProxy* downloadProxy, const ResourceResponse& response) override
</del><ins>+ virtual void didReceiveResponse(WebProcessPool* processPool, DownloadProxy* downloadProxy, const ResourceResponse& response) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didReceiveResponse)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didReceiveResponse(toAPI(webContext), toAPI(downloadProxy), toAPI(API::URLResponse::create(response).get()), m_client.base.clientInfo);
</del><ins>+ m_client.didReceiveResponse(toAPI(processPool), toAPI(downloadProxy), toAPI(API::URLResponse::create(response).get()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void didReceiveData(WebContext* webContext, DownloadProxy* downloadProxy, uint64_t length) override
</del><ins>+ virtual void didReceiveData(WebProcessPool* processPool, DownloadProxy* downloadProxy, uint64_t length) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didReceiveData)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didReceiveData(toAPI(webContext), toAPI(downloadProxy), length, m_client.base.clientInfo);
</del><ins>+ m_client.didReceiveData(toAPI(processPool), toAPI(downloadProxy), length, m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual bool shouldDecodeSourceDataOfMIMEType(WebContext* webContext, DownloadProxy* downloadProxy, const String& mimeType) override
</del><ins>+ virtual bool shouldDecodeSourceDataOfMIMEType(WebProcessPool* processPool, DownloadProxy* downloadProxy, const String& mimeType) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.shouldDecodeSourceDataOfMIMEType)
</span><span class="cx"> return true;
</span><span class="cx">
</span><del>- return m_client.shouldDecodeSourceDataOfMIMEType(toAPI(webContext), toAPI(downloadProxy), toAPI(mimeType.impl()), m_client.base.clientInfo);
</del><ins>+ return m_client.shouldDecodeSourceDataOfMIMEType(toAPI(processPool), toAPI(downloadProxy), toAPI(mimeType.impl()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual String decideDestinationWithSuggestedFilename(WebContext* webContext, DownloadProxy* downloadProxy, const String& filename, bool& allowOverwrite) override
</del><ins>+ virtual String decideDestinationWithSuggestedFilename(WebProcessPool* processPool, DownloadProxy* downloadProxy, const String& filename, bool& allowOverwrite) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.decideDestinationWithSuggestedFilename)
</span><span class="cx"> return String();
</span><span class="cx">
</span><del>- WKRetainPtr<WKStringRef> destination(AdoptWK, m_client.decideDestinationWithSuggestedFilename(toAPI(webContext), toAPI(downloadProxy), toAPI(filename.impl()), &allowOverwrite, m_client.base.clientInfo));
</del><ins>+ WKRetainPtr<WKStringRef> destination(AdoptWK, m_client.decideDestinationWithSuggestedFilename(toAPI(processPool), toAPI(downloadProxy), toAPI(filename.impl()), &allowOverwrite, m_client.base.clientInfo));
</ins><span class="cx"> return toWTFString(destination.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void didCreateDestination(WebContext* webContext, DownloadProxy* downloadProxy, const String& path) override
</del><ins>+ virtual void didCreateDestination(WebProcessPool* processPool, DownloadProxy* downloadProxy, const String& path) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didCreateDestination)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didCreateDestination(toAPI(webContext), toAPI(downloadProxy), toAPI(path.impl()), m_client.base.clientInfo);
</del><ins>+ m_client.didCreateDestination(toAPI(processPool), toAPI(downloadProxy), toAPI(path.impl()), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void didFinish(WebContext* webContext, DownloadProxy* downloadProxy) override
</del><ins>+ virtual void didFinish(WebProcessPool* processPool, DownloadProxy* downloadProxy) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didFinish)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didFinish(toAPI(webContext), toAPI(downloadProxy), m_client.base.clientInfo);
</del><ins>+ m_client.didFinish(toAPI(processPool), toAPI(downloadProxy), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void didFail(WebContext* webContext, DownloadProxy* downloadProxy, const ResourceError& error) override
</del><ins>+ virtual void didFail(WebProcessPool* processPool, DownloadProxy* downloadProxy, const ResourceError& error) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didFail)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didFail(toAPI(webContext), toAPI(downloadProxy), toAPI(error), m_client.base.clientInfo);
</del><ins>+ m_client.didFail(toAPI(processPool), toAPI(downloadProxy), toAPI(error), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void didCancel(WebContext* webContext, DownloadProxy* downloadProxy) override
</del><ins>+ virtual void didCancel(WebProcessPool* processPool, DownloadProxy* downloadProxy) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didCancel)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didCancel(toAPI(webContext), toAPI(downloadProxy), m_client.base.clientInfo);
</del><ins>+ m_client.didCancel(toAPI(processPool), toAPI(downloadProxy), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void processDidCrash(WebContext* webContext, DownloadProxy* downloadProxy) override
</del><ins>+ virtual void processDidCrash(WebProcessPool* processPool, DownloadProxy* downloadProxy) override
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.processDidCrash)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.processDidCrash(toAPI(webContext), toAPI(downloadProxy), m_client.base.clientInfo);
</del><ins>+ m_client.processDidCrash(toAPI(processPool), toAPI(downloadProxy), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> };
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx">
</span><span class="cx"> void WKContextGetGlobalStatistics(WKContextStatistics* statistics)
</span><span class="cx"> {
</span><del>- const WebContext::Statistics& webContextStatistics = WebContext::statistics();
</del><ins>+ const WebProcessPool::Statistics& webContextStatistics = WebProcessPool::statistics();
</ins><span class="cx">
</span><span class="cx"> statistics->wkViewCount = webContextStatistics.wkViewCount;
</span><span class="cx"> statistics->wkPageCount = webContextStatistics.wkPageCount;
</span><span class="lines">@@ -588,7 +588,7 @@
</span><span class="cx">
</span><span class="cx"> void WKContextSetInvalidMessageFunction(WKContextInvalidMessageFunction invalidMessageFunction)
</span><span class="cx"> {
</span><del>- WebContext::setInvalidMessageCallback(invalidMessageFunction);
</del><ins>+ WebProcessPool::setInvalidMessageCallback(invalidMessageFunction);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WKContextSetMemoryCacheDisabled(WKContextRef contextRef, bool disabled)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKContextConfigurationRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContextConfigurationRef.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -26,14 +26,14 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "WKContextConfigurationRef.h"
</span><span class="cx">
</span><del>-#include "APIContextConfiguration.h"
</del><ins>+#include "APIProcessPoolConfiguration.h"
</ins><span class="cx"> #include "WKAPICast.h"
</span><span class="cx">
</span><span class="cx"> using namespace WebKit;
</span><span class="cx">
</span><span class="cx"> WKContextConfigurationRef WKContextConfigurationCreate()
</span><span class="cx"> {
</span><del>- return toAPI(API::ContextConfiguration::create().leakRef());
</del><ins>+ return toAPI(API::ProcessPoolConfiguration::create().leakRef());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WKStringRef WKContextConfigurationCopyIndexedDBDatabaseDirectory(WKContextConfigurationRef configuration)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -46,7 +46,6 @@
</span><span class="cx"> #include "WKPagePolicyClientInternal.h"
</span><span class="cx"> #include "WKPluginInformation.h"
</span><span class="cx"> #include "WebBackForwardList.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebFormClient.h"
</span><span class="cx"> #include "WebInspectorProxy.h"
</span><span class="cx"> #include "WebOpenPanelParameters.h"
</span><span class="lines">@@ -54,6 +53,7 @@
</span><span class="cx"> #include "WebPageGroup.h"
</span><span class="cx"> #include "WebPageMessages.h"
</span><span class="cx"> #include "WebPageProxy.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include "WebProcessProxy.h"
</span><span class="cx"> #include "WebProtectionSpace.h"
</span><span class="cx"> #include <WebCore/Page.h>
</span><span class="lines">@@ -92,7 +92,7 @@
</span><span class="cx">
</span><span class="cx"> WKContextRef WKPageGetContext(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>- return toAPI(&toImpl(pageRef)->process().context());
</del><ins>+ return toAPI(&toImpl(pageRef)->process().processPool());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WKPageGroupRef WKPageGetPageGroup(WKPageRef pageRef)
</span><span class="lines">@@ -1019,7 +1019,7 @@
</span><span class="cx">
</span><span class="cx"> virtual PassRefPtr<API::Data> webCryptoMasterKey(WebPageProxy& page) override
</span><span class="cx"> {
</span><del>- return page.process().context().client().copyWebCryptoMasterKey(&page.process().context());
</del><ins>+ return page.process().processPool().client().copyWebCryptoMasterKey(&page.process().processPool());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPreferencescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> #include "WKPreferencesRef.h"
</span><span class="cx"> #include "WKPreferencesRefPrivate.h"
</span><span class="cx"> #include "WKAPICast.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebPreferences.h"
</span><span class="cx"> #include <WebCore/Settings.h>
</span><span class="cx"> #include <wtf/PassRefPtr.h>
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICmacWKContextPrivateMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> #import "WKPluginInformation.h"
</span><span class="cx"> #import "WKSharedAPICast.h"
</span><span class="cx"> #import "WKStringCF.h"
</span><del>-#import "WebContext.h"
</del><ins>+#import "WebProcessPool.h"
</ins><span class="cx"> #import <WebKitSystemInterface.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="lines">@@ -97,12 +97,12 @@
</span><span class="cx">
</span><span class="cx"> void WKContextRegisterSchemeForCustomProtocol(WKContextRef context, WKStringRef scheme)
</span><span class="cx"> {
</span><del>- WebContext::registerGlobalURLSchemeAsHavingCustomProtocolHandlers(toWTFString(scheme));
</del><ins>+ WebProcessPool::registerGlobalURLSchemeAsHavingCustomProtocolHandlers(toWTFString(scheme));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WKContextUnregisterSchemeForCustomProtocol(WKContextRef context, WKStringRef scheme)
</span><span class="cx"> {
</span><del>- WebContext::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(toWTFString(scheme));
</del><ins>+ WebProcessPool::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(toWTFString(scheme));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* DEPRECATED - Please use constants from WKPluginInformation instead. */
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICmacWKPagePrivateMaccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/C/mac/WKPagePrivateMac.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -27,10 +27,10 @@
</span><span class="cx"> #include "WKPagePrivateMac.h"
</span><span class="cx">
</span><span class="cx"> #include "WKAPICast.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebPageGroup.h"
</span><span class="cx"> #include "WebPageProxy.h"
</span><span class="cx"> #include "WebPreferences.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> using namespace WebKit;
</span><span class="cx">
</span><span class="lines">@@ -44,5 +44,5 @@
</span><span class="cx"> WebPageProxy* webPageProxy = toImpl(page);
</span><span class="cx"> bool privateBrowsingEnabled = webPageProxy->pageGroup().preferences().privateBrowsingEnabled();
</span><span class="cx">
</span><del>- return webPageProxy->process().context().isURLKnownHSTSHost(toImpl(url)->string(), privateBrowsingEnabled);
</del><ins>+ return webPageProxy->process().processPool().isURLKnownHSTSHost(toImpl(url)->string(), privateBrowsingEnabled);
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKBrowsingContextControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -53,8 +53,8 @@
</span><span class="cx"> #import "WKURLResponseNS.h"
</span><span class="cx"> #import "WeakObjCPtr.h"
</span><span class="cx"> #import "WebCertificateInfo.h"
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebPageProxy.h"
</span><ins>+#import "WebProcessPool.h"
</ins><span class="cx"> #import "WebProtectionSpace.h"
</span><span class="cx"> #import "_WKRemoteObjectRegistryInternal.h"
</span><span class="cx"> #import <wtf/NeverDestroyed.h>
</span><span class="lines">@@ -173,12 +173,12 @@
</span><span class="cx">
</span><span class="cx"> + (void)registerSchemeForCustomProtocol:(NSString *)scheme
</span><span class="cx"> {
</span><del>- WebContext::registerGlobalURLSchemeAsHavingCustomProtocolHandlers(scheme);
</del><ins>+ WebProcessPool::registerGlobalURLSchemeAsHavingCustomProtocolHandlers(scheme);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> + (void)unregisterSchemeForCustomProtocol:(NSString *)scheme
</span><span class="cx"> {
</span><del>- WebContext::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(scheme);
</del><ins>+ WebProcessPool::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(scheme);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)loadRequest:(NSURLRequest *)request
</span><span class="lines">@@ -855,7 +855,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!_remoteObjectRegistry) {
</span><span class="cx"> _remoteObjectRegistry = adoptNS([[_WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page]);
</span><del>- _page->process().context().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID(), [_remoteObjectRegistry remoteObjectRegistry]);
</del><ins>+ _page->process().processPool().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID(), [_remoteObjectRegistry remoteObjectRegistry]);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return _remoteObjectRegistry.get();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKProcessGroupmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessGroup.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -41,8 +41,8 @@
</span><span class="cx"> #import "WKStringCF.h"
</span><span class="cx"> #import "WeakObjCPtr.h"
</span><span class="cx"> #import "WebCertificateInfo.h"
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebFrameProxy.h"
</span><ins>+#import "WebProcessPool.h"
</ins><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> using namespace WebKit;
</span><span class="cx">
</span><span class="cx"> @implementation WKProcessGroup {
</span><del>- RefPtr<WebContext> _context;
</del><ins>+ RefPtr<WebProcessPool> _processPool;
</ins><span class="cx">
</span><span class="cx"> WeakObjCPtr<id <WKProcessGroupDelegate>> _delegate;
</span><span class="cx">
</span><span class="lines">@@ -189,19 +189,19 @@
</span><span class="cx"> InitWebCoreThreadSystemInterface();
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- WebContextConfiguration webContextConfiguration;
- webContextConfiguration.injectedBundlePath = bundleURL ? String(bundleURL.path) : String();
</del><ins>+ WebProcessPoolConfiguration configuration;
+ configuration.injectedBundlePath = bundleURL ? String(bundleURL.path) : String();
</ins><span class="cx">
</span><del>- WebContext::applyPlatformSpecificConfigurationDefaults(webContextConfiguration);
</del><ins>+ WebProcessPool::applyPlatformSpecificConfigurationDefaults(configuration);
</ins><span class="cx">
</span><del>- _context = WebContext::create(WTF::move(webContextConfiguration));
</del><ins>+ _processPool = WebProcessPool::create(WTF::move(configuration));
</ins><span class="cx">
</span><del>- setUpConnectionClient(self, toAPI(_context.get()));
- setUpInectedBundleClient(self, toAPI(_context.get()));
- setUpHistoryClient(self, toAPI(_context.get()));
</del><ins>+ setUpConnectionClient(self, toAPI(_processPool.get()));
+ setUpInectedBundleClient(self, toAPI(_processPool.get()));
+ setUpHistoryClient(self, toAPI(_processPool.get()));
</ins><span class="cx"> #if PLATFORM(IOS)
</span><del>- _context->setUsesNetworkProcess(true);
- _context->setProcessModel(ProcessModelMultipleSecondaryProcesses);
</del><ins>+ _processPool->setUsesNetworkProcess(true);
+ _processPool->setProcessModel(ProcessModelMultipleSecondaryProcesses);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> return self;
</span><span class="lines">@@ -223,12 +223,12 @@
</span><span class="cx">
</span><span class="cx"> - (WKContextRef)_contextRef
</span><span class="cx"> {
</span><del>- return toAPI(_context.get());
</del><ins>+ return toAPI(_processPool.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_setAllowsSpecificHTTPSCertificate:(NSArray *)certificateChain forHost:(NSString *)host
</span><span class="cx"> {
</span><del>- _context->allowSpecificHTTPSCertificateForHost(WebCertificateInfo::create(WebCore::CertificateInfo((CFArrayRef)certificateChain)).get(), host);
</del><ins>+ _processPool->allowSpecificHTTPSCertificateForHost(WebCertificateInfo::create(WebCore::CertificateInfo((CFArrayRef)certificateChain)).get(), host);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -35,9 +35,9 @@
</span><span class="cx"> #import "WKObject.h"
</span><span class="cx"> #import "WeakObjCPtr.h"
</span><span class="cx"> #import "WebCertificateInfo.h"
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebCookieManagerProxy.h"
</span><span class="cx"> #import "WebProcessMessages.h"
</span><ins>+#import "WebProcessPool.h"
</ins><span class="cx"> #import "_WKDownloadDelegate.h"
</span><span class="cx"> #import "_WKProcessPoolConfiguration.h"
</span><span class="cx"> #import <WebCore/CFNetworkSPI.h>
</span><span class="lines">@@ -64,7 +64,7 @@
</span><span class="cx">
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><del>- _context->~WebContext();
</del><ins>+ _processPool->~WebProcessPool();
</ins><span class="cx">
</span><span class="cx"> [super dealloc];
</span><span class="cx"> }
</span><span class="lines">@@ -81,14 +81,14 @@
</span><span class="cx">
</span><span class="cx"> - (API::Object&)_apiObject
</span><span class="cx"> {
</span><del>- return *_context;
</del><ins>+ return *_processPool;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> - (WKGeolocationProviderIOS *)_geolocationProvider
</span><span class="cx"> {
</span><span class="cx"> if (!_geolocationProvider)
</span><del>- _geolocationProvider = adoptNS([[WKGeolocationProviderIOS alloc] initWithContext:_context.get()]);
</del><ins>+ _geolocationProvider = adoptNS([[WKGeolocationProviderIOS alloc] initWithProcessPool:*_processPool]);
</ins><span class="cx"> return _geolocationProvider.get();
</span><span class="cx"> }
</span><span class="cx"> #endif // PLATFORM(IOS)
</span><span class="lines">@@ -154,44 +154,44 @@
</span><span class="cx"> InitWebCoreThreadSystemInterface();
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- WebKit::WebContextConfiguration webContextConfiguration;
</del><ins>+ WebKit::WebProcessPoolConfiguration processPoolConfiguration;
</ins><span class="cx">
</span><span class="cx"> if (NSURL *bundleURL = [_configuration injectedBundleURL]) {
</span><span class="cx"> if (!bundleURL.isFileURL)
</span><span class="cx"> [NSException raise:NSInvalidArgumentException format:@"Injected Bundle URL must be a file URL"];
</span><span class="cx">
</span><del>- webContextConfiguration.injectedBundlePath = bundleURL.path;
</del><ins>+ processPoolConfiguration.injectedBundlePath = bundleURL.path;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- webContextConfiguration.localStorageDirectory = websiteDataDirectoryURL(@"LocalStorage").absoluteURL.path.fileSystemRepresentation;
- webContextConfiguration.webSQLDatabaseDirectory = websiteDataDirectoryURL(@"WebSQL").absoluteURL.path.fileSystemRepresentation;
- webContextConfiguration.indexedDBDatabaseDirectory = websiteDataDirectoryURL(@"IndexedDB").absoluteURL.path.fileSystemRepresentation;
- webContextConfiguration.mediaKeysStorageDirectory = websiteDataDirectoryURL(@"MediaKeys").absoluteURL.path.fileSystemRepresentation;
</del><ins>+ processPoolConfiguration.localStorageDirectory = websiteDataDirectoryURL(@"LocalStorage").absoluteURL.path.fileSystemRepresentation;
+ processPoolConfiguration.webSQLDatabaseDirectory = websiteDataDirectoryURL(@"WebSQL").absoluteURL.path.fileSystemRepresentation;
+ processPoolConfiguration.indexedDBDatabaseDirectory = websiteDataDirectoryURL(@"IndexedDB").absoluteURL.path.fileSystemRepresentation;
+ processPoolConfiguration.mediaKeysStorageDirectory = websiteDataDirectoryURL(@"MediaKeys").absoluteURL.path.fileSystemRepresentation;
</ins><span class="cx">
</span><del>- API::Object::constructInWrapper<WebKit::WebContext>(self, WTF::move(webContextConfiguration));
- _context->setUsesNetworkProcess(true);
- _context->setProcessModel(WebKit::ProcessModelMultipleSecondaryProcesses);
- _context->setMaximumNumberOfProcesses([_configuration maximumProcessCount]);
</del><ins>+ API::Object::constructInWrapper<WebKit::WebProcessPool>(self, WTF::move(processPoolConfiguration));
+ _processPool->setUsesNetworkProcess(true);
+ _processPool->setProcessModel(WebKit::ProcessModelMultipleSecondaryProcesses);
+ _processPool->setMaximumNumberOfProcesses([_configuration maximumProcessCount]);
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(CACHE_PARTITIONING)
</span><span class="cx"> for (NSString *urlScheme in [_configuration cachePartitionedURLSchemes])
</span><del>- _context->registerURLSchemeAsCachePartitioned(urlScheme);
</del><ins>+ _processPool->registerURLSchemeAsCachePartitioned(urlScheme);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> // FIXME: Add a way to configure the cache model, see <rdar://problem/16206857>.
</span><del>- _context->setCacheModel(WebKit::CacheModelPrimaryWebBrowser);
</del><ins>+ _processPool->setCacheModel(WebKit::CacheModelPrimaryWebBrowser);
</ins><span class="cx">
</span><span class="cx"> return self;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_setAllowsSpecificHTTPSCertificate:(NSArray *)certificateChain forHost:(NSString *)host
</span><span class="cx"> {
</span><del>- _context->allowSpecificHTTPSCertificateForHost(WebKit::WebCertificateInfo::create(WebCore::CertificateInfo((CFArrayRef)certificateChain)).get(), host);
</del><ins>+ _processPool->allowSpecificHTTPSCertificateForHost(WebKit::WebCertificateInfo::create(WebCore::CertificateInfo((CFArrayRef)certificateChain)).get(), host);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_setCanHandleHTTPSServerTrustEvaluation:(BOOL)value
</span><span class="cx"> {
</span><del>- _context->setCanHandleHTTPSServerTrustEvaluation(value);
</del><ins>+ _processPool->setCanHandleHTTPSServerTrustEvaluation(value);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static WebKit::HTTPCookieAcceptPolicy toHTTPCookieAcceptPolicy(NSHTTPCookieAcceptPolicy policy)
</span><span class="lines">@@ -213,12 +213,12 @@
</span><span class="cx">
</span><span class="cx"> - (void)_setCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)policy
</span><span class="cx"> {
</span><del>- _context->supplement<WebKit::WebCookieManagerProxy>()->setHTTPCookieAcceptPolicy(toHTTPCookieAcceptPolicy(policy));
</del><ins>+ _processPool->supplement<WebKit::WebCookieManagerProxy>()->setHTTPCookieAcceptPolicy(toHTTPCookieAcceptPolicy(policy));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (id)_objectForBundleParameter:(NSString *)parameter
</span><span class="cx"> {
</span><del>- return [_context->bundleParameters() objectForKey:parameter];
</del><ins>+ return [_processPool->bundleParameters() objectForKey:parameter];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_setObject:(id <NSCopying, NSSecureCoding>)object forBundleParameter:(NSString *)parameter
</span><span class="lines">@@ -237,11 +237,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (copy)
</span><del>- [_context->ensureBundleParameters() setObject:copy.get() forKey:parameter];
</del><ins>+ [_processPool->ensureBundleParameters() setObject:copy.get() forKey:parameter];
</ins><span class="cx"> else
</span><del>- [_context->ensureBundleParameters() removeObjectForKey:parameter];
</del><ins>+ [_processPool->ensureBundleParameters() removeObjectForKey:parameter];
</ins><span class="cx">
</span><del>- _context->sendToAllProcesses(Messages::WebProcess::SetInjectedBundleParameter(parameter, IPC::DataReference(static_cast<const uint8_t*>([data bytes]), [data length])));
</del><ins>+ _processPool->sendToAllProcesses(Messages::WebProcess::SetInjectedBundleParameter(parameter, IPC::DataReference(static_cast<const uint8_t*>([data bytes]), [data length])));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (id <_WKDownloadDelegate>)_downloadDelegate
</span><span class="lines">@@ -252,7 +252,7 @@
</span><span class="cx"> - (void)_setDownloadDelegate:(id <_WKDownloadDelegate>)downloadDelegate
</span><span class="cx"> {
</span><span class="cx"> _downloadDelegate = downloadDelegate;
</span><del>- _context->setDownloadClient(std::make_unique<WebKit::DownloadClient>(downloadDelegate));
</del><ins>+ _processPool->setDownloadClient(std::make_unique<WebKit::DownloadClient>(downloadDelegate));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKProcessPoolInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolInternal.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolInternal.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolInternal.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">
</span><span class="cx"> #import "WKObject.h"
</span><del>-#import "WebContext.h"
</del><ins>+#import "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> #if TARGET_OS_IPHONE
</span><span class="cx"> @class WKGeolocationProviderIOS;
</span><span class="lines">@@ -36,10 +36,10 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-inline WKProcessPool *wrapper(WebContext& context)
</del><ins>+inline WKProcessPool *wrapper(WebProcessPool& processPool)
</ins><span class="cx"> {
</span><del>- ASSERT([context.wrapper() isKindOfClass:[WKProcessPool class]]);
- return (WKProcessPool *)context.wrapper();
</del><ins>+ ASSERT([processPool.wrapper() isKindOfClass:[WKProcessPool class]]);
+ return (WKProcessPool *)processPool.wrapper();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> @package
</span><span class="cx"> RetainPtr<_WKProcessPoolConfiguration> _configuration;
</span><span class="cx">
</span><del>- API::ObjectStorage<WebKit::WebContext> _context;
</del><ins>+ API::ObjectStorage<WebKit::WebProcessPool> _processPool;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if TARGET_OS_IPHONE
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -59,12 +59,12 @@
</span><span class="cx"> #import "WKWebViewContentProvider.h"
</span><span class="cx"> #import "WebBackForwardList.h"
</span><span class="cx"> #import "WebCertificateInfo.h"
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebFormSubmissionListenerProxy.h"
</span><span class="cx"> #import "WebKitSystemInterface.h"
</span><span class="cx"> #import "WebPageGroup.h"
</span><span class="cx"> #import "WebPageProxy.h"
</span><span class="cx"> #import "WebPreferencesKeys.h"
</span><ins>+#import "WebProcessPool.h"
</ins><span class="cx"> #import "WebProcessProxy.h"
</span><span class="cx"> #import "_WKFindDelegate.h"
</span><span class="cx"> #import "_WKFormDelegate.h"
</span><span class="lines">@@ -278,7 +278,7 @@
</span><span class="cx">
</span><span class="cx"> CGRect bounds = self.bounds;
</span><span class="cx">
</span><del>- WebKit::WebContext& context = *[_configuration processPool]->_context;
</del><ins>+ WebKit::WebProcessPool& processPool = *[_configuration processPool]->_processPool;
</ins><span class="cx">
</span><span class="cx"> WebKit::WebPageConfiguration webPageConfiguration;
</span><span class="cx"> webPageConfiguration.preferences = [_configuration preferences]->_preferences.get();
</span><span class="lines">@@ -314,7 +314,7 @@
</span><span class="cx">
</span><span class="cx"> [self addSubview:_scrollView.get()];
</span><span class="cx">
</span><del>- _contentView = adoptNS([[WKContentView alloc] initWithFrame:bounds context:context configuration:WTF::move(webPageConfiguration) webView:self]);
</del><ins>+ _contentView = adoptNS([[WKContentView alloc] initWithFrame:bounds processPool:processPool configuration:WTF::move(webPageConfiguration) webView:self]);
</ins><span class="cx">
</span><span class="cx"> _page = [_contentView page];
</span><span class="cx"> _page->setDeviceOrientation(deviceOrientation());
</span><span class="lines">@@ -342,7 +342,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>- _wkView = adoptNS([[WKView alloc] initWithFrame:bounds context:context configuration:WTF::move(webPageConfiguration) webView:self]);
</del><ins>+ _wkView = adoptNS([[WKView alloc] initWithFrame:bounds processPool:processPool configuration:WTF::move(webPageConfiguration) webView:self]);
</ins><span class="cx"> [self addSubview:_wkView.get()];
</span><span class="cx"> _page = WebKit::toImpl([_wkView pageRef]);
</span><span class="cx">
</span><span class="lines">@@ -379,7 +379,7 @@
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><span class="cx"> if (_remoteObjectRegistry)
</span><del>- _page->process().context().removeMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID());
</del><ins>+ _page->process().processPool().removeMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID());
</ins><span class="cx">
</span><span class="cx"> _page->close();
</span><span class="cx">
</span><span class="lines">@@ -1622,7 +1622,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!_remoteObjectRegistry) {
</span><span class="cx"> _remoteObjectRegistry = adoptNS([[_WKRemoteObjectRegistry alloc] _initWithMessageSender:*_page]);
</span><del>- _page->process().context().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID(), [_remoteObjectRegistry remoteObjectRegistry]);
</del><ins>+ _page->process().processPool().addMessageReceiver(Messages::RemoteObjectRegistry::messageReceiverName(), _page->pageID(), [_remoteObjectRegistry remoteObjectRegistry]);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return _remoteObjectRegistry.get();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -66,13 +66,13 @@
</span><span class="cx"> #import "WKViewInternal.h"
</span><span class="cx"> #import "WKViewPrivate.h"
</span><span class="cx"> #import "WebBackForwardList.h"
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebEventFactory.h"
</span><span class="cx"> #import "WebKit2Initialize.h"
</span><span class="cx"> #import "WebPage.h"
</span><span class="cx"> #import "WebPageGroup.h"
</span><span class="cx"> #import "WebPageProxy.h"
</span><span class="cx"> #import "WebPreferences.h"
</span><ins>+#import "WebProcessPool.h"
</ins><span class="cx"> #import "WebProcessProxy.h"
</span><span class="cx"> #import "WebSystemInterface.h"
</span><span class="cx"> #import "_WKThumbnailViewInternal.h"
</span><span class="lines">@@ -339,7 +339,7 @@
</span><span class="cx"> if (canLoadLUNotificationPopoverWillClose())
</span><span class="cx"> [[NSNotificationCenter defaultCenter] removeObserver:self name:getLUNotificationPopoverWillClose() object:nil];
</span><span class="cx">
</span><del>- WebContext::statistics().wkViewCount--;
</del><ins>+ WebProcessPool::statistics().wkViewCount--;
</ins><span class="cx">
</span><span class="cx"> [super dealloc];
</span><span class="cx"> }
</span><span class="lines">@@ -2712,7 +2712,7 @@
</span><span class="cx">
</span><span class="cx"> - (void)_applicationWillTerminate:(NSNotification *)notification
</span><span class="cx"> {
</span><del>- _data->_page->process().context().applicationWillTerminate();
</del><ins>+ _data->_page->process().processPool().applicationWillTerminate();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)_dictionaryLookupPopoverWillClose:(NSNotification *)notification
</span><span class="lines">@@ -3558,7 +3558,7 @@
</span><span class="cx"> [self addTrackingArea:trackingArea];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (instancetype)initWithFrame:(NSRect)frame context:(WebContext&)context configuration:(WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView
</del><ins>+- (instancetype)initWithFrame:(NSRect)frame processPool:(WebProcessPool&)processPool configuration:(WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView
</ins><span class="cx"> {
</span><span class="cx"> self = [super initWithFrame:frame];
</span><span class="cx"> if (!self)
</span><span class="lines">@@ -3580,8 +3580,8 @@
</span><span class="cx"> [self addTrackingArea:_data->_primaryTrackingArea.get()];
</span><span class="cx">
</span><span class="cx"> _data->_pageClient = std::make_unique<PageClientImpl>(self, webView);
</span><del>- _data->_page = context.createWebPage(*_data->_pageClient, WTF::move(webPageConfiguration));
- _data->_page->setAddsVisitedLinks(context.historyClient().addsVisitedLinks());
</del><ins>+ _data->_page = processPool.createWebPage(*_data->_pageClient, WTF::move(webPageConfiguration));
+ _data->_page->setAddsVisitedLinks(processPool.historyClient().addsVisitedLinks());
</ins><span class="cx">
</span><span class="cx"> _data->_page->setIntrinsicDeviceScaleFactor([self _intrinsicDeviceScaleFactor]);
</span><span class="cx"> _data->_page->initializeWebPage();
</span><span class="lines">@@ -3603,7 +3603,7 @@
</span><span class="cx"> // Explicitly set the layer contents placement so AppKit will make sure that our layer has masksToBounds set to YES.
</span><span class="cx"> self.layerContentsPlacement = NSViewLayerContentsPlacementTopLeft;
</span><span class="cx">
</span><del>- WebContext::statistics().wkViewCount++;
</del><ins>+ WebProcessPool::statistics().wkViewCount++;
</ins><span class="cx">
</span><span class="cx"> NSNotificationCenter* workspaceNotificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter];
</span><span class="cx"> [workspaceNotificationCenter addObserver:self selector:@selector(_activeSpaceDidChange:) name:NSWorkspaceActiveSpaceDidChangeNotification object:nil];
</span><span class="lines">@@ -3794,7 +3794,7 @@
</span><span class="cx"> webPageConfiguration.pageGroup = toImpl(pageGroupRef);
</span><span class="cx"> webPageConfiguration.relatedPage = toImpl(relatedPage);
</span><span class="cx">
</span><del>- return [self initWithFrame:frame context:*toImpl(contextRef) configuration:webPageConfiguration webView:nil];
</del><ins>+ return [self initWithFrame:frame processPool:*toImpl(contextRef) configuration:webPageConfiguration webView:nil];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> class DrawingAreaProxy;
</span><span class="cx"> class LayerTreeContext;
</span><span class="cx"> class ViewSnapshot;
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx"> struct ActionMenuHitTestResult;
</span><span class="cx"> struct ColorSpaceData;
</span><span class="cx"> struct EditorState;
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx">
</span><span class="cx"> @interface WKView ()
</span><span class="cx"> #if WK_API_ENABLED
</span><del>-- (instancetype)initWithFrame:(CGRect)frame context:(WebKit::WebContext&)context configuration:(WebKit::WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView;
</del><ins>+- (instancetype)initWithFrame:(CGRect)frame processPool:(WebKit::WebProcessPool&)processPool configuration:(WebKit::WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView;
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> - (std::unique_ptr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIContextConfigurationcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/APIContextConfiguration.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/APIContextConfiguration.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/APIContextConfiguration.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -1,56 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "APIContextConfiguration.h"
-
-#include "WebContext.h"
-
-namespace API {
-
-ContextConfiguration::ContextConfiguration()
-{
-}
-
-ContextConfiguration::~ContextConfiguration()
-{
-}
-
-WebKit::WebContextConfiguration ContextConfiguration::webContextConfiguration() const
-{
- WebKit::WebContextConfiguration configuration;
-
- configuration.indexedDBDatabaseDirectory = m_indexedDBDatabaseDirectory;
- configuration.injectedBundlePath = m_injectedBundlePath;
- configuration.localStorageDirectory = m_localStorageDirectory;
- configuration.webSQLDatabaseDirectory = m_webSQLDatabaseDirectory;
- configuration.mediaKeysStorageDirectory = m_mediaKeysStorageDirectory;
-
- WebKit::WebContext::applyPlatformSpecificConfigurationDefaults(configuration);
-
- return configuration;
-}
-
-} // namespace API
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIContextConfigurationh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/APIContextConfiguration.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/APIContextConfiguration.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/APIContextConfiguration.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -1,75 +0,0 @@
</span><del>-/*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef APIContextConfiguration_h
-#define APIContextConfiguration_h
-
-#include "APIObject.h"
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-struct WebContextConfiguration;
-}
-
-namespace API {
-
-class ContextConfiguration : public ObjectImpl<Object::Type::ContextConfiguration> {
-public:
- static PassRefPtr<ContextConfiguration> create()
- {
- return adoptRef(new ContextConfiguration);
- }
- virtual ~ContextConfiguration();
-
- String indexedDBDatabaseDirectory() const { return m_indexedDBDatabaseDirectory; }
- void setIndexedDBDatabaseDirectory(const String& indexedDBDatabaseDirectory) { m_indexedDBDatabaseDirectory = indexedDBDatabaseDirectory; }
-
- String injectedBundlePath() const { return m_injectedBundlePath; }
- void setInjectedBundlePath(const String& injectedBundlePath) { m_injectedBundlePath = injectedBundlePath; }
-
- String localStorageDirectory() const { return m_localStorageDirectory; }
- void setLocalStorageDirectory(const String& localStorageDirectory) { m_localStorageDirectory = localStorageDirectory; }
-
- String webSQLDatabaseDirectory() const { return m_webSQLDatabaseDirectory; }
- void setWebSQLDatabaseDirectory(const String& webSQLDatabaseDirectory) { m_webSQLDatabaseDirectory = webSQLDatabaseDirectory; }
-
- String mediaKeysStorageDirectory() const { return m_mediaKeysStorageDirectory; }
- void setMediaKeysStorageDirectory(const String& mediaKeysStorageDirectory) { m_mediaKeysStorageDirectory = mediaKeysStorageDirectory; }
-
- WebKit::WebContextConfiguration webContextConfiguration() const;
-
-private:
- ContextConfiguration();
-
- String m_indexedDBDatabaseDirectory;
- String m_injectedBundlePath;
- String m_localStorageDirectory;
- String m_webSQLDatabaseDirectory;
- String m_mediaKeysStorageDirectory;
-};
-
-} // namespace API
-
-#endif // APIContextConfiguration_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIProcessPoolConfigurationcppfromrev177635trunkSourceWebKit2UIProcessAPIContextConfigurationcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/APIProcessPoolConfiguration.cpp (from rev 177635, trunk/Source/WebKit2/UIProcess/APIContextConfiguration.cpp) (0 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/APIProcessPoolConfiguration.cpp         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/APIProcessPoolConfiguration.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "APIProcessPoolConfiguration.h"
+
+#include "WebProcessPool.h"
+
+namespace API {
+
+ProcessPoolConfiguration::ProcessPoolConfiguration()
+{
+}
+
+ProcessPoolConfiguration::~ProcessPoolConfiguration()
+{
+}
+
+WebKit::WebProcessPoolConfiguration ProcessPoolConfiguration::webProcessPoolConfiguration() const
+{
+ WebKit::WebProcessPoolConfiguration configuration;
+
+ configuration.indexedDBDatabaseDirectory = m_indexedDBDatabaseDirectory;
+ configuration.injectedBundlePath = m_injectedBundlePath;
+ configuration.localStorageDirectory = m_localStorageDirectory;
+ configuration.webSQLDatabaseDirectory = m_webSQLDatabaseDirectory;
+ configuration.mediaKeysStorageDirectory = m_mediaKeysStorageDirectory;
+
+ WebKit::WebProcessPool::applyPlatformSpecificConfigurationDefaults(configuration);
+
+ return configuration;
+}
+
+} // namespace API
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIProcessPoolConfigurationhfromrev177635trunkSourceWebKit2UIProcessAPIContextConfigurationh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/APIProcessPoolConfiguration.h (from rev 177635, trunk/Source/WebKit2/UIProcess/APIContextConfiguration.h) (0 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/APIProcessPoolConfiguration.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/APIProcessPoolConfiguration.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -0,0 +1,75 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef APIContextConfiguration_h
+#define APIContextConfiguration_h
+
+#include "APIObject.h"
+#include <wtf/text/WTFString.h>
+
+namespace WebKit {
+struct WebProcessPoolConfiguration;
+}
+
+namespace API {
+
+class ProcessPoolConfiguration : public ObjectImpl<Object::Type::ProcessPoolConfiguration> {
+public:
+ static PassRefPtr<ProcessPoolConfiguration> create()
+ {
+ return adoptRef(new ProcessPoolConfiguration);
+ }
+ virtual ~ProcessPoolConfiguration();
+
+ String indexedDBDatabaseDirectory() const { return m_indexedDBDatabaseDirectory; }
+ void setIndexedDBDatabaseDirectory(const String& indexedDBDatabaseDirectory) { m_indexedDBDatabaseDirectory = indexedDBDatabaseDirectory; }
+
+ String injectedBundlePath() const { return m_injectedBundlePath; }
+ void setInjectedBundlePath(const String& injectedBundlePath) { m_injectedBundlePath = injectedBundlePath; }
+
+ String localStorageDirectory() const { return m_localStorageDirectory; }
+ void setLocalStorageDirectory(const String& localStorageDirectory) { m_localStorageDirectory = localStorageDirectory; }
+
+ String webSQLDatabaseDirectory() const { return m_webSQLDatabaseDirectory; }
+ void setWebSQLDatabaseDirectory(const String& webSQLDatabaseDirectory) { m_webSQLDatabaseDirectory = webSQLDatabaseDirectory; }
+
+ String mediaKeysStorageDirectory() const { return m_mediaKeysStorageDirectory; }
+ void setMediaKeysStorageDirectory(const String& mediaKeysStorageDirectory) { m_mediaKeysStorageDirectory = mediaKeysStorageDirectory; }
+
+ WebKit::WebProcessPoolConfiguration webProcessPoolConfiguration() const;
+
+private:
+ ProcessPoolConfiguration();
+
+ String m_indexedDBDatabaseDirectory;
+ String m_injectedBundlePath;
+ String m_localStorageDirectory;
+ String m_webSQLDatabaseDirectory;
+ String m_mediaKeysStorageDirectory;
+};
+
+} // namespace API
+
+#endif // APIContextConfiguration_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaDownloadClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/DownloadClient.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/DownloadClient.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/DownloadClient.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -48,13 +48,13 @@
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> // From API::DownloadClient
</span><del>- virtual void didStart(WebContext*, DownloadProxy*);
- virtual void didReceiveResponse(WebContext*, DownloadProxy*, const WebCore::ResourceResponse&);
- virtual void didReceiveData(WebContext*, DownloadProxy*, uint64_t length);
- virtual String decideDestinationWithSuggestedFilename(WebContext*, DownloadProxy*, const String& filename, bool& allowOverwriteParam);
- virtual void didFinish(WebContext*, DownloadProxy*);
- virtual void didFail(WebContext*, DownloadProxy*, const WebCore::ResourceError&);
- virtual void didCancel(WebContext*, DownloadProxy*);
</del><ins>+ virtual void didStart(WebProcessPool*, DownloadProxy*);
+ virtual void didReceiveResponse(WebProcessPool*, DownloadProxy*, const WebCore::ResourceResponse&);
+ virtual void didReceiveData(WebProcessPool*, DownloadProxy*, uint64_t length);
+ virtual String decideDestinationWithSuggestedFilename(WebProcessPool*, DownloadProxy*, const String& filename, bool& allowOverwriteParam);
+ virtual void didFinish(WebProcessPool*, DownloadProxy*);
+ virtual void didFail(WebProcessPool*, DownloadProxy*, const WebCore::ResourceError&);
+ virtual void didCancel(WebProcessPool*, DownloadProxy*);
</ins><span class="cx">
</span><span class="cx"> WeakObjCPtr<id <_WKDownloadDelegate>> m_delegate;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaDownloadClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/DownloadClient.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/DownloadClient.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/DownloadClient.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -54,25 +54,25 @@
</span><span class="cx"> m_delegateMethods.downloadDidCancel = [delegate respondsToSelector:@selector(_downloadDidCancel:)];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void DownloadClient::didStart(WebContext*, DownloadProxy* downloadProxy)
</del><ins>+void DownloadClient::didStart(WebProcessPool*, DownloadProxy* downloadProxy)
</ins><span class="cx"> {
</span><span class="cx"> if (m_delegateMethods.downloadDidStart)
</span><span class="cx"> [m_delegate.get() _downloadDidStart:wrapper(*downloadProxy)];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void DownloadClient::didReceiveResponse(WebContext*, DownloadProxy* downloadProxy, const WebCore::ResourceResponse& response)
</del><ins>+void DownloadClient::didReceiveResponse(WebProcessPool*, DownloadProxy* downloadProxy, const WebCore::ResourceResponse& response)
</ins><span class="cx"> {
</span><span class="cx"> if (m_delegateMethods.downloadDidReceiveResponse)
</span><span class="cx"> [m_delegate.get() _download:wrapper(*downloadProxy) didReceiveResponse:response.nsURLResponse()];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void DownloadClient::didReceiveData(WebContext*, DownloadProxy* downloadProxy, uint64_t length)
</del><ins>+void DownloadClient::didReceiveData(WebProcessPool*, DownloadProxy* downloadProxy, uint64_t length)
</ins><span class="cx"> {
</span><span class="cx"> if (m_delegateMethods.downloadDidReceiveData)
</span><span class="cx"> [m_delegate.get() _download:wrapper(*downloadProxy) didReceiveData:length];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String DownloadClient::decideDestinationWithSuggestedFilename(WebContext*, DownloadProxy* downloadProxy, const String& filename, bool& allowOverwriteParam)
</del><ins>+String DownloadClient::decideDestinationWithSuggestedFilename(WebProcessPool*, DownloadProxy* downloadProxy, const String& filename, bool& allowOverwriteParam)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_delegateMethods.downloadDecideDestinationWithSuggestedFilenameAllowOverwrite)
</span><span class="cx"> return String();
</span><span class="lines">@@ -83,19 +83,19 @@
</span><span class="cx"> return destination;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void DownloadClient::didFinish(WebContext*, DownloadProxy* downloadProxy)
</del><ins>+void DownloadClient::didFinish(WebProcessPool*, DownloadProxy* downloadProxy)
</ins><span class="cx"> {
</span><span class="cx"> if (m_delegateMethods.downloadDidFinish)
</span><span class="cx"> [m_delegate.get() _downloadDidFinish:wrapper(*downloadProxy)];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void DownloadClient::didFail(WebContext*, DownloadProxy* downloadProxy, const WebCore::ResourceError& error)
</del><ins>+void DownloadClient::didFail(WebProcessPool*, DownloadProxy* downloadProxy, const WebCore::ResourceError& error)
</ins><span class="cx"> {
</span><span class="cx"> if (m_delegateMethods.downloadDidFail)
</span><span class="cx"> [m_delegate.get() _download:wrapper(*downloadProxy) didFailWithError:error.nsError()];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void DownloadClient::didCancel(WebContext*, DownloadProxy* downloadProxy)
</del><ins>+void DownloadClient::didCancel(WebProcessPool*, DownloadProxy* downloadProxy)
</ins><span class="cx"> {
</span><span class="cx"> if (m_delegateMethods.downloadDidCancel)
</span><span class="cx"> [m_delegate.get() _downloadDidCancel:wrapper(*downloadProxy)];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebProcessPoolCocoammfromrev177635trunkSourceWebKit2UIProcessmacWebContextMacmm"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm (from rev 177635, trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm) (0 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -0,0 +1,623 @@
</span><ins>+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+#import "WebProcessPool.h"
+
+#import "PluginProcessManager.h"
+#import "SandboxUtilities.h"
+#import "TextChecker.h"
+#import "WKBrowsingContextControllerInternal.h"
+#import "WKBrowsingContextControllerInternal.h"
+#import "WebKitSystemInterface.h"
+#import "WebMemoryPressureHandlerIOS.h"
+#import "WebPageGroup.h"
+#import "WebPreferencesKeys.h"
+#import "WebProcessCreationParameters.h"
+#import "WebProcessMessages.h"
+#import "WindowServerConnection.h"
+#import <WebCore/CFNetworkSPI.h>
+#import <WebCore/Color.h>
+#import <WebCore/FileSystem.h>
+#import <WebCore/NotImplemented.h>
+#import <WebCore/PlatformPasteboard.h>
+#import <WebCore/SharedBuffer.h>
+#import <sys/param.h>
+
+#if ENABLE(NETWORK_PROCESS)
+#import "NetworkProcessCreationParameters.h"
+#import "NetworkProcessProxy.h"
+#endif
+
+#if PLATFORM(IOS)
+#import <WebCore/RuntimeApplicationChecksIOS.h>
+#else
+#import <QuartzCore/CARemoteLayerServer.h>
+#endif
+
+using namespace WebCore;
+
+NSString *WebDatabaseDirectoryDefaultsKey = @"WebDatabaseDirectory";
+NSString *WebKitLocalCacheDefaultsKey = @"WebKitLocalCache";
+NSString *WebStorageDirectoryDefaultsKey = @"WebKitLocalStorageDatabasePathPreferenceKey";
+NSString *WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey = @"WebKitKerningAndLigaturesEnabledByDefault";
+NSString *WebKitJSCJITEnabledDefaultsKey = @"WebKitJSCJITEnabledDefaultsKey";
+NSString *WebKitJSCFTLJITEnabledDefaultsKey = @"WebKitJSCFTLJITEnabledDefaultsKey";
+NSString *WebKitMediaKeysStorageDirectoryDefaultsKey = @"WebKitMediaKeysStorageDirectory";
+
+#if !PLATFORM(IOS)
+static NSString *WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification = @"NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification";
+#endif
+
+// FIXME: <rdar://problem/9138817> - After this "backwards compatibility" radar is removed, this code should be removed to only return an empty String.
+NSString *WebIconDatabaseDirectoryDefaultsKey = @"WebIconDatabaseDirectoryDefaultsKey";
+
+#if ENABLE(NETWORK_PROCESS)
+static NSString * const WebKit2HTTPProxyDefaultsKey = @"WebKit2HTTPProxy";
+static NSString * const WebKit2HTTPSProxyDefaultsKey = @"WebKit2HTTPSProxy";
+#endif
+
+namespace WebKit {
+
+NSString *SchemeForCustomProtocolRegisteredNotificationName = @"WebKitSchemeForCustomProtocolRegisteredNotification";
+NSString *SchemeForCustomProtocolUnregisteredNotificationName = @"WebKitSchemeForCustomProtocolUnregisteredNotification";
+
+static void registerUserDefaultsIfNeeded()
+{
+ static bool didRegister;
+ if (didRegister)
+ return;
+
+ didRegister = true;
+ NSMutableDictionary *registrationDictionary = [NSMutableDictionary dictionary];
+
+ [registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitJSCJITEnabledDefaultsKey];
+ [registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitJSCFTLJITEnabledDefaultsKey];
+
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ [registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
+#endif
+
+ [[NSUserDefaults standardUserDefaults] registerDefaults:registrationDictionary];
+}
+
+void WebProcessPool::updateProcessSuppressionState()
+{
+#if ENABLE(NETWORK_PROCESS)
+ if (m_usesNetworkProcess && m_networkProcess)
+ m_networkProcess->setProcessSuppressionEnabled(processSuppressionEnabled());
+#endif
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ if (!m_processSuppressionDisabledForPageCounter.value())
+ m_pluginProcessManagerProcessSuppressionDisabledToken = nullptr;
+ else if (!m_pluginProcessManagerProcessSuppressionDisabledToken)
+ m_pluginProcessManagerProcessSuppressionDisabledToken = PluginProcessManager::shared().processSuppressionDisabledToken();
+#endif
+}
+
+NSMutableDictionary *WebProcessPool::ensureBundleParameters()
+{
+ if (!m_bundleParameters)
+ m_bundleParameters = adoptNS([[NSMutableDictionary alloc] init]);
+
+ return m_bundleParameters.get();
+}
+
+void WebProcessPool::platformInitialize()
+{
+ registerUserDefaultsIfNeeded();
+ registerNotificationObservers();
+
+#if PLATFORM(IOS)
+ WebKit::WebMemoryPressureHandler::shared();
+#endif
+}
+
+String WebProcessPool::platformDefaultApplicationCacheDirectory() const
+{
+ NSString *appName = [[NSBundle mainBundle] bundleIdentifier];
+ if (!appName)
+ appName = [[NSProcessInfo processInfo] processName];
+#if PLATFORM(IOS)
+ // This quirk used to make these apps share application cache storage, but doesn't accomplish that any more.
+ // Preserving it avoids the need to migrate data when upgrading.
+ if (applicationIsMobileSafari() || applicationIsWebApp())
+ appName = @"com.apple.WebAppCache";
+#endif
+
+ ASSERT(appName);
+
+#if PLATFORM(IOS)
+ NSString *cacheDir = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"];
+#else
+ char cacheDirectory[MAXPATHLEN];
+ size_t cacheDirectoryLen = confstr(_CS_DARWIN_USER_CACHE_DIR, cacheDirectory, MAXPATHLEN);
+ if (!cacheDirectoryLen)
+ return String();
+
+ NSString *cacheDir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:cacheDirectory length:cacheDirectoryLen - 1];
+#endif
+ NSString* cachePath = [cacheDir stringByAppendingPathComponent:appName];
+ return stringByResolvingSymlinksInPath([cachePath stringByStandardizingPath]);
+}
+
+void WebProcessPool::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
+{
+ parameters.presenterApplicationPid = getpid();
+
+#if PLATFORM(MAC)
+ parameters.accessibilityEnhancedUserInterfaceEnabled = [[NSApp accessibilityAttributeValue:@"AXEnhancedUserInterface"] boolValue];
+#else
+ parameters.accessibilityEnhancedUserInterfaceEnabled = false;
+#endif
+
+ NSURLCache *urlCache = [NSURLCache sharedURLCache];
+ parameters.nsURLCacheMemoryCapacity = [urlCache memoryCapacity];
+ parameters.nsURLCacheDiskCapacity = [urlCache diskCapacity];
+
+#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ parameters.shouldForceScreenFontSubstitution = [[NSUserDefaults standardUserDefaults] boolForKey:@"NSFontDefaultScreenFontSubstitutionEnabled"];
+#endif
+ parameters.shouldEnableKerningAndLigaturesByDefault = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
+ parameters.shouldEnableJIT = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJSCJITEnabledDefaultsKey];
+ parameters.shouldEnableFTLJIT = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJSCFTLJITEnabledDefaultsKey];
+ parameters.shouldEnableMemoryPressureReliefLogging = [[NSUserDefaults standardUserDefaults] boolForKey:@"LogMemoryJetsamDetails"];
+
+#if HAVE(HOSTED_CORE_ANIMATION)
+#if !PLATFORM(IOS)
+ parameters.acceleratedCompositingPort = MachSendRight::create([CARemoteLayerServer sharedServer].serverPort);
+#endif
+#endif
+
+ // FIXME: This should really be configurable; we shouldn't just blindly allow read access to the UI process bundle.
+ parameters.uiProcessBundleResourcePath = [[NSBundle mainBundle] resourcePath];
+ SandboxExtension::createHandle(parameters.uiProcessBundleResourcePath, SandboxExtension::ReadOnly, parameters.uiProcessBundleResourcePathExtensionHandle);
+
+ parameters.uiProcessBundleIdentifier = String([[NSBundle mainBundle] bundleIdentifier]);
+
+#if ENABLE(NETWORK_PROCESS)
+ if (!m_usesNetworkProcess) {
+#endif
+ for (const auto& scheme : globalURLSchemesWithCustomProtocolHandlers())
+ parameters.urlSchemesRegisteredForCustomProtocols.append(scheme);
+#if ENABLE(NETWORK_PROCESS)
+ }
+#endif
+
+ if (m_bundleParameters) {
+ auto data = adoptNS([[NSMutableData alloc] init]);
+ auto keyedArchiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
+
+ [keyedArchiver setRequiresSecureCoding:YES];
+
+ @try {
+ [keyedArchiver encodeObject:m_bundleParameters.get() forKey:@"parameters"];
+ [keyedArchiver finishEncoding];
+ } @catch (NSException *exception) {
+ LOG_ERROR("Failed to encode bundle parameters: %@", exception);
+ }
+
+ parameters.bundleParameterData = API::Data::createWithoutCopying((const unsigned char*)[data bytes], [data length], [] (unsigned char*, const void* data) {
+ [(NSData *)data release];
+ }, data.leakRef());
+ }
+}
+
+#if ENABLE(NETWORK_PROCESS)
+void WebProcessPool::platformInitializeNetworkProcess(NetworkProcessCreationParameters& parameters)
+{
+ NSURLCache *urlCache = [NSURLCache sharedURLCache];
+ parameters.nsURLCacheMemoryCapacity = [urlCache memoryCapacity];
+ parameters.nsURLCacheDiskCapacity = [urlCache diskCapacity];
+
+ parameters.parentProcessName = [[NSProcessInfo processInfo] processName];
+ parameters.uiProcessBundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
+
+ for (const auto& scheme : globalURLSchemesWithCustomProtocolHandlers())
+ parameters.urlSchemesRegisteredForCustomProtocols.append(scheme);
+
+ parameters.httpProxy = [[NSUserDefaults standardUserDefaults] stringForKey:WebKit2HTTPProxyDefaultsKey];
+ parameters.httpsProxy = [[NSUserDefaults standardUserDefaults] stringForKey:WebKit2HTTPSProxyDefaultsKey];
+}
+#endif
+
+void WebProcessPool::platformInvalidateContext()
+{
+ unregisterNotificationObservers();
+}
+
+String WebProcessPool::platformDefaultDiskCacheDirectory() const
+{
+ RetainPtr<NSString> cachePath = adoptNS((NSString *)WKCopyFoundationCacheDirectory());
+ if (!cachePath)
+ cachePath = @"~/Library/Caches/com.apple.WebKit.WebProcess";
+ return stringByResolvingSymlinksInPath([cachePath stringByStandardizingPath]);
+}
+
+String WebProcessPool::platformDefaultCookieStorageDirectory() const
+{
+#if PLATFORM(IOS)
+ String path = pathForProcessContainer();
+ if (path.isEmpty())
+ path = NSHomeDirectory();
+
+ path = path + "/Library/Cookies";
+ path = stringByResolvingSymlinksInPath(path);
+ return path;
+#else
+ notImplemented();
+ return [@"" stringByStandardizingPath];
+#endif
+}
+
+#if PLATFORM(IOS)
+String WebProcessPool::openGLCacheDirectory() const
+{
+ String path = pathForProcessContainer();
+ if (path.isEmpty())
+ path = NSHomeDirectory();
+
+ path = path + "/Library/Caches/com.apple.WebKit.WebContent/com.apple.opengl/";
+ return stringByResolvingSymlinksInPath(path);
+}
+
+String WebProcessPool::parentBundleDirectory() const
+{
+ return [[[NSBundle mainBundle] bundlePath] stringByStandardizingPath];
+}
+
+String WebProcessPool::networkingHSTSDatabasePath() const
+{
+ String path = pathForProcessContainer();
+ if (path.isEmpty())
+ path = NSHomeDirectory();
+
+ path = path + "/Library/Caches/com.apple.WebKit.Networking/";
+ path = stringByResolvingSymlinksInPath(path);
+
+ NSError *error = nil;
+ NSString* nsPath = path;
+ if (![[NSFileManager defaultManager] createDirectoryAtPath:nsPath withIntermediateDirectories:YES attributes:nil error:&error]) {
+ NSLog(@"could not create \"%@\", error %@", nsPath, error);
+ return String();
+ }
+
+ return path + "/HSTS.plist";
+}
+
+String WebProcessPool::webContentHSTSDatabasePath() const
+{
+ String path = pathForProcessContainer();
+ if (path.isEmpty())
+ path = NSHomeDirectory();
+
+ path = path + "/Library/Caches/com.apple.WebKit.WebContent/";
+ path = stringByResolvingSymlinksInPath(path);
+
+ NSError *error = nil;
+ NSString* nsPath = path;
+ if (![[NSFileManager defaultManager] createDirectoryAtPath:nsPath withIntermediateDirectories:YES attributes:nil error:&error]) {
+ NSLog(@"could not create \"%@\", error %@", nsPath, error);
+ return String();
+ }
+
+ return path + "/HSTS.plist";
+}
+
+String WebProcessPool::containerTemporaryDirectory() const
+{
+ String path = NSTemporaryDirectory();
+ return stringByResolvingSymlinksInPath(path);
+}
+#endif
+
+String WebProcessPool::platformDefaultWebSQLDatabaseDirectory()
+{
+ NSString *databasesDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebDatabaseDirectoryDefaultsKey];
+ if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString class]])
+ databasesDirectory = @"~/Library/WebKit/Databases";
+ return stringByResolvingSymlinksInPath([databasesDirectory stringByStandardizingPath]);
+}
+
+String WebProcessPool::platformDefaultIndexedDBDatabaseDirectory()
+{
+ // Indexed databases exist in a subdirectory of the "database directory path."
+ // Currently, the top level of that directory contains entities related to WebSQL databases.
+ // We should fix this, and move WebSQL into a subdirectory (https://bugs.webkit.org/show_bug.cgi?id=124807)
+ // In the meantime, an entity name prefixed with three underscores will not conflict with any WebSQL entities.
+ return pathByAppendingComponent(platformDefaultWebSQLDatabaseDirectory(), "___IndexedDB");
+}
+
+String WebProcessPool::platformDefaultIconDatabasePath() const
+{
+ // FIXME: <rdar://problem/9138817> - After this "backwards compatibility" radar is removed, this code should be removed to only return an empty String.
+ NSString *databasesDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebIconDatabaseDirectoryDefaultsKey];
+ if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString class]])
+ databasesDirectory = @"~/Library/Icons/WebpageIcons.db";
+ return stringByResolvingSymlinksInPath([databasesDirectory stringByStandardizingPath]);
+}
+
+String WebProcessPool::platformDefaultLocalStorageDirectory()
+{
+ NSString *localStorageDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebStorageDirectoryDefaultsKey];
+ if (!localStorageDirectory || ![localStorageDirectory isKindOfClass:[NSString class]])
+ localStorageDirectory = @"~/Library/WebKit/LocalStorage";
+ return stringByResolvingSymlinksInPath([localStorageDirectory stringByStandardizingPath]);
+}
+
+String WebProcessPool::platformDefaultMediaKeysStorageDirectory()
+{
+ NSString *mediaKeysStorageDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebKitMediaKeysStorageDirectoryDefaultsKey];
+ if (!mediaKeysStorageDirectory || ![mediaKeysStorageDirectory isKindOfClass:[NSString class]])
+ mediaKeysStorageDirectory = @"~/Library/WebKit/MediaKeys";
+ return stringByResolvingSymlinksInPath([mediaKeysStorageDirectory stringByStandardizingPath]);
+}
+
+bool WebProcessPool::omitPDFSupport()
+{
+ // Since this is a "secret default" we don't bother registering it.
+ return [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitOmitPDFSupport"];
+}
+
+void WebProcessPool::getPasteboardTypes(const String& pasteboardName, Vector<String>& pasteboardTypes)
+{
+ PlatformPasteboard(pasteboardName).getTypes(pasteboardTypes);
+}
+
+void WebProcessPool::getPasteboardPathnamesForType(const String& pasteboardName, const String& pasteboardType, Vector<String>& pathnames)
+{
+ PlatformPasteboard(pasteboardName).getPathnamesForType(pathnames, pasteboardType);
+}
+
+void WebProcessPool::getPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, String& string)
+{
+ string = PlatformPasteboard(pasteboardName).stringForType(pasteboardType);
+}
+
+void WebProcessPool::getPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, SharedMemory::Handle& handle, uint64_t& size)
+{
+ RefPtr<SharedBuffer> buffer = PlatformPasteboard(pasteboardName).bufferForType(pasteboardType);
+ if (!buffer)
+ return;
+ size = buffer->size();
+ RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::create(size);
+ if (!sharedMemoryBuffer)
+ return;
+ memcpy(sharedMemoryBuffer->data(), buffer->data(), size);
+ sharedMemoryBuffer->createHandle(handle, SharedMemory::ReadOnly);
+}
+
+void WebProcessPool::pasteboardCopy(const String& fromPasteboard, const String& toPasteboard, uint64_t& newChangeCount)
+{
+ newChangeCount = PlatformPasteboard(toPasteboard).copy(fromPasteboard);
+}
+
+void WebProcessPool::getPasteboardChangeCount(const String& pasteboardName, uint64_t& changeCount)
+{
+ changeCount = PlatformPasteboard(pasteboardName).changeCount();
+}
+
+void WebProcessPool::getPasteboardUniqueName(String& pasteboardName)
+{
+ pasteboardName = PlatformPasteboard::uniqueName();
+}
+
+void WebProcessPool::getPasteboardColor(const String& pasteboardName, WebCore::Color& color)
+{
+ color = PlatformPasteboard(pasteboardName).color();
+}
+
+void WebProcessPool::getPasteboardURL(const String& pasteboardName, WTF::String& urlString)
+{
+ urlString = PlatformPasteboard(pasteboardName).url().string();
+}
+
+void WebProcessPool::addPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, uint64_t& newChangeCount)
+{
+ newChangeCount = PlatformPasteboard(pasteboardName).addTypes(pasteboardTypes);
+}
+
+void WebProcessPool::setPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, uint64_t& newChangeCount)
+{
+ newChangeCount = PlatformPasteboard(pasteboardName).setTypes(pasteboardTypes);
+}
+
+void WebProcessPool::setPasteboardPathnamesForType(const String& pasteboardName, const String& pasteboardType, const Vector<String>& pathnames, uint64_t& newChangeCount)
+{
+ newChangeCount = PlatformPasteboard(pasteboardName).setPathnamesForType(pathnames, pasteboardType);
+}
+
+void WebProcessPool::setPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, const String& string, uint64_t& newChangeCount)
+{
+ newChangeCount = PlatformPasteboard(pasteboardName).setStringForType(string, pasteboardType);
+}
+
+void WebProcessPool::setPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, const SharedMemory::Handle& handle, uint64_t size, uint64_t& newChangeCount)
+{
+ if (handle.isNull()) {
+ newChangeCount = PlatformPasteboard(pasteboardName).setBufferForType(0, pasteboardType);
+ return;
+ }
+ RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::create(handle, SharedMemory::ReadOnly);
+ RefPtr<SharedBuffer> buffer = SharedBuffer::create(static_cast<unsigned char *>(sharedMemoryBuffer->data()), size);
+ newChangeCount = PlatformPasteboard(pasteboardName).setBufferForType(buffer, pasteboardType);
+}
+
+#if PLATFORM(IOS)
+void WebProcessPool::writeWebContentToPasteboard(const WebCore::PasteboardWebContent& content)
+{
+ PlatformPasteboard().write(content);
+}
+
+void WebProcessPool::writeImageToPasteboard(const WebCore::PasteboardImage& pasteboardImage)
+{
+ PlatformPasteboard().write(pasteboardImage);
+}
+
+void WebProcessPool::writeStringToPasteboard(const String& pasteboardType, const String& text)
+{
+ PlatformPasteboard().write(pasteboardType, text);
+}
+
+void WebProcessPool::readStringFromPasteboard(uint64_t index, const String& pasteboardType, WTF::String& value)
+{
+ value = PlatformPasteboard().readString(index, pasteboardType);
+}
+
+void WebProcessPool::readURLFromPasteboard(uint64_t index, const String& pasteboardType, String& url)
+{
+ url = PlatformPasteboard().readURL(index, pasteboardType);
+}
+
+void WebProcessPool::readBufferFromPasteboard(uint64_t index, const String& pasteboardType, SharedMemory::Handle& handle, uint64_t& size)
+{
+ RefPtr<SharedBuffer> buffer = PlatformPasteboard().readBuffer(index, pasteboardType);
+ if (!buffer)
+ return;
+ size = buffer->size();
+ RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::create(size);
+ if (!sharedMemoryBuffer)
+ return;
+ memcpy(sharedMemoryBuffer->data(), buffer->data(), size);
+ sharedMemoryBuffer->createHandle(handle, SharedMemory::ReadOnly);
+}
+
+void WebProcessPool::getPasteboardItemsCount(uint64_t& itemsCount)
+{
+ itemsCount = PlatformPasteboard().count();
+}
+
+#endif
+
+bool WebProcessPool::processSuppressionEnabled() const
+{
+ return !m_userObservablePageCounter.value() && !m_processSuppressionDisabledForPageCounter.value();
+}
+
+void WebProcessPool::registerNotificationObservers()
+{
+#if !PLATFORM(IOS)
+ // Listen for enhanced accessibility changes and propagate them to the WebProcess.
+ m_enhancedAccessibilityObserver = [[NSNotificationCenter defaultCenter] addObserverForName:WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *note) {
+ setEnhancedAccessibility([[[note userInfo] objectForKey:@"AXEnhancedUserInterface"] boolValue]);
+ }];
+
+ m_automaticTextReplacementNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSSpellCheckerDidChangeAutomaticTextReplacementNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
+ TextChecker::didChangeAutomaticTextReplacementEnabled();
+ textCheckerStateChanged();
+ }];
+
+ m_automaticSpellingCorrectionNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSSpellCheckerDidChangeAutomaticSpellingCorrectionNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
+ TextChecker::didChangeAutomaticSpellingCorrectionEnabled();
+ textCheckerStateChanged();
+ }];
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ m_automaticQuoteSubstitutionNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSSpellCheckerDidChangeAutomaticQuoteSubstitutionNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
+ TextChecker::didChangeAutomaticQuoteSubstitutionEnabled();
+ textCheckerStateChanged();
+ }];
+
+ m_automaticDashSubstitutionNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSSpellCheckerDidChangeAutomaticDashSubstitutionNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
+ TextChecker::didChangeAutomaticDashSubstitutionEnabled();
+ textCheckerStateChanged();
+ }];
+#endif
+#endif // !PLATFORM(IOS)
+}
+
+void WebProcessPool::unregisterNotificationObservers()
+{
+#if !PLATFORM(IOS)
+ [[NSNotificationCenter defaultCenter] removeObserver:m_enhancedAccessibilityObserver.get()];
+ [[NSNotificationCenter defaultCenter] removeObserver:m_automaticTextReplacementNotificationObserver.get()];
+ [[NSNotificationCenter defaultCenter] removeObserver:m_automaticSpellingCorrectionNotificationObserver.get()];
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ [[NSNotificationCenter defaultCenter] removeObserver:m_automaticQuoteSubstitutionNotificationObserver.get()];
+ [[NSNotificationCenter defaultCenter] removeObserver:m_automaticDashSubstitutionNotificationObserver.get()];
+#endif
+#endif // !PLATFORM(IOS)
+}
+
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+static CFURLStorageSessionRef privateBrowsingSession()
+{
+ static CFURLStorageSessionRef session;
+ static dispatch_once_t once;
+ dispatch_once(&once, ^{
+ NSString *identifier = [NSString stringWithFormat:@"%@.PrivateBrowsing", [[NSBundle mainBundle] bundleIdentifier]];
+
+ session = WKCreatePrivateStorageSession((CFStringRef)identifier);
+ });
+
+ return session;
+}
+#endif
+
+bool WebProcessPool::isURLKnownHSTSHost(const String& urlString, bool privateBrowsingEnabled) const
+{
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ RetainPtr<CFURLRef> url = URL(URL(), urlString).createCFURL();
+
+ return _CFNetworkIsKnownHSTSHostWithSession(url.get(), privateBrowsingEnabled ? privateBrowsingSession() : nullptr);
+#else
+ return false;
+#endif
+}
+
+void WebProcessPool::resetHSTSHosts()
+{
+#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ _CFNetworkResetHSTSHostsWithSession(nullptr);
+ _CFNetworkResetHSTSHostsWithSession(privateBrowsingSession());
+#endif
+}
+
+int networkProcessLatencyQOS()
+{
+ static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitNetworkProcessLatencyQOS"];
+ return qos;
+}
+
+int networkProcessThroughputQOS()
+{
+ static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitNetworkProcessThroughputQOS"];
+ return qos;
+}
+
+int webProcessLatencyQOS()
+{
+ static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitWebProcessLatencyQOS"];
+ return qos;
+}
+
+int webProcessThroughputQOS()
+{
+ static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitWebProcessThroughputQOS"];
+ return qos;
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDatabasesDatabaseProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -28,9 +28,9 @@
</span><span class="cx">
</span><span class="cx"> #include "DatabaseProcessMessages.h"
</span><span class="cx"> #include "DatabaseProcessProxyMessages.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebOriginDataManagerProxy.h"
</span><span class="cx"> #include "WebOriginDataManagerProxyMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(DATABASE_PROCESS)
</span><span class="cx">
</span><span class="lines">@@ -38,13 +38,13 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-PassRefPtr<DatabaseProcessProxy> DatabaseProcessProxy::create(WebContext* context)
</del><ins>+PassRefPtr<DatabaseProcessProxy> DatabaseProcessProxy::create(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new DatabaseProcessProxy(context));
</del><ins>+ return adoptRef(new DatabaseProcessProxy(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-DatabaseProcessProxy::DatabaseProcessProxy(WebContext* context)
- : m_webContext(context)
</del><ins>+DatabaseProcessProxy::DatabaseProcessProxy(WebProcessPool* processPool)
+ : m_processPool(processPool)
</ins><span class="cx"> , m_numPendingConnectionRequests(0)
</span><span class="cx"> {
</span><span class="cx"> connect();
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (decoder.messageReceiverName() == Messages::WebOriginDataManagerProxy::messageReceiverName()) {
</span><del>- m_webContext->supplement<WebOriginDataManagerProxy>()->didReceiveMessage(connection, decoder);
</del><ins>+ m_processPool->supplement<WebOriginDataManagerProxy>()->didReceiveMessage(connection, decoder);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -109,9 +109,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>- // Tell WebContext to forget about this database process. This may cause us to be deleted.
- m_webContext->databaseProcessCrashed(this);
-
</del><ins>+ // Tell ProcessPool to forget about this database process. This may cause us to be deleted.
+ m_processPool->databaseProcessCrashed(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DatabaseProcessProxy::didReceiveInvalidMessage(IPC::Connection*, IPC::StringReference messageReceiverName, IPC::StringReference messageName)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDatabasesDatabaseProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Databases/DatabaseProcessProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -35,17 +35,17 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx">
</span><span class="cx"> class DatabaseProcessProxy : public ChildProcessProxy {
</span><span class="cx"> public:
</span><del>- static PassRefPtr<DatabaseProcessProxy> create(WebContext*);
</del><ins>+ static PassRefPtr<DatabaseProcessProxy> create(WebProcessPool*);
</ins><span class="cx"> ~DatabaseProcessProxy();
</span><span class="cx">
</span><span class="cx"> void getDatabaseProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetDatabaseProcessConnection::DelayedReply>);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- DatabaseProcessProxy(WebContext*);
</del><ins>+ DatabaseProcessProxy(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> // ChildProcessProxy
</span><span class="cx"> virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) override;
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">
</span><span class="cx"> void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&);
</span><span class="cx">
</span><del>- WebContext* m_webContext;
</del><ins>+ WebProcessPool* m_processPool;
</ins><span class="cx">
</span><span class="cx"> unsigned m_numPendingConnectionRequests;
</span><span class="cx"> Deque<RefPtr<Messages::WebProcessProxy::GetDatabaseProcessConnection::DelayedReply>> m_pendingConnectionReplies;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDownloadsDownloadProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -31,8 +31,8 @@
</span><span class="cx"> #include "AuthenticationChallengeProxy.h"
</span><span class="cx"> #include "DataReference.h"
</span><span class="cx"> #include "DownloadProxyMap.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebProcessMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="lines">@@ -51,14 +51,14 @@
</span><span class="cx"> return ++uniqueDownloadID;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<DownloadProxy> DownloadProxy::create(DownloadProxyMap& downloadProxyMap, WebContext& webContext, const ResourceRequest& resourceRequest)
</del><ins>+PassRefPtr<DownloadProxy> DownloadProxy::create(DownloadProxyMap& downloadProxyMap, WebProcessPool& processPool, const ResourceRequest& resourceRequest)
</ins><span class="cx"> {
</span><del>- return adoptRef(new DownloadProxy(downloadProxyMap, webContext, resourceRequest));
</del><ins>+ return adoptRef(new DownloadProxy(downloadProxyMap, processPool, resourceRequest));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-DownloadProxy::DownloadProxy(DownloadProxyMap& downloadProxyMap, WebContext& webContext, const ResourceRequest& resourceRequest)
</del><ins>+DownloadProxy::DownloadProxy(DownloadProxyMap& downloadProxyMap, WebProcessPool& processPool, const ResourceRequest& resourceRequest)
</ins><span class="cx"> : m_downloadProxyMap(downloadProxyMap)
</span><del>- , m_webContext(&webContext)
</del><ins>+ , m_processPool(&processPool)
</ins><span class="cx"> , m_downloadID(generateDownloadID())
</span><span class="cx"> , m_request(resourceRequest)
</span><span class="cx"> {
</span><span class="lines">@@ -66,93 +66,93 @@
</span><span class="cx">
</span><span class="cx"> DownloadProxy::~DownloadProxy()
</span><span class="cx"> {
</span><del>- ASSERT(!m_webContext);
</del><ins>+ ASSERT(!m_processPool);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::cancel()
</span><span class="cx"> {
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><del>- if (m_webContext->usesNetworkProcess()) {
- if (NetworkProcessProxy* networkProcess = m_webContext->networkProcess())
</del><ins>+ if (m_processPool->usesNetworkProcess()) {
+ if (NetworkProcessProxy* networkProcess = m_processPool->networkProcess())
</ins><span class="cx"> networkProcess->connection()->send(Messages::NetworkProcess::CancelDownload(m_downloadID), 0);
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- m_webContext->sendToAllProcesses(Messages::WebProcess::CancelDownload(m_downloadID));
</del><ins>+ m_processPool->sendToAllProcesses(Messages::WebProcess::CancelDownload(m_downloadID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::invalidate()
</span><span class="cx"> {
</span><del>- ASSERT(m_webContext);
- m_webContext = 0;
</del><ins>+ ASSERT(m_processPool);
+ m_processPool = nullptr;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::processDidClose()
</span><span class="cx"> {
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- m_webContext->downloadClient().processDidCrash(m_webContext.get(), this);
</del><ins>+ m_processPool->downloadClient().processDidCrash(m_processPool.get(), this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::didStart(const ResourceRequest& request)
</span><span class="cx"> {
</span><span class="cx"> m_request = request;
</span><span class="cx">
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- m_webContext->downloadClient().didStart(m_webContext.get(), this);
</del><ins>+ m_processPool->downloadClient().didStart(m_processPool.get(), this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::didReceiveAuthenticationChallenge(const AuthenticationChallenge& authenticationChallenge, uint64_t challengeID)
</span><span class="cx"> {
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- RefPtr<AuthenticationChallengeProxy> authenticationChallengeProxy = AuthenticationChallengeProxy::create(authenticationChallenge, challengeID, m_webContext->networkingProcessConnection());
</del><ins>+ RefPtr<AuthenticationChallengeProxy> authenticationChallengeProxy = AuthenticationChallengeProxy::create(authenticationChallenge, challengeID, m_processPool->networkingProcessConnection());
</ins><span class="cx">
</span><del>- m_webContext->downloadClient().didReceiveAuthenticationChallenge(m_webContext.get(), this, authenticationChallengeProxy.get());
</del><ins>+ m_processPool->downloadClient().didReceiveAuthenticationChallenge(m_processPool.get(), this, authenticationChallengeProxy.get());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::didReceiveResponse(const ResourceResponse& response)
</span><span class="cx"> {
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- m_webContext->downloadClient().didReceiveResponse(m_webContext.get(), this, response);
</del><ins>+ m_processPool->downloadClient().didReceiveResponse(m_processPool.get(), this, response);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::didReceiveData(uint64_t length)
</span><span class="cx"> {
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- m_webContext->downloadClient().didReceiveData(m_webContext.get(), this, length);
</del><ins>+ m_processPool->downloadClient().didReceiveData(m_processPool.get(), this, length);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::shouldDecodeSourceDataOfMIMEType(const String& mimeType, bool& result)
</span><span class="cx"> {
</span><span class="cx"> result = false;
</span><span class="cx">
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- result = m_webContext->downloadClient().shouldDecodeSourceDataOfMIMEType(m_webContext.get(), this, mimeType);
</del><ins>+ result = m_processPool->downloadClient().shouldDecodeSourceDataOfMIMEType(m_processPool.get(), this, mimeType);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::decideDestinationWithSuggestedFilename(const String& filename, String& destination, bool& allowOverwrite, SandboxExtension::Handle& sandboxExtensionHandle)
</span><span class="cx"> {
</span><span class="cx"> allowOverwrite = false;
</span><span class="cx">
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- destination = m_webContext->downloadClient().decideDestinationWithSuggestedFilename(m_webContext.get(), this, filename, allowOverwrite);
</del><ins>+ destination = m_processPool->downloadClient().decideDestinationWithSuggestedFilename(m_processPool.get(), this, filename, allowOverwrite);
</ins><span class="cx">
</span><span class="cx"> if (!destination.isNull())
</span><span class="cx"> SandboxExtension::createHandle(destination, SandboxExtension::ReadWrite, sandboxExtensionHandle);
</span><span class="lines">@@ -160,18 +160,18 @@
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::didCreateDestination(const String& path)
</span><span class="cx"> {
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- m_webContext->downloadClient().didCreateDestination(m_webContext.get(), this, path);
</del><ins>+ m_processPool->downloadClient().didCreateDestination(m_processPool.get(), this, path);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::didFinish()
</span><span class="cx"> {
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- m_webContext->downloadClient().didFinish(m_webContext.get(), this);
</del><ins>+ m_processPool->downloadClient().didFinish(m_processPool.get(), this);
</ins><span class="cx">
</span><span class="cx"> // This can cause the DownloadProxy object to be deleted.
</span><span class="cx"> m_downloadProxyMap.downloadFinished(this);
</span><span class="lines">@@ -187,12 +187,12 @@
</span><span class="cx">
</span><span class="cx"> void DownloadProxy::didFail(const ResourceError& error, const IPC::DataReference& resumeData)
</span><span class="cx"> {
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> m_resumeData = createData(resumeData);
</span><span class="cx">
</span><del>- m_webContext->downloadClient().didFail(m_webContext.get(), this, error);
</del><ins>+ m_processPool->downloadClient().didFail(m_processPool.get(), this, error);
</ins><span class="cx">
</span><span class="cx"> // This can cause the DownloadProxy object to be deleted.
</span><span class="cx"> m_downloadProxyMap.downloadFinished(this);
</span><span class="lines">@@ -202,7 +202,7 @@
</span><span class="cx"> {
</span><span class="cx"> m_resumeData = createData(resumeData);
</span><span class="cx">
</span><del>- m_webContext->downloadClient().didCancel(m_webContext.get(), this);
</del><ins>+ m_processPool->downloadClient().didCancel(m_processPool.get(), this);
</ins><span class="cx">
</span><span class="cx"> // This can cause the DownloadProxy object to be deleted.
</span><span class="cx"> m_downloadProxyMap.downloadFinished(this);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDownloadsDownloadProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -46,12 +46,12 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> class DownloadProxyMap;
</span><del>-class WebContext;
</del><span class="cx"> class WebPageProxy;
</span><ins>+class WebProcessPool;
</ins><span class="cx">
</span><span class="cx"> class DownloadProxy : public API::ObjectImpl<API::Object::Type::Download>, public IPC::MessageReceiver {
</span><span class="cx"> public:
</span><del>- static PassRefPtr<DownloadProxy> create(DownloadProxyMap&, WebContext&, const WebCore::ResourceRequest&);
</del><ins>+ static PassRefPtr<DownloadProxy> create(DownloadProxyMap&, WebProcessPool&, const WebCore::ResourceRequest&);
</ins><span class="cx"> ~DownloadProxy();
</span><span class="cx">
</span><span class="cx"> uint64_t downloadID() const { return m_downloadID; }
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> void didReceiveSyncDownloadProxyMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit DownloadProxy(DownloadProxyMap&, WebContext&, const WebCore::ResourceRequest&);
</del><ins>+ explicit DownloadProxy(DownloadProxyMap&, WebProcessPool&, const WebCore::ResourceRequest&);
</ins><span class="cx">
</span><span class="cx"> // IPC::MessageReceiver
</span><span class="cx"> virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) override;
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx"> void didCancel(const IPC::DataReference& resumeData);
</span><span class="cx">
</span><span class="cx"> DownloadProxyMap& m_downloadProxyMap;
</span><del>- RefPtr<WebContext> m_webContext;
</del><ins>+ RefPtr<WebProcessPool> m_processPool;
</ins><span class="cx"> uint64_t m_downloadID;
</span><span class="cx">
</span><span class="cx"> RefPtr<API::Data> m_resumeData;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDownloadsDownloadProxyMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxyMap.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxyMap.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxyMap.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -44,9 +44,9 @@
</span><span class="cx"> ASSERT(m_downloads.isEmpty());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-DownloadProxy* DownloadProxyMap::createDownloadProxy(WebContext& webContext, const WebCore::ResourceRequest& resourceRequest)
</del><ins>+DownloadProxy* DownloadProxyMap::createDownloadProxy(WebProcessPool& processPool, const WebCore::ResourceRequest& resourceRequest)
</ins><span class="cx"> {
</span><del>- RefPtr<DownloadProxy> downloadProxy = DownloadProxy::create(*this, webContext, resourceRequest);
</del><ins>+ RefPtr<DownloadProxy> downloadProxy = DownloadProxy::create(*this, processPool, resourceRequest);
</ins><span class="cx"> m_downloads.set(downloadProxy->downloadID(), downloadProxy);
</span><span class="cx">
</span><span class="cx"> m_process->addMessageReceiver(Messages::DownloadProxy::messageReceiverName(), downloadProxy->downloadID(), *downloadProxy);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDownloadsDownloadProxyMaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxyMap.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxyMap.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Downloads/DownloadProxyMap.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx">
</span><span class="cx"> class ChildProcessProxy;
</span><span class="cx"> class DownloadProxy;
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx">
</span><span class="cx"> class DownloadProxyMap {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(DownloadProxyMap);
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> explicit DownloadProxyMap(ChildProcessProxy*);
</span><span class="cx"> ~DownloadProxyMap();
</span><span class="cx">
</span><del>- DownloadProxy* createDownloadProxy(WebContext&, const WebCore::ResourceRequest&);
</del><ins>+ DownloadProxy* createDownloadProxy(WebProcessPool&, const WebCore::ResourceRequest&);
</ins><span class="cx"> void downloadFinished(DownloadProxy*);
</span><span class="cx">
</span><span class="cx"> bool isEmpty() const { return m_downloads.isEmpty(); }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolsCustomProtocolManagerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -41,11 +41,11 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> class ChildProcessProxy;
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx">
</span><span class="cx"> class CustomProtocolManagerProxy : public IPC::MessageReceiver {
</span><span class="cx"> public:
</span><del>- explicit CustomProtocolManagerProxy(ChildProcessProxy*, WebContext&);
</del><ins>+ explicit CustomProtocolManagerProxy(ChildProcessProxy*, WebProcessPool&);
</ins><span class="cx">
</span><span class="cx"> void startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest&);
</span><span class="cx"> void stopLoading(uint64_t customProtocolID);
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) override;
</span><span class="cx">
</span><span class="cx"> ChildProcessProxy* m_childProcessProxy;
</span><del>- WebContext& m_webContext;
</del><ins>+ WebProcessPool& m_processPool;
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> typedef HashMap<uint64_t, RetainPtr<WKCustomProtocolLoader>> LoaderMap;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolsmacCustomProtocolManagerProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -120,9 +120,9 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-CustomProtocolManagerProxy::CustomProtocolManagerProxy(ChildProcessProxy* childProcessProxy, WebContext& webContext)
</del><ins>+CustomProtocolManagerProxy::CustomProtocolManagerProxy(ChildProcessProxy* childProcessProxy, WebProcessPool& processPool)
</ins><span class="cx"> : m_childProcessProxy(childProcessProxy)
</span><del>- , m_webContext(webContext)
</del><ins>+ , m_processPool(processPool)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(m_childProcessProxy);
</span><span class="cx"> m_childProcessProxy->addMessageReceiver(Messages::CustomProtocolManagerProxy::messageReceiverName(), *this);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkNetworkProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -33,8 +33,8 @@
</span><span class="cx"> #include "DownloadProxyMessages.h"
</span><span class="cx"> #include "NetworkProcessCreationParameters.h"
</span><span class="cx"> #include "NetworkProcessMessages.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebProcessMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include <wtf/RunLoop.h>
</span><span class="cx">
</span><span class="cx"> #if ENABLE(SEC_ITEM_SHIM)
</span><span class="lines">@@ -58,15 +58,15 @@
</span><span class="cx"> return ++callbackID;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<NetworkProcessProxy> NetworkProcessProxy::create(WebContext& webContext)
</del><ins>+PassRefPtr<NetworkProcessProxy> NetworkProcessProxy::create(WebProcessPool& processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new NetworkProcessProxy(webContext));
</del><ins>+ return adoptRef(new NetworkProcessProxy(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-NetworkProcessProxy::NetworkProcessProxy(WebContext& webContext)
- : m_webContext(webContext)
</del><ins>+NetworkProcessProxy::NetworkProcessProxy(WebProcessPool& processPool)
+ : m_processPool(processPool)
</ins><span class="cx"> , m_numPendingConnectionRequests(0)
</span><del>- , m_customProtocolManagerProxy(this, webContext)
</del><ins>+ , m_customProtocolManagerProxy(this, processPool)
</ins><span class="cx"> {
</span><span class="cx"> connect();
</span><span class="cx"> }
</span><span class="lines">@@ -112,7 +112,7 @@
</span><span class="cx"> if (!m_downloadProxyMap)
</span><span class="cx"> m_downloadProxyMap = std::make_unique<DownloadProxyMap>(this);
</span><span class="cx">
</span><del>- return m_downloadProxyMap->createDownloadProxy(m_webContext, resourceRequest);
</del><ins>+ return m_downloadProxyMap->createDownloadProxy(m_processPool, resourceRequest);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void NetworkProcessProxy::deleteWebsiteData(WebCore::SessionID sessionID, WebsiteDataTypes dataTypes, std::chrono::system_clock::time_point modifiedSince, std::function<void ()> completionHandler)
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx"> m_pendingDeleteWebsiteDataCallbacks.clear();
</span><span class="cx">
</span><span class="cx"> // Tell the network process manager to forget about this network process proxy. This may cause us to be deleted.
</span><del>- m_webContext.networkProcessCrashed(this);
</del><ins>+ m_processPool.networkProcessCrashed(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void NetworkProcessProxy::didReceiveMessage(IPC::Connection* connection, IPC::MessageDecoder& decoder)
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx"> if (dispatchMessage(connection, decoder))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (m_webContext.dispatchMessage(connection, decoder))
</del><ins>+ if (m_processPool.dispatchMessage(connection, decoder))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> didReceiveNetworkProcessProxyMessage(connection, decoder);
</span><span class="lines">@@ -224,7 +224,7 @@
</span><span class="cx"> m_numPendingConnectionRequests = 0;
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>- if (m_webContext.processSuppressionEnabled())
</del><ins>+ if (m_processPool.processSuppressionEnabled())
</ins><span class="cx"> setProcessSuppressionEnabled(true);
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkNetworkProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -50,12 +50,12 @@
</span><span class="cx">
</span><span class="cx"> class DownloadProxy;
</span><span class="cx"> class DownloadProxyMap;
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx"> struct NetworkProcessCreationParameters;
</span><span class="cx">
</span><span class="cx"> class NetworkProcessProxy : public ChildProcessProxy {
</span><span class="cx"> public:
</span><del>- static PassRefPtr<NetworkProcessProxy> create(WebContext&);
</del><ins>+ static PassRefPtr<NetworkProcessProxy> create(WebProcessPool&);
</ins><span class="cx"> ~NetworkProcessProxy();
</span><span class="cx">
</span><span class="cx"> void getNetworkProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply>);
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- NetworkProcessProxy(WebContext&);
</del><ins>+ NetworkProcessProxy(WebProcessPool&);
</ins><span class="cx">
</span><span class="cx"> // ChildProcessProxy
</span><span class="cx"> virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) override;
</span><span class="lines">@@ -94,7 +94,7 @@
</span><span class="cx"> // ProcessLauncher::Client
</span><span class="cx"> virtual void didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier) override;
</span><span class="cx">
</span><del>- WebContext& m_webContext;
</del><ins>+ WebProcessPool& m_processPool;
</ins><span class="cx">
</span><span class="cx"> unsigned m_numPendingConnectionRequests;
</span><span class="cx"> Deque<RefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply>> m_pendingConnectionReplies;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNotificationsWebNotificationManagerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -29,10 +29,10 @@
</span><span class="cx"> #include "APIArray.h"
</span><span class="cx"> #include "APISecurityOrigin.h"
</span><span class="cx"> #include "ImmutableDictionary.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebNotification.h"
</span><span class="cx"> #include "WebNotificationManagerMessages.h"
</span><span class="cx"> #include "WebPageProxy.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include "WebProcessProxy.h"
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -50,13 +50,13 @@
</span><span class="cx"> return "WebNotificationManagerProxy";
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<WebNotificationManagerProxy> WebNotificationManagerProxy::create(WebContext* context)
</del><ins>+PassRefPtr<WebNotificationManagerProxy> WebNotificationManagerProxy::create(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new WebNotificationManagerProxy(context));
</del><ins>+ return adoptRef(new WebNotificationManagerProxy(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-WebNotificationManagerProxy::WebNotificationManagerProxy(WebContext* context)
- : WebContextSupplement(context)
</del><ins>+WebNotificationManagerProxy::WebNotificationManagerProxy(WebProcessPool* processPool)
+ : WebContextSupplement(processPool)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><span class="cx">
</span><del>-void WebNotificationManagerProxy::contextDestroyed()
</del><ins>+void WebNotificationManagerProxy::processPoolDestroyed()
</ins><span class="cx"> {
</span><span class="cx"> m_provider.removeNotificationManager(this);
</span><span class="cx"> }
</span><span class="lines">@@ -232,15 +232,15 @@
</span><span class="cx">
</span><span class="cx"> void WebNotificationManagerProxy::providerDidUpdateNotificationPolicy(const API::SecurityOrigin* origin, bool allowed)
</span><span class="cx"> {
</span><del>- if (!context())
</del><ins>+ if (!processPool())
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- context()->sendToAllProcesses(Messages::WebNotificationManager::DidUpdateNotificationDecision(origin->securityOrigin().toString(), allowed));
</del><ins>+ processPool()->sendToAllProcesses(Messages::WebNotificationManager::DidUpdateNotificationDecision(origin->securityOrigin().toString(), allowed));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebNotificationManagerProxy::providerDidRemoveNotificationPolicies(API::Array* origins)
</span><span class="cx"> {
</span><del>- if (!context())
</del><ins>+ if (!processPool())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> size_t size = origins->size();
</span><span class="lines">@@ -253,7 +253,7 @@
</span><span class="cx"> for (size_t i = 0; i < size; ++i)
</span><span class="cx"> originStrings.append(origins->at<API::SecurityOrigin>(i)->securityOrigin().toString());
</span><span class="cx">
</span><del>- context()->sendToAllProcesses(Messages::WebNotificationManager::DidRemoveNotificationDecisions(originStrings));
</del><ins>+ processPool()->sendToAllProcesses(Messages::WebNotificationManager::DidRemoveNotificationDecisions(originStrings));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNotificationsWebNotificationManagerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Notifications/WebNotificationManagerProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -42,15 +42,15 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
</del><span class="cx"> class WebPageProxy;
</span><ins>+class WebProcessPool;
</ins><span class="cx">
</span><span class="cx"> class WebNotificationManagerProxy : public API::ObjectImpl<API::Object::Type::NotificationManager>, public WebContextSupplement {
</span><span class="cx"> public:
</span><span class="cx">
</span><span class="cx"> static const char* supplementName();
</span><span class="cx">
</span><del>- static PassRefPtr<WebNotificationManagerProxy> create(WebContext*);
</del><ins>+ static PassRefPtr<WebNotificationManagerProxy> create(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> void initializeProvider(const WKNotificationProviderBase*);
</span><span class="cx"> void populateCopyOfNotificationPermissions(HashMap<String, bool>&);
</span><span class="lines">@@ -71,13 +71,13 @@
</span><span class="cx"> using API::Object::deref;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit WebNotificationManagerProxy(WebContext*);
</del><ins>+ explicit WebNotificationManagerProxy(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> typedef bool (*NotificationFilterFunction)(uint64_t pageID, uint64_t pageNotificationID, uint64_t desiredPageID, const Vector<uint64_t>& desiredPageNotificationIDs);
</span><span class="cx"> void clearNotifications(WebPageProxy*, const Vector<uint64_t>& pageNotificationIDs, NotificationFilterFunction);
</span><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><del>- virtual void contextDestroyed() override;
</del><ins>+ virtual void processPoolDestroyed() override;
</ins><span class="cx"> virtual void refWebContextSupplement() override;
</span><span class="cx"> virtual void derefWebContextSupplement() override;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPluginsPlugInAutoStartProvidercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -28,9 +28,9 @@
</span><span class="cx">
</span><span class="cx"> #include "APIArray.h"
</span><span class="cx"> #include "ImmutableDictionary.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebContextClient.h"
</span><span class="cx"> #include "WebProcessMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -39,8 +39,8 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-PlugInAutoStartProvider::PlugInAutoStartProvider(WebContext* context)
- : m_context(context)
</del><ins>+PlugInAutoStartProvider::PlugInAutoStartProvider(WebProcessPool* processPool)
+ : m_processPool(processPool)
</ins><span class="cx"> {
</span><span class="cx"> m_hashToOriginMap.add(SessionID::defaultSessionID(), HashMap<unsigned, String>());
</span><span class="cx"> m_autoStartTable.add(SessionID::defaultSessionID(), AutoStartTable());
</span><span class="lines">@@ -67,10 +67,10 @@
</span><span class="cx"> it->value.set(plugInOriginHash, expirationTime);
</span><span class="cx"> sessionIterator->value.set(plugInOriginHash, pageOrigin);
</span><span class="cx">
</span><del>- m_context->sendToAllProcesses(Messages::WebProcess::DidAddPlugInAutoStartOriginHash(plugInOriginHash, expirationTime, sessionID));
</del><ins>+ m_processPool->sendToAllProcesses(Messages::WebProcess::DidAddPlugInAutoStartOriginHash(plugInOriginHash, expirationTime, sessionID));
</ins><span class="cx">
</span><span class="cx"> if (!sessionID.isEphemeral())
</span><del>- m_context->client().plugInAutoStartOriginHashesChanged(m_context);
</del><ins>+ m_processPool->client().plugInAutoStartOriginHashesChanged(m_processPool);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> SessionPlugInAutoStartOriginMap PlugInAutoStartProvider::autoStartOriginHashesCopy() const
</span><span class="lines">@@ -154,7 +154,7 @@
</span><span class="cx"> ast.set(strDict.key, hashes);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_context->sendToAllProcesses(Messages::WebProcess::ResetPlugInAutoStartOriginDefaultHashes(hashMap));
</del><ins>+ m_processPool->sendToAllProcesses(Messages::WebProcess::ResetPlugInAutoStartOriginDefaultHashes(hashMap));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PlugInAutoStartProvider::setAutoStartOriginsArray(API::Array& originList)
</span><span class="lines">@@ -184,8 +184,8 @@
</span><span class="cx">
</span><span class="cx"> double newExpirationTime = expirationTimeFromNow();
</span><span class="cx"> m_autoStartTable.add(sessionID, AutoStartTable()).iterator->value.add(it->value, PlugInAutoStartOriginMap()).iterator->value.set(plugInOriginHash, newExpirationTime);
</span><del>- m_context->sendToAllProcesses(Messages::WebProcess::DidAddPlugInAutoStartOriginHash(plugInOriginHash, newExpirationTime, sessionID));
- m_context->client().plugInAutoStartOriginHashesChanged(m_context);
</del><ins>+ m_processPool->sendToAllProcesses(Messages::WebProcess::DidAddPlugInAutoStartOriginHash(plugInOriginHash, newExpirationTime, sessionID));
+ m_processPool->client().plugInAutoStartOriginHashesChanged(m_processPool);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPluginsPlugInAutoStartProviderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #ifndef PlugInAutoStartProvider_h
</span><span class="cx"> #define PlugInAutoStartProvider_h
</span><span class="cx">
</span><del>-#include <WebCore/SessionIDHash.h>
</del><ins>+#include <WebCore/SessionID.h>
</ins><span class="cx"> #include <functional>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> class ImmutableDictionary;
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx">
</span><span class="cx"> typedef HashMap<unsigned, double> PlugInAutoStartOriginMap;
</span><span class="cx"> typedef HashMap<WebCore::SessionID, PlugInAutoStartOriginMap> SessionPlugInAutoStartOriginMap;
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> class PlugInAutoStartProvider {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(PlugInAutoStartProvider);
</span><span class="cx"> public:
</span><del>- explicit PlugInAutoStartProvider(WebContext*);
</del><ins>+ explicit PlugInAutoStartProvider(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> void addAutoStartOriginHash(const String& pageOrigin, unsigned plugInOriginHash, WebCore::SessionID);
</span><span class="cx"> void didReceiveUserInteraction(unsigned plugInOriginHash, WebCore::SessionID);
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> const PlugInAutoStartOrigins& autoStartOrigins() const { return m_autoStartOrigins; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- WebContext* m_context;
</del><ins>+ WebProcessPool* m_processPool;
</ins><span class="cx">
</span><span class="cx"> void setAutoStartOriginsTableWithItemsPassingTest(ImmutableDictionary&, std::function<bool(double expirationTimestamp)>);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPluginsPluginProcessManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessManager.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx">
</span><span class="cx"> #include "PluginProcessProxy.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include <wtf/CryptographicallyRandomNumber.h>
</span><span class="cx"> #include <wtf/StdLibExtras.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPluginsPluginProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -32,9 +32,9 @@
</span><span class="cx"> #include "PluginProcessCreationParameters.h"
</span><span class="cx"> #include "PluginProcessManager.h"
</span><span class="cx"> #include "PluginProcessMessages.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><span class="cx"> #include "WebPluginSiteDataManager.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include "WebProcessProxy.h"
</span><span class="cx"> #include <WebCore/NotImplemented.h>
</span><span class="cx"> #include <wtf/RunLoop.h>
</span><span class="lines">@@ -166,9 +166,9 @@
</span><span class="cx"> exitFullscreen();
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- const Vector<WebContext*>& contexts = WebContext::allContexts();
- for (size_t i = 0; i < contexts.size(); ++i)
- contexts[i]->sendToAllProcesses(Messages::PluginProcessConnectionManager::PluginProcessCrashed(m_pluginProcessToken));
</del><ins>+ const Vector<WebProcessPool*>& processPools = WebProcessPool::allProcessPools();
+ for (size_t i = 0; i < processPools.size(); ++i)
+ processPools[i]->sendToAllProcesses(Messages::PluginProcessConnectionManager::PluginProcessCrashed(m_pluginProcessToken));
</ins><span class="cx">
</span><span class="cx"> // This will cause us to be deleted.
</span><span class="cx"> pluginProcessCrashedOrFailedToLaunch();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPluginsWebPluginSiteDataManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -30,8 +30,8 @@
</span><span class="cx">
</span><span class="cx"> #include "APIArray.h"
</span><span class="cx"> #include "PluginProcessManager.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebProcessMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> explicit GetSitesWithDataState(WebPluginSiteDataManager* webPluginSiteDataManager, uint64_t callbackID)
</span><span class="cx"> : m_webPluginSiteDataManager(webPluginSiteDataManager)
</span><span class="cx"> , m_callbackID(callbackID)
</span><del>- , m_plugins(webPluginSiteDataManager->m_webContext->pluginInfoStore().plugins())
</del><ins>+ , m_plugins(webPluginSiteDataManager->m_processPool->pluginInfoStore().plugins())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> , m_flags(flags)
</span><span class="cx"> , m_maxAgeInSeconds(maxAgeInSeconds)
</span><span class="cx"> , m_callbackID(callbackID)
</span><del>- , m_plugins(webPluginSiteDataManager->m_webContext->pluginInfoStore().plugins())
</del><ins>+ , m_plugins(webPluginSiteDataManager->m_processPool->pluginInfoStore().plugins())
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -112,13 +112,13 @@
</span><span class="cx"> Vector<PluginModuleInfo> m_plugins;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-PassRefPtr<WebPluginSiteDataManager> WebPluginSiteDataManager::create(WebContext* webContext)
</del><ins>+PassRefPtr<WebPluginSiteDataManager> WebPluginSiteDataManager::create(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new WebPluginSiteDataManager(webContext));
</del><ins>+ return adoptRef(new WebPluginSiteDataManager(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-WebPluginSiteDataManager::WebPluginSiteDataManager(WebContext* webContext)
- : m_webContext(webContext)
</del><ins>+WebPluginSiteDataManager::WebPluginSiteDataManager(WebProcessPool* processPool)
+ : m_processPool(processPool)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<ArrayCallback> callback = ArrayCallback::create(WTF::move(callbackFunction));
</span><span class="cx">
</span><del>- if (!m_webContext) {
</del><ins>+ if (!m_processPool) {
</ins><span class="cx"> callback->invalidate();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -171,7 +171,7 @@
</span><span class="cx"> void WebPluginSiteDataManager::clearSiteData(API::Array* sites, uint64_t flags, uint64_t maxAgeInSeconds, std::function<void (CallbackBase::Error)> callbackFunction)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<VoidCallback> callback = VoidCallback::create(WTF::move(callbackFunction));
</span><del>- if (!m_webContext) {
</del><ins>+ if (!m_processPool) {
</ins><span class="cx"> // FIXME: If the context is invalid we should not call the callback. It'd be better to just return false from clearSiteData.
</span><span class="cx"> callback->invalidate(CallbackBase::Error::OwnerWasInvalidated);
</span><span class="cx"> return;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPluginsWebPluginSiteDataManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/Plugins/WebPluginSiteDataManager.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -37,18 +37,18 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx"> class WebProcessProxy;
</span><span class="cx">
</span><span class="cx"> typedef GenericCallback<API::Array*> ArrayCallback;
</span><span class="cx">
</span><span class="cx"> class WebPluginSiteDataManager : public API::ObjectImpl<API::Object::Type::PluginSiteDataManager> {
</span><span class="cx"> public:
</span><del>- static PassRefPtr<WebPluginSiteDataManager> create(WebContext*);
</del><ins>+ static PassRefPtr<WebPluginSiteDataManager> create(WebProcessPool*);
</ins><span class="cx"> virtual ~WebPluginSiteDataManager();
</span><span class="cx">
</span><span class="cx"> void invalidate();
</span><del>- void clearContext() { m_webContext = 0; }
</del><ins>+ void clearProcessPool() { m_processPool = nullptr; }
</ins><span class="cx">
</span><span class="cx"> void getSitesWithData(std::function<void (API::Array*, CallbackBase::Error)>);
</span><span class="cx"> void didGetSitesWithData(const Vector<String>& sites, uint64_t callbackID);
</span><span class="lines">@@ -60,9 +60,9 @@
</span><span class="cx"> void didClearSiteDataForSinglePlugin(uint64_t callbackID);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit WebPluginSiteDataManager(WebContext*);
</del><ins>+ explicit WebPluginSiteDataManager(WebProcessPool*);
</ins><span class="cx">
</span><del>- WebContext* m_webContext;
</del><ins>+ WebProcessPool* m_processPool;
</ins><span class="cx"> HashMap<uint64_t, RefPtr<ArrayCallback>> m_arrayCallbacks;
</span><span class="cx"> HashMap<uint64_t, RefPtr<VoidCallback>> m_voidCallbacks;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessVisitedLinkProvidercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -30,8 +30,9 @@
</span><span class="cx"> #include "VisitedLinkProviderMessages.h"
</span><span class="cx"> #include "VisitedLinkTable.h"
</span><span class="cx"> #include "VisitedLinkTableControllerMessages.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebProcessMessages.h"
</span><ins>+#include "WebProcessPool.h"
+#include "WebProcessProxy.h"
</ins><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="lines">@@ -99,7 +100,7 @@
</span><span class="cx"> m_table.clear();
</span><span class="cx">
</span><span class="cx"> for (WebProcessProxy* process : m_processes) {
</span><del>- ASSERT(process->context().processes().contains(process));
</del><ins>+ ASSERT(process->processPool().processes().contains(process));
</ins><span class="cx"> process->connection()->send(Messages::VisitedLinkTableController::RemoveAllVisitedLinks(), m_identifier);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -178,7 +179,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> for (WebProcessProxy* process : m_processes) {
</span><del>- ASSERT(process->context().processes().contains(process));
</del><ins>+ ASSERT(process->processPool().processes().contains(process));
</ins><span class="cx">
</span><span class="cx"> if (addedVisitedLinks.size() > 20)
</span><span class="cx"> process->connection()->send(Messages::VisitedLinkTableController::AllVisitedLinkStateChanged(), m_identifier);
</span><span class="lines">@@ -234,7 +235,7 @@
</span><span class="cx">
</span><span class="cx"> void VisitedLinkProvider::sendTable(WebProcessProxy& process)
</span><span class="cx"> {
</span><del>- ASSERT(process.context().processes().contains(&process));
</del><ins>+ ASSERT(process.processPool().processes().contains(&process));
</ins><span class="cx">
</span><span class="cx"> SharedMemory::Handle handle;
</span><span class="cx"> if (!m_table.sharedMemory()->createHandle(handle, SharedMemory::ReadOnly))
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessVisitedLinkProviderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/VisitedLinkProvider.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
</del><span class="cx"> class WebPageProxy;
</span><span class="cx"> class WebProcessProxy;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebApplicationCacheManagerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> #include "SecurityOriginData.h"
</span><span class="cx"> #include "WebApplicationCacheManagerMessages.h"
</span><span class="cx"> #include "WebApplicationCacheManagerProxyMessages.h"
</span><del>-#include "WebContext.h"
</del><ins>+#include "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="lines">@@ -39,15 +39,15 @@
</span><span class="cx"> return "WebApplicationCacheManagerProxy";
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<WebApplicationCacheManagerProxy> WebApplicationCacheManagerProxy::create(WebContext* context)
</del><ins>+PassRefPtr<WebApplicationCacheManagerProxy> WebApplicationCacheManagerProxy::create(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new WebApplicationCacheManagerProxy(context));
</del><ins>+ return adoptRef(new WebApplicationCacheManagerProxy(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy(WebContext* context)
- : WebContextSupplement(context)
</del><ins>+WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy(WebProcessPool* processPool)
+ : WebContextSupplement(processPool)
</ins><span class="cx"> {
</span><del>- context->addMessageReceiver(Messages::WebApplicationCacheManagerProxy::messageReceiverName(), *this);
</del><ins>+ processPool->addMessageReceiver(Messages::WebApplicationCacheManagerProxy::messageReceiverName(), *this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebApplicationCacheManagerProxy::~WebApplicationCacheManagerProxy()
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-void WebApplicationCacheManagerProxy::contextDestroyed()
</del><ins>+void WebApplicationCacheManagerProxy::processPoolDestroyed()
</ins><span class="cx"> {
</span><span class="cx"> invalidateCallbackMap(m_arrayCallbacks, CallbackBase::Error::OwnerWasInvalidated);
</span><span class="cx"> }
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx"> {
</span><span class="cx"> RefPtr<ArrayCallback> callback = ArrayCallback::create(WTF::move(callbackFunction));
</span><span class="cx">
</span><del>- if (!context()) {
</del><ins>+ if (!processPool()) {
</ins><span class="cx"> callback->invalidate();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx"> m_arrayCallbacks.set(callbackID, callback.release());
</span><span class="cx">
</span><span class="cx"> // FIXME (Multi-WebProcess): <rdar://problem/12239765> Make manipulating cache information work with per-tab WebProcess.
</span><del>- context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebApplicationCacheManager::GetApplicationCacheOrigins(callbackID));
</del><ins>+ processPool()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebApplicationCacheManager::GetApplicationCacheOrigins(callbackID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebApplicationCacheManagerProxy::didGetApplicationCacheOrigins(const Vector<SecurityOriginData>& originDatas, uint64_t callbackID)
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx">
</span><span class="cx"> void WebApplicationCacheManagerProxy::deleteEntriesForOrigin(API::SecurityOrigin* origin)
</span><span class="cx"> {
</span><del>- if (!context())
</del><ins>+ if (!processPool())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> SecurityOriginData securityOriginData;
</span><span class="lines">@@ -113,16 +113,16 @@
</span><span class="cx"> securityOriginData.port = origin->securityOrigin().port();
</span><span class="cx">
</span><span class="cx"> // FIXME (Multi-WebProcess): <rdar://problem/12239765> Make manipulating cache information work with per-tab WebProcess.
</span><del>- context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebApplicationCacheManager::DeleteEntriesForOrigin(securityOriginData));
</del><ins>+ processPool()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebApplicationCacheManager::DeleteEntriesForOrigin(securityOriginData));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebApplicationCacheManagerProxy::deleteAllEntries()
</span><span class="cx"> {
</span><del>- if (!context())
</del><ins>+ if (!processPool())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // FIXME (Multi-WebProcess): <rdar://problem/12239765> Make manipulating cache information work with per-tab WebProcess.
</span><del>- context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebApplicationCacheManager::DeleteAllEntries());
</del><ins>+ processPool()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebApplicationCacheManager::DeleteAllEntries());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebApplicationCacheManagerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebApplicationCacheManagerProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><ins>+class WebProcessPool;
</ins><span class="cx"> struct SecurityOriginData;
</span><span class="cx">
</span><span class="cx"> typedef GenericCallback<API::Array*> ArrayCallback;
</span><span class="lines">@@ -48,7 +49,7 @@
</span><span class="cx"> public:
</span><span class="cx"> static const char* supplementName();
</span><span class="cx">
</span><del>- static PassRefPtr<WebApplicationCacheManagerProxy> create(WebContext*);
</del><ins>+ static PassRefPtr<WebApplicationCacheManagerProxy> create(WebProcessPool*);
</ins><span class="cx"> virtual ~WebApplicationCacheManagerProxy();
</span><span class="cx">
</span><span class="cx"> void getApplicationCacheOrigins(std::function<void (API::Array*, CallbackBase::Error)>);
</span><span class="lines">@@ -59,12 +60,12 @@
</span><span class="cx"> using API::Object::deref;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit WebApplicationCacheManagerProxy(WebContext*);
</del><ins>+ explicit WebApplicationCacheManagerProxy(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> void didGetApplicationCacheOrigins(const Vector<SecurityOriginData>&, uint64_t callbackID);
</span><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><del>- virtual void contextDestroyed() override;
</del><ins>+ virtual void processPoolDestroyed() override;
</ins><span class="cx"> virtual void processDidClose(WebProcessProxy*) override;
</span><span class="cx"> virtual bool shouldTerminate(WebProcessProxy*) const override;
</span><span class="cx"> virtual void refWebContextSupplement() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/WebContext.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -1,1496 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebContext.h"
-
-#include "APIArray.h"
-#include "APIDownloadClient.h"
-#include "APILegacyContextHistoryClient.h"
-#include "CustomProtocolManagerMessages.h"
-#include "DownloadProxy.h"
-#include "DownloadProxyMessages.h"
-#include "Logging.h"
-#include "MutableDictionary.h"
-#include "SandboxExtension.h"
-#include "StatisticsData.h"
-#include "TextChecker.h"
-#include "WKContextPrivate.h"
-#include "WebApplicationCacheManagerProxy.h"
-#include "WebContextMessageKinds.h"
-#include "WebContextMessages.h"
-#include "WebContextSupplement.h"
-#include "WebContextUserMessageCoders.h"
-#include "WebCookieManagerProxy.h"
-#include "WebCoreArgumentCoders.h"
-#include "WebDatabaseManagerProxy.h"
-#include "WebGeolocationManagerProxy.h"
-#include "WebIconDatabase.h"
-#include "WebKeyValueStorageManager.h"
-#include "WebKit2Initialize.h"
-#include "WebMediaCacheManagerProxy.h"
-#include "WebNotificationManagerProxy.h"
-#include "WebPluginSiteDataManager.h"
-#include "WebPageGroup.h"
-#include "WebPreferences.h"
-#include "WebMemorySampler.h"
-#include "WebProcessCreationParameters.h"
-#include "WebProcessMessages.h"
-#include "WebProcessProxy.h"
-#include "WebResourceCacheManagerProxy.h"
-#include "WebsiteDataStore.h"
-#include <WebCore/ApplicationCacheStorage.h>
-#include <WebCore/Language.h>
-#include <WebCore/LinkHash.h>
-#include <WebCore/Logging.h>
-#include <WebCore/ResourceRequest.h>
-#include <WebCore/SessionID.h>
-#include <runtime/JSCInlines.h>
-#include <wtf/CurrentTime.h>
-#include <wtf/MainThread.h>
-#include <wtf/NeverDestroyed.h>
-#include <wtf/RunLoop.h>
-
-#if ENABLE(BATTERY_STATUS)
-#include "WebBatteryManagerProxy.h"
-#endif
-
-#if ENABLE(DATABASE_PROCESS)
-#include "DatabaseProcessCreationParameters.h"
-#include "DatabaseProcessMessages.h"
-#include "WebOriginDataManagerProxy.h"
-#endif
-
-#if ENABLE(NETWORK_PROCESS)
-#include "NetworkProcessCreationParameters.h"
-#include "NetworkProcessMessages.h"
-#include "NetworkProcessProxy.h"
-#endif
-
-#if ENABLE(SERVICE_CONTROLS)
-#include "ServicesController.h"
-#endif
-
-#if ENABLE(REMOTE_INSPECTOR)
-#include <JavaScriptCore/RemoteInspector.h>
-#endif
-
-#if USE(SOUP)
-#include "WebSoupCustomProtocolRequestManager.h"
-#endif
-
-#ifndef NDEBUG
-#include <wtf/RefCountedLeakCounter.h>
-#endif
-
-using namespace WebCore;
-
-namespace WebKit {
-
-static const double sharedSecondaryProcessShutdownTimeout = 60;
-
-DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, webContextCounter, ("WebContext"));
-
-void WebContext::applyPlatformSpecificConfigurationDefaults(WebContextConfiguration& configuration)
-{
- // FIXME: This function should not be needed; all ports should make sure that the configuration has the right
- // values, and then we should get rid of the platform specific defaults inside WebContext.
-
- if (!configuration.localStorageDirectory)
- configuration.localStorageDirectory = platformDefaultLocalStorageDirectory();
-
- if (!configuration.webSQLDatabaseDirectory)
- configuration.webSQLDatabaseDirectory = platformDefaultWebSQLDatabaseDirectory();
-
- // *********
- // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (<rdar://problem/17454712>)
- // *********
- if (!configuration.indexedDBDatabaseDirectory)
- configuration.indexedDBDatabaseDirectory = platformDefaultIndexedDBDatabaseDirectory();
-
- if (!configuration.mediaKeysStorageDirectory)
- configuration.mediaKeysStorageDirectory = platformDefaultMediaKeysStorageDirectory();
-}
-
-PassRefPtr<WebContext> WebContext::create(WebContextConfiguration configuration)
-{
- InitializeWebKit2();
- return adoptRef(new WebContext(WTF::move(configuration)));
-}
-
-static Vector<WebContext*>& contexts()
-{
- static NeverDestroyed<Vector<WebContext*>> contexts;
- return contexts;
-}
-
-const Vector<WebContext*>& WebContext::allContexts()
-{
- return contexts();
-}
-
-static WebsiteDataStore::Configuration websiteDataStoreConfiguration()
-{
- WebsiteDataStore::Configuration configuration;
-
- // FIXME: Fill in the configuration.
- return configuration;
-}
-
-WebContext::WebContext(WebContextConfiguration configuration)
- : m_processModel(ProcessModelSharedSecondaryProcess)
- , m_webProcessCountLimit(UINT_MAX)
- , m_haveInitialEmptyProcess(false)
- , m_processWithPageCache(0)
- , m_defaultPageGroup(WebPageGroup::createNonNull())
- , m_injectedBundlePath(configuration.injectedBundlePath)
- , m_downloadClient(std::make_unique<API::DownloadClient>())
- , m_historyClient(std::make_unique<API::LegacyContextHistoryClient>())
- , m_visitedLinkProvider(VisitedLinkProvider::create())
- , m_visitedLinksPopulated(false)
- , m_plugInAutoStartProvider(this)
- , m_alwaysUsesComplexTextCodePath(false)
- , m_shouldUseFontSmoothing(true)
- , m_cacheModel(CacheModelDocumentViewer)
- , m_memorySamplerEnabled(false)
- , m_memorySamplerInterval(1400.0)
- , m_websiteDataStore(WebsiteDataStore::create(websiteDataStoreConfiguration()))
- , m_storageManager(StorageManager::create(configuration.localStorageDirectory))
-#if USE(SOUP)
- , m_initialHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicyOnlyFromMainDocumentDomain)
-#endif
- , m_webSQLDatabaseDirectory(WTF::move(configuration.webSQLDatabaseDirectory))
- , m_indexedDBDatabaseDirectory(WTF::move(configuration.indexedDBDatabaseDirectory))
- , m_mediaKeysStorageDirectory(WTF::move(configuration.mediaKeysStorageDirectory))
- , m_shouldUseTestingNetworkSession(false)
- , m_processTerminationEnabled(true)
-#if ENABLE(NETWORK_PROCESS)
- , m_canHandleHTTPSServerTrustEvaluation(true)
- , m_usesNetworkProcess(false)
-#endif
-#if USE(SOUP)
- , m_ignoreTLSErrors(true)
-#endif
- , m_memoryCacheDisabled(false)
- , m_userObservablePageCounter([this](bool) { updateProcessSuppressionState(); })
- , m_processSuppressionDisabledForPageCounter([this](bool) { updateProcessSuppressionState(); })
-{
- platformInitialize();
-
- addMessageReceiver(Messages::WebContext::messageReceiverName(), *this);
- addMessageReceiver(WebContextLegacyMessages::messageReceiverName(), *this);
-
- // NOTE: These sub-objects must be initialized after m_messageReceiverMap..
- m_iconDatabase = WebIconDatabase::create(this);
-#if ENABLE(NETSCAPE_PLUGIN_API)
- m_pluginSiteDataManager = WebPluginSiteDataManager::create(this);
-#endif // ENABLE(NETSCAPE_PLUGIN_API)
-
- addSupplement<WebApplicationCacheManagerProxy>();
- addSupplement<WebCookieManagerProxy>();
- addSupplement<WebGeolocationManagerProxy>();
- addSupplement<WebKeyValueStorageManager>();
- addSupplement<WebMediaCacheManagerProxy>();
- addSupplement<WebNotificationManagerProxy>();
- addSupplement<WebResourceCacheManagerProxy>();
-#if ENABLE(SQL_DATABASE)
- addSupplement<WebDatabaseManagerProxy>();
-#endif
-#if USE(SOUP)
- addSupplement<WebSoupCustomProtocolRequestManager>();
-#endif
-#if ENABLE(BATTERY_STATUS)
- addSupplement<WebBatteryManagerProxy>();
-#endif
-#if ENABLE(DATABASE_PROCESS)
- addSupplement<WebOriginDataManagerProxy>();
-#endif
-
- contexts().append(this);
-
- addLanguageChangeObserver(this, languageChanged);
-
-#if !LOG_DISABLED
- WebCore::initializeLoggingChannelsIfNecessary();
- WebKit::initializeLogChannelsIfNecessary();
-#endif // !LOG_DISABLED
-
-#if ENABLE(NETSCAPE_PLUGIN_API)
- m_pluginInfoStore.setClient(this);
-#endif
-
-#ifndef NDEBUG
- webContextCounter.increment();
-#endif
-}
-
-#if !PLATFORM(COCOA)
-void WebContext::platformInitialize()
-{
-}
-#endif
-
-WebContext::~WebContext()
-{
- ASSERT(contexts().find(this) != notFound);
- contexts().remove(contexts().find(this));
-
- removeLanguageChangeObserver(this);
-
- m_messageReceiverMap.invalidate();
-
- WebContextSupplementMap::const_iterator it = m_supplements.begin();
- WebContextSupplementMap::const_iterator end = m_supplements.end();
- for (; it != end; ++it) {
- it->value->contextDestroyed();
- it->value->clearContext();
- }
-
- m_iconDatabase->invalidate();
- m_iconDatabase->clearContext();
- WebIconDatabase* rawIconDatabase = m_iconDatabase.release().leakRef();
- rawIconDatabase->derefWhenAppropriate();
-
-#if ENABLE(NETSCAPE_PLUGIN_API)
- m_pluginSiteDataManager->invalidate();
- m_pluginSiteDataManager->clearContext();
-#endif
-
- invalidateCallbackMap(m_dictionaryCallbacks, CallbackBase::Error::OwnerWasInvalidated);
-
- platformInvalidateContext();
-
-#if ENABLE(NETSCAPE_PLUGIN_API)
- m_pluginInfoStore.setClient(0);
-#endif
-
-#ifndef NDEBUG
- webContextCounter.decrement();
-#endif
-}
-
-void WebContext::initializeClient(const WKContextClientBase* client)
-{
- m_client.initialize(client);
-}
-
-void WebContext::initializeInjectedBundleClient(const WKContextInjectedBundleClientBase* client)
-{
- m_injectedBundleClient.initialize(client);
-}
-
-void WebContext::initializeConnectionClient(const WKContextConnectionClientBase* client)
-{
- m_connectionClient.initialize(client);
-}
-
-void WebContext::setHistoryClient(std::unique_ptr<API::LegacyContextHistoryClient> historyClient)
-{
- if (!historyClient)
- m_historyClient = std::make_unique<API::LegacyContextHistoryClient>();
- else
- m_historyClient = WTF::move(historyClient);
-}
-
-void WebContext::setDownloadClient(std::unique_ptr<API::DownloadClient> downloadClient)
-{
- if (!downloadClient)
- m_downloadClient = std::make_unique<API::DownloadClient>();
- else
- m_downloadClient = WTF::move(downloadClient);
-}
-
-void WebContext::setProcessModel(ProcessModel processModel)
-{
- // Guard against API misuse.
- if (!m_processes.isEmpty())
- CRASH();
- if (processModel != ProcessModelSharedSecondaryProcess && !m_messagesToInjectedBundlePostedToEmptyContext.isEmpty())
- CRASH();
-
- m_processModel = processModel;
-}
-
-void WebContext::setMaximumNumberOfProcesses(unsigned maximumNumberOfProcesses)
-{
- // Guard against API misuse.
- if (!m_processes.isEmpty())
- CRASH();
-
- if (maximumNumberOfProcesses == 0)
- m_webProcessCountLimit = UINT_MAX;
- else
- m_webProcessCountLimit = maximumNumberOfProcesses;
-}
-
-IPC::Connection* WebContext::networkingProcessConnection()
-{
- switch (m_processModel) {
- case ProcessModelSharedSecondaryProcess:
-#if ENABLE(NETWORK_PROCESS)
- if (m_usesNetworkProcess)
- return m_networkProcess->connection();
-#endif
- return m_processes[0]->connection();
- case ProcessModelMultipleSecondaryProcesses:
-#if ENABLE(NETWORK_PROCESS)
- ASSERT(m_usesNetworkProcess);
- return m_networkProcess->connection();
-#else
- break;
-#endif
- }
- ASSERT_NOT_REACHED();
- return 0;
-}
-
-void WebContext::languageChanged(void* context)
-{
- static_cast<WebContext*>(context)->languageChanged();
-}
-
-void WebContext::languageChanged()
-{
- sendToAllProcesses(Messages::WebProcess::UserPreferredLanguagesChanged(userPreferredLanguages()));
-#if USE(SOUP) && ENABLE(NETWORK_PROCESS)
- if (m_usesNetworkProcess && m_networkProcess)
- m_networkProcess->send(Messages::NetworkProcess::UserPreferredLanguagesChanged(userPreferredLanguages()), 0);
-#endif
-}
-
-void WebContext::fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled)
-{
- sendToAllProcesses(Messages::WebProcess::FullKeyboardAccessModeChanged(fullKeyboardAccessEnabled));
-}
-
-void WebContext::textCheckerStateChanged()
-{
- sendToAllProcesses(Messages::WebProcess::SetTextCheckerState(TextChecker::state()));
-}
-
-void WebContext::setUsesNetworkProcess(bool usesNetworkProcess)
-{
-#if ENABLE(NETWORK_PROCESS)
- m_usesNetworkProcess = usesNetworkProcess;
-#else
- UNUSED_PARAM(usesNetworkProcess);
-#endif
-}
-
-bool WebContext::usesNetworkProcess() const
-{
-#if ENABLE(NETWORK_PROCESS)
- return m_usesNetworkProcess;
-#else
- return false;
-#endif
-}
-
-#if ENABLE(NETWORK_PROCESS)
-void WebContext::ensureNetworkProcess()
-{
- if (m_networkProcess)
- return;
-
- m_networkProcess = NetworkProcessProxy::create(*this);
-
- NetworkProcessCreationParameters parameters;
-
- parameters.privateBrowsingEnabled = WebPreferences::anyPagesAreUsingPrivateBrowsing();
-
- parameters.cacheModel = m_cacheModel;
- parameters.canHandleHTTPSServerTrustEvaluation = m_canHandleHTTPSServerTrustEvaluation;
-
- parameters.diskCacheDirectory = stringByResolvingSymlinksInPath(diskCacheDirectory());
- if (!parameters.diskCacheDirectory.isEmpty())
- SandboxExtension::createHandleForReadWriteDirectory(parameters.diskCacheDirectory, parameters.diskCacheDirectoryExtensionHandle);
-
- parameters.cookieStorageDirectory = cookieStorageDirectory();
-
-#if PLATFORM(IOS)
- if (!parameters.cookieStorageDirectory.isEmpty())
- SandboxExtension::createHandleForReadWriteDirectory(parameters.cookieStorageDirectory, parameters.cookieStorageDirectoryExtensionHandle);
-
- String hstsDatabasePath = networkingHSTSDatabasePath();
- if (!hstsDatabasePath.isEmpty())
- SandboxExtension::createHandle(hstsDatabasePath, SandboxExtension::ReadWrite, parameters.hstsDatabasePathExtensionHandle);
-
- String parentBundleDirectory = this->parentBundleDirectory();
- if (!parentBundleDirectory.isEmpty())
- SandboxExtension::createHandle(parentBundleDirectory, SandboxExtension::ReadOnly, parameters.parentBundleDirectoryExtensionHandle);
-#endif
-
- parameters.shouldUseTestingNetworkSession = m_shouldUseTestingNetworkSession;
-
- // Add any platform specific parameters
- platformInitializeNetworkProcess(parameters);
-
- // Initialize the network process.
- m_networkProcess->send(Messages::NetworkProcess::InitializeNetworkProcess(parameters), 0);
-
-#if PLATFORM(COCOA)
- m_networkProcess->send(Messages::NetworkProcess::SetQOS(networkProcessLatencyQOS(), networkProcessThroughputQOS()), 0);
-#endif
-}
-
-void WebContext::networkProcessCrashed(NetworkProcessProxy* networkProcessProxy)
-{
- ASSERT(m_networkProcess);
- ASSERT(networkProcessProxy == m_networkProcess.get());
-
- WebContextSupplementMap::const_iterator it = m_supplements.begin();
- WebContextSupplementMap::const_iterator end = m_supplements.end();
- for (; it != end; ++it)
- it->value->processDidClose(networkProcessProxy);
-
- m_networkProcess = nullptr;
-
- m_client.networkProcessDidCrash(this);
-}
-
-void WebContext::getNetworkProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply> reply)
-{
- ASSERT(reply);
-
- ensureNetworkProcess();
- ASSERT(m_networkProcess);
-
- m_networkProcess->getNetworkProcessConnection(reply);
-}
-#endif
-
-#if ENABLE(DATABASE_PROCESS)
-void WebContext::ensureDatabaseProcess()
-{
- if (m_databaseProcess)
- return;
-
- m_databaseProcess = DatabaseProcessProxy::create(this);
-
- ASSERT(!m_indexedDBDatabaseDirectory.isEmpty());
-
- // *********
- // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (<rdar://problem/17454712>)
- // *********
- DatabaseProcessCreationParameters parameters;
- parameters.indexedDatabaseDirectory = m_indexedDBDatabaseDirectory;
-
- SandboxExtension::createHandleForReadWriteDirectory(parameters.indexedDatabaseDirectory, parameters.indexedDatabaseDirectoryExtensionHandle);
-
- m_databaseProcess->send(Messages::DatabaseProcess::InitializeDatabaseProcess(parameters), 0);
-}
-
-void WebContext::getDatabaseProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetDatabaseProcessConnection::DelayedReply> reply)
-{
- ASSERT(reply);
-
- ensureDatabaseProcess();
-
- m_databaseProcess->getDatabaseProcessConnection(reply);
-}
-
-void WebContext::databaseProcessCrashed(DatabaseProcessProxy* databaseProcessProxy)
-{
- ASSERT(m_databaseProcess);
- ASSERT(databaseProcessProxy == m_databaseProcess.get());
-
- for (auto& supplement : m_supplements)
- supplement.value->processDidClose(databaseProcessProxy);
-
- m_databaseProcess = nullptr;
-}
-#endif
-
-void WebContext::willStartUsingPrivateBrowsing()
-{
- const Vector<WebContext*>& contexts = allContexts();
- for (size_t i = 0, count = contexts.size(); i < count; ++i)
- contexts[i]->setAnyPageGroupMightHavePrivateBrowsingEnabled(true);
-}
-
-void WebContext::willStopUsingPrivateBrowsing()
-{
- const Vector<WebContext*>& contexts = allContexts();
- for (size_t i = 0, count = contexts.size(); i < count; ++i)
- contexts[i]->setAnyPageGroupMightHavePrivateBrowsingEnabled(false);
-}
-
-void WebContext::windowServerConnectionStateChanged()
-{
- size_t processCount = m_processes.size();
- for (size_t i = 0; i < processCount; ++i)
- m_processes[i]->windowServerConnectionStateChanged();
-}
-
-void WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled(bool privateBrowsingEnabled)
-{
- m_iconDatabase->setPrivateBrowsingEnabled(privateBrowsingEnabled);
-
-#if ENABLE(NETWORK_PROCESS)
- if (usesNetworkProcess() && networkProcess()) {
- if (privateBrowsingEnabled)
- networkProcess()->send(Messages::NetworkProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID()), 0);
- else
- networkProcess()->send(Messages::NetworkProcess::DestroyPrivateBrowsingSession(SessionID::legacyPrivateSessionID()), 0);
- }
-#endif // ENABLED(NETWORK_PROCESS)
-
- if (privateBrowsingEnabled)
- sendToAllProcesses(Messages::WebProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID()));
- else
- sendToAllProcesses(Messages::WebProcess::DestroyPrivateBrowsingSession(SessionID::legacyPrivateSessionID()));
-}
-
-void (*s_invalidMessageCallback)(WKStringRef messageName);
-
-void WebContext::setInvalidMessageCallback(void (*invalidMessageCallback)(WKStringRef messageName))
-{
- s_invalidMessageCallback = invalidMessageCallback;
-}
-
-void WebContext::didReceiveInvalidMessage(const IPC::StringReference& messageReceiverName, const IPC::StringReference& messageName)
-{
- if (!s_invalidMessageCallback)
- return;
-
- StringBuilder messageNameStringBuilder;
- messageNameStringBuilder.append(messageReceiverName.data(), messageReceiverName.size());
- messageNameStringBuilder.append(".");
- messageNameStringBuilder.append(messageName.data(), messageName.size());
-
- s_invalidMessageCallback(toAPI(API::String::create(messageNameStringBuilder.toString()).get()));
-}
-
-void WebContext::processDidCachePage(WebProcessProxy* process)
-{
- if (m_processWithPageCache && m_processWithPageCache != process)
- m_processWithPageCache->releasePageCache();
- m_processWithPageCache = process;
-}
-
-WebProcessProxy& WebContext::ensureSharedWebProcess()
-{
- ASSERT(m_processModel == ProcessModelSharedSecondaryProcess);
- if (m_processes.isEmpty())
- createNewWebProcess();
- return *m_processes[0];
-}
-
-WebProcessProxy& WebContext::createNewWebProcess()
-{
-#if ENABLE(NETWORK_PROCESS)
- if (m_usesNetworkProcess)
- ensureNetworkProcess();
-#endif
-
- Ref<WebProcessProxy> process = WebProcessProxy::create(*this);
-
- WebProcessCreationParameters parameters;
-
- parameters.injectedBundlePath = injectedBundlePath();
- if (!parameters.injectedBundlePath.isEmpty())
- SandboxExtension::createHandle(parameters.injectedBundlePath, SandboxExtension::ReadOnly, parameters.injectedBundlePathExtensionHandle);
-
- parameters.applicationCacheDirectory = applicationCacheDirectory();
- if (!parameters.applicationCacheDirectory.isEmpty())
- SandboxExtension::createHandleForReadWriteDirectory(parameters.applicationCacheDirectory, parameters.applicationCacheDirectoryExtensionHandle);
-
- parameters.webSQLDatabaseDirectory = m_webSQLDatabaseDirectory;
- if (!parameters.webSQLDatabaseDirectory.isEmpty())
- SandboxExtension::createHandleForReadWriteDirectory(parameters.webSQLDatabaseDirectory, parameters.webSQLDatabaseDirectoryExtensionHandle);
-
- parameters.diskCacheDirectory = diskCacheDirectory();
- if (!parameters.diskCacheDirectory.isEmpty())
- SandboxExtension::createHandleForReadWriteDirectory(parameters.diskCacheDirectory, parameters.diskCacheDirectoryExtensionHandle);
-
- parameters.cookieStorageDirectory = cookieStorageDirectory();
-
-#if PLATFORM(IOS)
- if (!parameters.cookieStorageDirectory.isEmpty())
- SandboxExtension::createHandleForReadWriteDirectory(parameters.cookieStorageDirectory, parameters.cookieStorageDirectoryExtensionHandle);
-
- String openGLCacheDirectory = this->openGLCacheDirectory();
- if (!openGLCacheDirectory.isEmpty())
- SandboxExtension::createHandleForReadWriteDirectory(openGLCacheDirectory, parameters.openGLCacheDirectoryExtensionHandle);
-
- String containerTemporaryDirectory = this->containerTemporaryDirectory();
- if (!containerTemporaryDirectory.isEmpty())
- SandboxExtension::createHandleForReadWriteDirectory(containerTemporaryDirectory, parameters.containerTemporaryDirectoryExtensionHandle);
-
- String hstsDatabasePath = webContentHSTSDatabasePath();
- if (!hstsDatabasePath.isEmpty())
- SandboxExtension::createHandle(hstsDatabasePath, SandboxExtension::ReadWrite, parameters.hstsDatabasePathExtensionHandle);
-#endif
-
- parameters.mediaKeyStorageDirectory = m_mediaKeysStorageDirectory;
- if (!parameters.mediaKeyStorageDirectory.isEmpty())
- SandboxExtension::createHandleForReadWriteDirectory(parameters.mediaKeyStorageDirectory, parameters.mediaKeyStorageDirectoryExtensionHandle);
-
- parameters.shouldUseTestingNetworkSession = m_shouldUseTestingNetworkSession;
-
- parameters.cacheModel = m_cacheModel;
- parameters.languages = userPreferredLanguages();
-
- copyToVector(m_schemesToRegisterAsEmptyDocument, parameters.urlSchemesRegistererdAsEmptyDocument);
- copyToVector(m_schemesToRegisterAsSecure, parameters.urlSchemesRegisteredAsSecure);
- copyToVector(m_schemesToSetDomainRelaxationForbiddenFor, parameters.urlSchemesForWhichDomainRelaxationIsForbidden);
- copyToVector(m_schemesToRegisterAsLocal, parameters.urlSchemesRegisteredAsLocal);
- copyToVector(m_schemesToRegisterAsNoAccess, parameters.urlSchemesRegisteredAsNoAccess);
- copyToVector(m_schemesToRegisterAsDisplayIsolated, parameters.urlSchemesRegisteredAsDisplayIsolated);
- copyToVector(m_schemesToRegisterAsCORSEnabled, parameters.urlSchemesRegisteredAsCORSEnabled);
-#if ENABLE(CACHE_PARTITIONING)
- copyToVector(m_schemesToRegisterAsCachePartitioned, parameters.urlSchemesRegisteredAsCachePartitioned);
-#endif
-
- parameters.shouldAlwaysUseComplexTextCodePath = m_alwaysUsesComplexTextCodePath;
- parameters.shouldUseFontSmoothing = m_shouldUseFontSmoothing;
-
- // FIXME: This leaves UI process and WebProcess disagreeing about the state if the client hasn't set the path.
- // iconDatabasePath is non-empty by default, but m_iconDatabase isn't enabled in UI process unless setDatabasePath is called explicitly.
- parameters.iconDatabaseEnabled = !iconDatabasePath().isEmpty();
-
- parameters.terminationTimeout = (m_processModel == ProcessModelSharedSecondaryProcess) ? sharedSecondaryProcessShutdownTimeout : 0;
-
- parameters.textCheckerState = TextChecker::state();
-
- parameters.fullKeyboardAccessEnabled = WebProcessProxy::fullKeyboardAccessEnabled();
-
- parameters.defaultRequestTimeoutInterval = API::URLRequest::defaultTimeoutInterval();
-
-#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
- // FIXME: There should be a generic way for supplements to add to the intialization parameters.
- supplement<WebNotificationManagerProxy>()->populateCopyOfNotificationPermissions(parameters.notificationPermissions);
-#endif
-
-#if ENABLE(NETWORK_PROCESS)
- parameters.usesNetworkProcess = m_usesNetworkProcess;
-#endif
-
- parameters.plugInAutoStartOriginHashes = m_plugInAutoStartProvider.autoStartOriginHashesCopy();
- copyToVector(m_plugInAutoStartProvider.autoStartOrigins(), parameters.plugInAutoStartOrigins);
-
- parameters.memoryCacheDisabled = m_memoryCacheDisabled;
-
-#if ENABLE(SERVICE_CONTROLS)
- parameters.hasImageServices = ServicesController::shared().hasImageServices();
- parameters.hasSelectionServices = ServicesController::shared().hasSelectionServices();
- parameters.hasRichContentServices = ServicesController::shared().hasRichContentServices();
- ServicesController::shared().refreshExistingServices();
-#endif
-
- // Add any platform specific parameters
- platformInitializeWebProcess(parameters);
-
- RefPtr<API::Object> injectedBundleInitializationUserData = m_injectedBundleClient.getInjectedBundleInitializationUserData(this);
- if (!injectedBundleInitializationUserData)
- injectedBundleInitializationUserData = m_injectedBundleInitializationUserData;
- process->send(Messages::WebProcess::InitializeWebProcess(parameters, WebContextUserMessageEncoder(injectedBundleInitializationUserData.get(), process)), 0);
-
-#if PLATFORM(COCOA)
- process->send(Messages::WebProcess::SetQOS(webProcessLatencyQOS(), webProcessThroughputQOS()), 0);
-#endif
-#if PLATFORM(IOS)
- cacheStorage().setDefaultOriginQuota(25ULL * 1024 * 1024);
-#endif
-
- if (WebPreferences::anyPagesAreUsingPrivateBrowsing())
- process->send(Messages::WebProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID()), 0);
-
- m_processes.append(process.ptr());
-
- if (m_processModel == ProcessModelSharedSecondaryProcess) {
- for (size_t i = 0; i != m_messagesToInjectedBundlePostedToEmptyContext.size(); ++i) {
- std::pair<String, RefPtr<API::Object>>& message = m_messagesToInjectedBundlePostedToEmptyContext[i];
-
- IPC::ArgumentEncoder messageData;
-
- messageData.encode(message.first);
- messageData.encode(WebContextUserMessageEncoder(message.second.get(), process));
- process->send(Messages::WebProcess::PostInjectedBundleMessage(IPC::DataReference(messageData.buffer(), messageData.bufferSize())), 0);
- }
- m_messagesToInjectedBundlePostedToEmptyContext.clear();
- } else
- ASSERT(m_messagesToInjectedBundlePostedToEmptyContext.isEmpty());
-
-#if ENABLE(REMOTE_INSPECTOR)
- // Initialize remote inspector connection now that we have a sub-process that is hosting one of our web views.
- Inspector::RemoteInspector::shared();
-#endif
-
- return process;
-}
-
-void WebContext::warmInitialProcess()
-{
- if (m_haveInitialEmptyProcess) {
- ASSERT(!m_processes.isEmpty());
- return;
- }
-
- if (m_processes.size() >= m_webProcessCountLimit)
- return;
-
- createNewWebProcess();
- m_haveInitialEmptyProcess = true;
-}
-
-void WebContext::enableProcessTermination()
-{
- m_processTerminationEnabled = true;
- Vector<RefPtr<WebProcessProxy>> processes = m_processes;
- for (size_t i = 0; i < processes.size(); ++i) {
- if (shouldTerminate(processes[i].get()))
- processes[i]->terminate();
- }
-}
-
-bool WebContext::shouldTerminate(WebProcessProxy* process)
-{
- ASSERT(m_processes.contains(process));
-
- if (!m_processTerminationEnabled)
- return false;
-
- for (const auto& supplement : m_supplements.values()) {
- if (!supplement->shouldTerminate(process))
- return false;
- }
-
- return true;
-}
-
-void WebContext::processWillOpenConnection(WebProcessProxy* process)
-{
- m_storageManager->processWillOpenConnection(process);
-}
-
-void WebContext::processWillCloseConnection(WebProcessProxy* process)
-{
- m_storageManager->processWillCloseConnection(process);
-}
-
-void WebContext::applicationWillTerminate()
-{
- m_storageManager->applicationWillTerminate();
-}
-
-void WebContext::processDidFinishLaunching(WebProcessProxy* process)
-{
- ASSERT(m_processes.contains(process));
-
- if (!m_visitedLinksPopulated) {
- populateVisitedLinks();
- m_visitedLinksPopulated = true;
- }
-
- // Sometimes the memorySampler gets initialized after process initialization has happened but before the process has finished launching
- // so check if it needs to be started here
- if (m_memorySamplerEnabled) {
- SandboxExtension::Handle sampleLogSandboxHandle;
- double now = WTF::currentTime();
- String sampleLogFilePath = String::format("WebProcess%llupid%d", static_cast<unsigned long long>(now), process->processIdentifier());
- sampleLogFilePath = SandboxExtension::createHandleForTemporaryFile(sampleLogFilePath, SandboxExtension::ReadWrite, sampleLogSandboxHandle);
-
- process->send(Messages::WebProcess::StartMemorySampler(sampleLogSandboxHandle, sampleLogFilePath, m_memorySamplerInterval), 0);
- }
-
- m_connectionClient.didCreateConnection(this, process->webConnection());
-}
-
-void WebContext::disconnectProcess(WebProcessProxy* process)
-{
- ASSERT(m_processes.contains(process));
-
- if (m_haveInitialEmptyProcess && process == m_processes.last())
- m_haveInitialEmptyProcess = false;
-
- // FIXME (Multi-WebProcess): <rdar://problem/12239765> Some of the invalidation calls below are still necessary in multi-process mode, but they should only affect data structures pertaining to the process being disconnected.
- // Clearing everything causes assertion failures, so it's less trouble to skip that for now.
- if (m_processModel != ProcessModelSharedSecondaryProcess) {
- RefPtr<WebProcessProxy> protect(process);
- if (m_processWithPageCache == process)
- m_processWithPageCache = 0;
-
- static_cast<WebContextSupplement*>(supplement<WebGeolocationManagerProxy>())->processDidClose(process);
-
- m_processes.remove(m_processes.find(process));
- return;
- }
-
- WebContextSupplementMap::const_iterator it = m_supplements.begin();
- WebContextSupplementMap::const_iterator end = m_supplements.end();
- for (; it != end; ++it)
- it->value->processDidClose(process);
-
- // The vector may have the last reference to process proxy, which in turn may have the last reference to the context.
- // Since vector elements are destroyed in place, we would recurse into WebProcessProxy destructor
- // if it were invoked from Vector::remove(). RefPtr delays destruction until it's safe.
- RefPtr<WebProcessProxy> protect(process);
- if (m_processWithPageCache == process)
- m_processWithPageCache = 0;
- m_processes.remove(m_processes.find(process));
-}
-
-WebProcessProxy& WebContext::createNewWebProcessRespectingProcessCountLimit()
-{
- if (m_processes.size() < m_webProcessCountLimit)
- return createNewWebProcess();
-
- // Choose the process with fewest pages.
- auto& process = *std::min_element(m_processes.begin(), m_processes.end(), [](const RefPtr<WebProcessProxy>& a, const RefPtr<WebProcessProxy>& b) {
- return a->pageCount() < b->pageCount();
- });
-
- return *process;
-}
-
-PassRefPtr<WebPageProxy> WebContext::createWebPage(PageClient& pageClient, WebPageConfiguration configuration)
-{
- if (!configuration.pageGroup)
- configuration.pageGroup = m_defaultPageGroup.ptr();
- if (!configuration.preferences)
- configuration.preferences = &configuration.pageGroup->preferences();
- if (!configuration.visitedLinkProvider)
- configuration.visitedLinkProvider = m_visitedLinkProvider.get();
- if (!configuration.websiteDataStore) {
- ASSERT(!configuration.sessionID.isValid());
- configuration.websiteDataStore = m_websiteDataStore.get();
- configuration.sessionID = configuration.preferences->privateBrowsingEnabled() ? SessionID::legacyPrivateSessionID() : SessionID::defaultSessionID();
- }
-
- RefPtr<WebProcessProxy> process;
- if (m_processModel == ProcessModelSharedSecondaryProcess) {
- process = &ensureSharedWebProcess();
- } else {
- if (m_haveInitialEmptyProcess) {
- process = m_processes.last();
- m_haveInitialEmptyProcess = false;
- } else if (configuration.relatedPage) {
- // Sharing processes, e.g. when creating the page via window.open().
- process = &configuration.relatedPage->process();
- } else
- process = &createNewWebProcessRespectingProcessCountLimit();
- }
-
- return process->createWebPage(pageClient, WTF::move(configuration));
-}
-
-DownloadProxy* WebContext::download(WebPageProxy* initiatingPage, const ResourceRequest& request)
-{
- DownloadProxy* downloadProxy = createDownloadProxy(request);
- uint64_t initiatingPageID = initiatingPage ? initiatingPage->pageID() : 0;
-
-#if ENABLE(NETWORK_PROCESS)
- if (usesNetworkProcess() && networkProcess()) {
- // FIXME (NetworkProcess): Replicate whatever FrameLoader::setOriginalURLForDownloadRequest does with the request here.
- networkProcess()->send(Messages::NetworkProcess::DownloadRequest(downloadProxy->downloadID(), request), 0);
- return downloadProxy;
- }
-#endif
-
- m_processes[0]->send(Messages::WebProcess::DownloadRequest(downloadProxy->downloadID(), initiatingPageID, request), 0);
- return downloadProxy;
-}
-
-DownloadProxy* WebContext::resumeDownload(const API::Data* resumeData, const String& path)
-{
- DownloadProxy* downloadProxy = createDownloadProxy(ResourceRequest());
-
- SandboxExtension::Handle sandboxExtensionHandle;
- if (!path.isEmpty())
- SandboxExtension::createHandle(path, SandboxExtension::ReadWrite, sandboxExtensionHandle);
-
-#if ENABLE(NETWORK_PROCESS)
- if (usesNetworkProcess() && networkProcess()) {
- networkProcess()->send(Messages::NetworkProcess::ResumeDownload(downloadProxy->downloadID(), resumeData->dataReference(), path, sandboxExtensionHandle), 0);
- return downloadProxy;
- }
-#endif
-
- m_processes[0]->send(Messages::WebProcess::ResumeDownload(downloadProxy->downloadID(), resumeData->dataReference(), path, sandboxExtensionHandle), 0);
- return downloadProxy;
-}
-
-void WebContext::postMessageToInjectedBundle(const String& messageName, API::Object* messageBody)
-{
- if (m_processes.isEmpty()) {
- if (m_processModel == ProcessModelSharedSecondaryProcess)
- m_messagesToInjectedBundlePostedToEmptyContext.append(std::make_pair(messageName, messageBody));
- return;
- }
-
- for (auto& process : m_processes) {
- // FIXME: Return early if the message body contains any references to WKPageRefs/WKFrameRefs etc. since they're local to a process.
- IPC::ArgumentEncoder messageData;
- messageData.encode(messageName);
- messageData.encode(WebContextUserMessageEncoder(messageBody, *process.get()));
-
- process->send(Messages::WebProcess::PostInjectedBundleMessage(IPC::DataReference(messageData.buffer(), messageData.bufferSize())), 0);
- }
-}
-
-// InjectedBundle client
-
-void WebContext::didReceiveMessageFromInjectedBundle(const String& messageName, API::Object* messageBody)
-{
- m_injectedBundleClient.didReceiveMessageFromInjectedBundle(this, messageName, messageBody);
-}
-
-void WebContext::didReceiveSynchronousMessageFromInjectedBundle(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData)
-{
- m_injectedBundleClient.didReceiveSynchronousMessageFromInjectedBundle(this, messageName, messageBody, returnData);
-}
-
-void WebContext::populateVisitedLinks()
-{
- m_historyClient->populateVisitedLinks(*this);
-}
-
-WebContext::Statistics& WebContext::statistics()
-{
- static Statistics statistics = Statistics();
-
- return statistics;
-}
-
-#if ENABLE(NETSCAPE_PLUGIN_API)
-void WebContext::setAdditionalPluginsDirectory(const String& directory)
-{
- Vector<String> directories;
- directories.append(directory);
-
- m_pluginInfoStore.setAdditionalPluginsDirectories(directories);
-}
-#endif // ENABLE(NETSCAPE_PLUGIN_API)
-
-void WebContext::setAlwaysUsesComplexTextCodePath(bool alwaysUseComplexText)
-{
- m_alwaysUsesComplexTextCodePath = alwaysUseComplexText;
- sendToAllProcesses(Messages::WebProcess::SetAlwaysUsesComplexTextCodePath(alwaysUseComplexText));
-}
-
-void WebContext::setShouldUseFontSmoothing(bool useFontSmoothing)
-{
- m_shouldUseFontSmoothing = useFontSmoothing;
- sendToAllProcesses(Messages::WebProcess::SetShouldUseFontSmoothing(useFontSmoothing));
-}
-
-void WebContext::registerURLSchemeAsEmptyDocument(const String& urlScheme)
-{
- m_schemesToRegisterAsEmptyDocument.add(urlScheme);
- sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsEmptyDocument(urlScheme));
-}
-
-void WebContext::registerURLSchemeAsSecure(const String& urlScheme)
-{
- m_schemesToRegisterAsSecure.add(urlScheme);
- sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsSecure(urlScheme));
-}
-
-void WebContext::setDomainRelaxationForbiddenForURLScheme(const String& urlScheme)
-{
- m_schemesToSetDomainRelaxationForbiddenFor.add(urlScheme);
- sendToAllProcesses(Messages::WebProcess::SetDomainRelaxationForbiddenForURLScheme(urlScheme));
-}
-
-void WebContext::setCanHandleHTTPSServerTrustEvaluation(bool value)
-{
-#if ENABLE(NETWORK_PROCESS)
- m_canHandleHTTPSServerTrustEvaluation = value;
- if (m_usesNetworkProcess && m_networkProcess) {
- m_networkProcess->send(Messages::NetworkProcess::SetCanHandleHTTPSServerTrustEvaluation(value), 0);
- return;
- }
-#else
- UNUSED_PARAM(value);
-#endif
-}
-
-void WebContext::registerURLSchemeAsLocal(const String& urlScheme)
-{
- m_schemesToRegisterAsLocal.add(urlScheme);
- sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsLocal(urlScheme));
-}
-
-void WebContext::registerURLSchemeAsNoAccess(const String& urlScheme)
-{
- m_schemesToRegisterAsNoAccess.add(urlScheme);
- sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsNoAccess(urlScheme));
-}
-
-void WebContext::registerURLSchemeAsDisplayIsolated(const String& urlScheme)
-{
- m_schemesToRegisterAsDisplayIsolated.add(urlScheme);
- sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsDisplayIsolated(urlScheme));
-}
-
-void WebContext::registerURLSchemeAsCORSEnabled(const String& urlScheme)
-{
- m_schemesToRegisterAsCORSEnabled.add(urlScheme);
- sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsCORSEnabled(urlScheme));
-}
-
-HashSet<String>& WebContext::globalURLSchemesWithCustomProtocolHandlers()
-{
- static NeverDestroyed<HashSet<String>> set;
- return set;
-}
-
-void WebContext::registerGlobalURLSchemeAsHavingCustomProtocolHandlers(const String& urlScheme)
-{
- if (!urlScheme)
- return;
-
- String schemeLower = urlScheme.lower();
- globalURLSchemesWithCustomProtocolHandlers().add(schemeLower);
- for (auto* context : allContexts())
- context->registerSchemeForCustomProtocol(schemeLower);
-}
-
-void WebContext::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(const String& urlScheme)
-{
- if (!urlScheme)
- return;
-
- String schemeLower = urlScheme.lower();
- globalURLSchemesWithCustomProtocolHandlers().remove(schemeLower);
- for (auto* context : allContexts())
- context->unregisterSchemeForCustomProtocol(schemeLower);
-}
-
-#if ENABLE(CACHE_PARTITIONING)
-void WebContext::registerURLSchemeAsCachePartitioned(const String& urlScheme)
-{
- m_schemesToRegisterAsCachePartitioned.add(urlScheme);
- sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsCachePartitioned(urlScheme));
-}
-#endif
-
-void WebContext::setCacheModel(CacheModel cacheModel)
-{
- m_cacheModel = cacheModel;
- sendToAllProcesses(Messages::WebProcess::SetCacheModel(static_cast<uint32_t>(m_cacheModel)));
-
- // FIXME: Inform the Network Process if in use.
-}
-
-void WebContext::setDefaultRequestTimeoutInterval(double timeoutInterval)
-{
- sendToAllProcesses(Messages::WebProcess::SetDefaultRequestTimeoutInterval(timeoutInterval));
-}
-
-DownloadProxy* WebContext::createDownloadProxy(const ResourceRequest& request)
-{
-#if ENABLE(NETWORK_PROCESS)
- if (usesNetworkProcess()) {
- ensureNetworkProcess();
- ASSERT(m_networkProcess);
- return m_networkProcess->createDownloadProxy(request);
- }
-#endif
-
- return ensureSharedWebProcess().createDownloadProxy(request);
-}
-
-void WebContext::addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver& messageReceiver)
-{
- m_messageReceiverMap.addMessageReceiver(messageReceiverName, messageReceiver);
-}
-
-void WebContext::addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver& messageReceiver)
-{
- m_messageReceiverMap.addMessageReceiver(messageReceiverName, destinationID, messageReceiver);
-}
-
-void WebContext::removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID)
-{
- m_messageReceiverMap.removeMessageReceiver(messageReceiverName, destinationID);
-}
-
-bool WebContext::dispatchMessage(IPC::Connection* connection, IPC::MessageDecoder& decoder)
-{
- return m_messageReceiverMap.dispatchMessage(connection, decoder);
-}
-
-bool WebContext::dispatchSyncMessage(IPC::Connection* connection, IPC::MessageDecoder& decoder, std::unique_ptr<IPC::MessageEncoder>& replyEncoder)
-{
- return m_messageReceiverMap.dispatchSyncMessage(connection, decoder, replyEncoder);
-}
-
-void WebContext::didReceiveMessage(IPC::Connection* connection, IPC::MessageDecoder& decoder)
-{
- if (decoder.messageReceiverName() == Messages::WebContext::messageReceiverName()) {
- didReceiveWebContextMessage(connection, decoder);
- return;
- }
-
- if (decoder.messageReceiverName() == WebContextLegacyMessages::messageReceiverName()
- && decoder.messageName() == WebContextLegacyMessages::postMessageMessageName()) {
- String messageName;
- RefPtr<API::Object> messageBody;
- WebContextUserMessageDecoder messageBodyDecoder(messageBody, *WebProcessProxy::fromConnection(connection));
- if (!decoder.decode(messageName))
- return;
- if (!decoder.decode(messageBodyDecoder))
- return;
-
- didReceiveMessageFromInjectedBundle(messageName, messageBody.get());
- return;
- }
-
- ASSERT_NOT_REACHED();
-}
-
-void WebContext::didReceiveSyncMessage(IPC::Connection* connection, IPC::MessageDecoder& decoder, std::unique_ptr<IPC::MessageEncoder>& replyEncoder)
-{
- if (decoder.messageReceiverName() == Messages::WebContext::messageReceiverName()) {
- didReceiveSyncWebContextMessage(connection, decoder, replyEncoder);
- return;
- }
-
- if (decoder.messageReceiverName() == WebContextLegacyMessages::messageReceiverName()
- && decoder.messageName() == WebContextLegacyMessages::postSynchronousMessageMessageName()) {
- // FIXME: We should probably encode something in the case that the arguments do not decode correctly.
-
- WebProcessProxy* process = WebProcessProxy::fromConnection(connection);
-
- String messageName;
- RefPtr<API::Object> messageBody;
- WebContextUserMessageDecoder messageBodyDecoder(messageBody, *process);
- if (!decoder.decode(messageName))
- return;
- if (!decoder.decode(messageBodyDecoder))
- return;
-
- RefPtr<API::Object> returnData;
- didReceiveSynchronousMessageFromInjectedBundle(messageName, messageBody.get(), returnData);
- replyEncoder->encode(WebContextUserMessageEncoder(returnData.get(), *process));
- return;
- }
-
- ASSERT_NOT_REACHED();
-}
-
-void WebContext::setEnhancedAccessibility(bool flag)
-{
- sendToAllProcesses(Messages::WebProcess::SetEnhancedAccessibility(flag));
-}
-
-void WebContext::startMemorySampler(const double interval)
-{
- // For new WebProcesses we will also want to start the Memory Sampler
- m_memorySamplerEnabled = true;
- m_memorySamplerInterval = interval;
-
- // For UIProcess
-#if ENABLE(MEMORY_SAMPLER)
- WebMemorySampler::shared()->start(interval);
-#endif
-
- // For WebProcess
- SandboxExtension::Handle sampleLogSandboxHandle;
- double now = WTF::currentTime();
- String sampleLogFilePath = String::format("WebProcess%llu", static_cast<unsigned long long>(now));
- sampleLogFilePath = SandboxExtension::createHandleForTemporaryFile(sampleLogFilePath, SandboxExtension::ReadWrite, sampleLogSandboxHandle);
-
- sendToAllProcesses(Messages::WebProcess::StartMemorySampler(sampleLogSandboxHandle, sampleLogFilePath, interval));
-}
-
-void WebContext::stopMemorySampler()
-{
- // For WebProcess
- m_memorySamplerEnabled = false;
-
- // For UIProcess
-#if ENABLE(MEMORY_SAMPLER)
- WebMemorySampler::shared()->stop();
-#endif
-
- sendToAllProcesses(Messages::WebProcess::StopMemorySampler());
-}
-
-String WebContext::applicationCacheDirectory() const
-{
- if (!m_overrideApplicationCacheDirectory.isEmpty())
- return m_overrideApplicationCacheDirectory;
-
- return platformDefaultApplicationCacheDirectory();
-}
-
-void WebContext::setIconDatabasePath(const String& path)
-{
- m_overrideIconDatabasePath = path;
- if (!m_overrideIconDatabasePath.isEmpty()) {
- // This implicitly enables the database on UI process side.
- m_iconDatabase->setDatabasePath(path);
- }
-}
-
-String WebContext::iconDatabasePath() const
-{
- if (!m_overrideIconDatabasePath.isNull())
- return m_overrideIconDatabasePath;
-
- return platformDefaultIconDatabasePath();
-}
-
-String WebContext::diskCacheDirectory() const
-{
- if (!m_overrideDiskCacheDirectory.isEmpty())
- return m_overrideDiskCacheDirectory;
-
- return platformDefaultDiskCacheDirectory();
-}
-
-String WebContext::cookieStorageDirectory() const
-{
- if (!m_overrideCookieStorageDirectory.isEmpty())
- return m_overrideCookieStorageDirectory;
-
- return platformDefaultCookieStorageDirectory();
-}
-
-void WebContext::useTestingNetworkSession()
-{
- ASSERT(m_processes.isEmpty());
-#if ENABLE(NETWORK_PROCESS)
- ASSERT(!m_networkProcess);
-
- if (m_networkProcess)
- return;
-#endif
-
- if (!m_processes.isEmpty())
- return;
-
- m_shouldUseTestingNetworkSession = true;
-}
-
-void WebContext::allowSpecificHTTPSCertificateForHost(const WebCertificateInfo* certificate, const String& host)
-{
-#if ENABLE(NETWORK_PROCESS)
- if (m_usesNetworkProcess && m_networkProcess) {
- m_networkProcess->send(Messages::NetworkProcess::AllowSpecificHTTPSCertificateForHost(certificate->certificateInfo(), host), 0);
- return;
- }
-#endif
-
-#if USE(SOUP)
- m_processes[0]->send(Messages::WebProcess::AllowSpecificHTTPSCertificateForHost(certificate->certificateInfo(), host), 0);
- return;
-#else
- UNUSED_PARAM(certificate);
- UNUSED_PARAM(host);
-#endif
-
-#if !PLATFORM(IOS)
- ASSERT_NOT_REACHED();
-#endif
-}
-
-void WebContext::setHTTPPipeliningEnabled(bool enabled)
-{
-#if PLATFORM(COCOA)
- ResourceRequest::setHTTPPipeliningEnabled(enabled);
-#else
- UNUSED_PARAM(enabled);
-#endif
-}
-
-bool WebContext::httpPipeliningEnabled() const
-{
-#if PLATFORM(COCOA)
- return ResourceRequest::httpPipeliningEnabled();
-#else
- return false;
-#endif
-}
-
-void WebContext::getStatistics(uint32_t statisticsMask, std::function<void (ImmutableDictionary*, CallbackBase::Error)> callbackFunction)
-{
- if (!statisticsMask) {
- callbackFunction(nullptr, CallbackBase::Error::Unknown);
- return;
- }
-
- RefPtr<StatisticsRequest> request = StatisticsRequest::create(DictionaryCallback::create(WTF::move(callbackFunction)));
-
- if (statisticsMask & StatisticsRequestTypeWebContent)
- requestWebContentStatistics(request.get());
-
- if (statisticsMask & StatisticsRequestTypeNetworking)
- requestNetworkingStatistics(request.get());
-}
-
-void WebContext::requestWebContentStatistics(StatisticsRequest* request)
-{
- if (m_processModel == ProcessModelSharedSecondaryProcess) {
- if (m_processes.isEmpty())
- return;
-
- uint64_t requestID = request->addOutstandingRequest();
- m_statisticsRequests.set(requestID, request);
- m_processes[0]->send(Messages::WebProcess::GetWebCoreStatistics(requestID), 0);
-
- } else {
- // FIXME (Multi-WebProcess) <rdar://problem/13200059>: Make getting statistics from multiple WebProcesses work.
- }
-}
-
-void WebContext::requestNetworkingStatistics(StatisticsRequest* request)
-{
- bool networkProcessUnavailable;
-#if ENABLE(NETWORK_PROCESS)
- networkProcessUnavailable = !m_usesNetworkProcess || !m_networkProcess;
-#else
- networkProcessUnavailable = true;
-#endif
-
- if (networkProcessUnavailable) {
- LOG_ERROR("Attempt to get NetworkProcess statistics but the NetworkProcess is unavailable");
- return;
- }
-
-#if ENABLE(NETWORK_PROCESS)
- uint64_t requestID = request->addOutstandingRequest();
- m_statisticsRequests.set(requestID, request);
- m_networkProcess->send(Messages::NetworkProcess::GetNetworkProcessStatistics(requestID), 0);
-#else
- UNUSED_PARAM(request);
-#endif
-}
-
-#if !PLATFORM(COCOA)
-void WebContext::dummy(bool&)
-{
-}
-#endif
-
-void WebContext::didGetStatistics(const StatisticsData& statisticsData, uint64_t requestID)
-{
- RefPtr<StatisticsRequest> request = m_statisticsRequests.take(requestID);
- if (!request) {
- LOG_ERROR("Cannot report networking statistics.");
- return;
- }
-
- request->completedRequest(requestID, statisticsData);
-}
-
-void WebContext::garbageCollectJavaScriptObjects()
-{
- sendToAllProcesses(Messages::WebProcess::GarbageCollectJavaScriptObjects());
-}
-
-void WebContext::setJavaScriptGarbageCollectorTimerEnabled(bool flag)
-{
- sendToAllProcesses(Messages::WebProcess::SetJavaScriptGarbageCollectorTimerEnabled(flag));
-}
-
-void WebContext::addPlugInAutoStartOriginHash(const String& pageOrigin, unsigned plugInOriginHash, SessionID sessionID)
-{
- m_plugInAutoStartProvider.addAutoStartOriginHash(pageOrigin, plugInOriginHash, sessionID);
-}
-
-void WebContext::plugInDidReceiveUserInteraction(unsigned plugInOriginHash, SessionID sessionID)
-{
- m_plugInAutoStartProvider.didReceiveUserInteraction(plugInOriginHash, sessionID);
-}
-
-PassRefPtr<ImmutableDictionary> WebContext::plugInAutoStartOriginHashes() const
-{
- return m_plugInAutoStartProvider.autoStartOriginsTableCopy();
-}
-
-void WebContext::setPlugInAutoStartOriginHashes(ImmutableDictionary& dictionary)
-{
- m_plugInAutoStartProvider.setAutoStartOriginsTable(dictionary);
-}
-
-void WebContext::setPlugInAutoStartOrigins(API::Array& array)
-{
- m_plugInAutoStartProvider.setAutoStartOriginsArray(array);
-}
-
-void WebContext::setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(ImmutableDictionary& dictionary, double time)
-{
- m_plugInAutoStartProvider.setAutoStartOriginsFilteringOutEntriesAddedAfterTime(dictionary, time);
-}
-
-void WebContext::registerSchemeForCustomProtocol(const String& scheme)
-{
- sendToNetworkingProcess(Messages::CustomProtocolManager::RegisterScheme(scheme));
-}
-
-void WebContext::unregisterSchemeForCustomProtocol(const String& scheme)
-{
- sendToNetworkingProcess(Messages::CustomProtocolManager::UnregisterScheme(scheme));
-}
-
-#if ENABLE(NETSCAPE_PLUGIN_API)
-void WebContext::pluginInfoStoreDidLoadPlugins(PluginInfoStore* store)
-{
-#ifdef NDEBUG
- UNUSED_PARAM(store);
-#endif
- ASSERT(store == &m_pluginInfoStore);
-
- Vector<PluginModuleInfo> pluginModules = m_pluginInfoStore.plugins();
-
- Vector<RefPtr<API::Object>> plugins;
- plugins.reserveInitialCapacity(pluginModules.size());
-
- for (const auto& pluginModule : pluginModules) {
- ImmutableDictionary::MapType map;
- map.set(ASCIILiteral("path"), API::String::create(pluginModule.path));
- map.set(ASCIILiteral("name"), API::String::create(pluginModule.info.name));
- map.set(ASCIILiteral("file"), API::String::create(pluginModule.info.file));
- map.set(ASCIILiteral("desc"), API::String::create(pluginModule.info.desc));
-
- Vector<RefPtr<API::Object>> mimeTypes;
- mimeTypes.reserveInitialCapacity(pluginModule.info.mimes.size());
- for (const auto& mimeClassInfo : pluginModule.info.mimes)
- mimeTypes.uncheckedAppend(API::String::create(mimeClassInfo.type));
- map.set(ASCIILiteral("mimes"), API::Array::create(WTF::move(mimeTypes)));
-
-#if PLATFORM(COCOA)
- map.set(ASCIILiteral("bundleId"), API::String::create(pluginModule.bundleIdentifier));
- map.set(ASCIILiteral("version"), API::String::create(pluginModule.versionString));
-#endif
-
- plugins.uncheckedAppend(ImmutableDictionary::create(WTF::move(map)));
- }
-
- m_client.plugInInformationBecameAvailable(this, API::Array::create(WTF::move(plugins)).get());
-}
-#endif
-
-void WebContext::setMemoryCacheDisabled(bool disabled)
-{
- m_memoryCacheDisabled = disabled;
- sendToAllProcesses(Messages::WebProcess::SetMemoryCacheDisabled(disabled));
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContexth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/WebContext.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebContext.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -1,693 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebContext_h
-#define WebContext_h
-
-#include "APIObject.h"
-#include "DownloadProxyMap.h"
-#include "GenericCallback.h"
-#include "ImmutableDictionary.h"
-#include "MessageReceiver.h"
-#include "MessageReceiverMap.h"
-#include "PlugInAutoStartProvider.h"
-#include "PluginInfoStore.h"
-#include "ProcessModel.h"
-#include "ProcessThrottler.h"
-#include "StatisticsRequest.h"
-#include "StorageManager.h"
-#include "VisitedLinkProvider.h"
-#include "WebContextClient.h"
-#include "WebContextConnectionClient.h"
-#include "WebContextInjectedBundleClient.h"
-#include "WebProcessProxy.h"
-#include <WebCore/LinkHash.h>
-#include <WebCore/SessionID.h>
-#include <wtf/Forward.h>
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounter.h>
-#include <wtf/RefPtr.h>
-#include <wtf/text/StringHash.h>
-#include <wtf/text/WTFString.h>
-
-#if ENABLE(DATABASE_PROCESS)
-#include "DatabaseProcessProxy.h"
-#endif
-
-#if ENABLE(NETWORK_PROCESS)
-#include "NetworkProcessProxy.h"
-#endif
-
-#if PLATFORM(COCOA)
-OBJC_CLASS NSMutableDictionary;
-OBJC_CLASS NSObject;
-OBJC_CLASS NSString;
-#endif
-
-namespace API {
-class DownloadClient;
-class LegacyContextHistoryClient;
-}
-
-namespace WebKit {
-
-class DownloadProxy;
-class WebContextSupplement;
-class WebIconDatabase;
-class WebPageGroup;
-class WebPageProxy;
-struct StatisticsData;
-struct WebPageConfiguration;
-struct WebProcessCreationParameters;
-
-typedef GenericCallback<ImmutableDictionary*> DictionaryCallback;
-
-#if ENABLE(NETWORK_PROCESS)
-struct NetworkProcessCreationParameters;
-#endif
-
-#if PLATFORM(COCOA)
-int networkProcessLatencyQOS();
-int networkProcessThroughputQOS();
-int webProcessLatencyQOS();
-int webProcessThroughputQOS();
-#endif
-
-struct WebContextConfiguration {
- String injectedBundlePath;
- String localStorageDirectory;
- String webSQLDatabaseDirectory;
- String indexedDBDatabaseDirectory;
- String mediaKeysStorageDirectory;
-};
-
-class WebContext : public API::ObjectImpl<API::Object::Type::Context>, private IPC::MessageReceiver
-#if ENABLE(NETSCAPE_PLUGIN_API)
- , private PluginInfoStoreClient
-#endif
- {
-public:
- static void applyPlatformSpecificConfigurationDefaults(WebContextConfiguration&);
-
- WebContext(WebContextConfiguration);
-
- static PassRefPtr<WebContext> create(WebContextConfiguration);
- virtual ~WebContext();
-
- static const Vector<WebContext*>& allContexts();
-
- template <typename T>
- T* supplement()
- {
- return static_cast<T*>(m_supplements.get(T::supplementName()));
- }
-
- template <typename T>
- void addSupplement()
- {
- m_supplements.add(T::supplementName(), T::create(this));
- }
-
- void addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver&);
- void addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver&);
- void removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID);
-
- bool dispatchMessage(IPC::Connection*, IPC::MessageDecoder&);
- bool dispatchSyncMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&);
-
- void initializeClient(const WKContextClientBase*);
- void initializeInjectedBundleClient(const WKContextInjectedBundleClientBase*);
- void initializeConnectionClient(const WKContextConnectionClientBase*);
- void setHistoryClient(std::unique_ptr<API::LegacyContextHistoryClient>);
- void setDownloadClient(std::unique_ptr<API::DownloadClient>);
-
- void setProcessModel(ProcessModel); // Can only be called when there are no processes running.
- ProcessModel processModel() const { return m_processModel; }
-
- void setMaximumNumberOfProcesses(unsigned); // Can only be called when there are no processes running.
- unsigned maximumNumberOfProcesses() const { return m_webProcessCountLimit; }
-
- const Vector<RefPtr<WebProcessProxy>>& processes() const { return m_processes; }
-
- // WebProcess or NetworkProcess as approporiate for current process model. The connection must be non-null.
- IPC::Connection* networkingProcessConnection();
-
- template<typename T> void sendToAllProcesses(const T& message);
- template<typename T> void sendToAllProcessesRelaunchingThemIfNecessary(const T& message);
- template<typename T> void sendToOneProcess(T&& message);
-
- // Sends the message to WebProcess or NetworkProcess as approporiate for current process model.
- template<typename T> void sendToNetworkingProcess(T&& message);
- template<typename T> void sendToNetworkingProcessRelaunchingIfNecessary(T&& message);
-
- // Sends the message to WebProcess or DatabaseProcess as approporiate for current process model.
- template<typename T> void sendToDatabaseProcessRelaunchingIfNecessary(T&& message);
-
- void processWillOpenConnection(WebProcessProxy*);
- void processWillCloseConnection(WebProcessProxy*);
- void processDidFinishLaunching(WebProcessProxy*);
-
- void applicationWillTerminate();
- // Disconnect the process from the context.
- void disconnectProcess(WebProcessProxy*);
-
- StorageManager& storageManager() const { return *m_storageManager; }
-
- PassRefPtr<WebPageProxy> createWebPage(PageClient&, WebPageConfiguration);
-
- const String& injectedBundlePath() const { return m_injectedBundlePath; }
-
- DownloadProxy* download(WebPageProxy* initiatingPage, const WebCore::ResourceRequest&);
- DownloadProxy* resumeDownload(const API::Data* resumeData, const String& path);
-
- void setInjectedBundleInitializationUserData(PassRefPtr<API::Object> userData) { m_injectedBundleInitializationUserData = userData; }
-
- void postMessageToInjectedBundle(const String&, API::Object*);
-
- // InjectedBundle client
- void didReceiveMessageFromInjectedBundle(const String&, API::Object*);
- void didReceiveSynchronousMessageFromInjectedBundle(const String&, API::Object*, RefPtr<API::Object>& returnData);
-
- void populateVisitedLinks();
-
-#if ENABLE(NETSCAPE_PLUGIN_API)
- void setAdditionalPluginsDirectory(const String&);
-
- PluginInfoStore& pluginInfoStore() { return m_pluginInfoStore; }
-#endif
-
- void setAlwaysUsesComplexTextCodePath(bool);
- void setShouldUseFontSmoothing(bool);
-
- void registerURLSchemeAsEmptyDocument(const String&);
- void registerURLSchemeAsSecure(const String&);
- void setDomainRelaxationForbiddenForURLScheme(const String&);
- void setCanHandleHTTPSServerTrustEvaluation(bool);
- void registerURLSchemeAsLocal(const String&);
- void registerURLSchemeAsNoAccess(const String&);
- void registerURLSchemeAsDisplayIsolated(const String&);
- void registerURLSchemeAsCORSEnabled(const String&);
-#if ENABLE(CACHE_PARTITIONING)
- void registerURLSchemeAsCachePartitioned(const String&);
-#endif
-
- VisitedLinkProvider& visitedLinkProvider() { return *m_visitedLinkProvider; }
-
- // MessageReceiver.
- virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) override;
- virtual void didReceiveSyncMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&) override;
-
- void setCacheModel(CacheModel);
- CacheModel cacheModel() const { return m_cacheModel; }
-
- void setDefaultRequestTimeoutInterval(double);
-
- void startMemorySampler(const double interval);
- void stopMemorySampler();
-
-#if USE(SOUP)
- void setInitialHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicy policy) { m_initialHTTPCookieAcceptPolicy = policy; }
-#endif
- void setEnhancedAccessibility(bool);
-
- // Downloads.
- DownloadProxy* createDownloadProxy(const WebCore::ResourceRequest&);
- API::DownloadClient& downloadClient() { return *m_downloadClient; }
-
- API::LegacyContextHistoryClient& historyClient() { return *m_historyClient; }
- WebContextClient& client() { return m_client; }
-
- WebIconDatabase* iconDatabase() const { return m_iconDatabase.get(); }
-#if ENABLE(NETSCAPE_PLUGIN_API)
- WebPluginSiteDataManager* pluginSiteDataManager() const { return m_pluginSiteDataManager.get(); }
-#endif
-
- struct Statistics {
- unsigned wkViewCount;
- unsigned wkPageCount;
- unsigned wkFrameCount;
- };
- static Statistics& statistics();
-
- void setApplicationCacheDirectory(const String& dir) { m_overrideApplicationCacheDirectory = dir; }
- void setIconDatabasePath(const String&);
- String iconDatabasePath() const;
- void setDiskCacheDirectory(const String& dir) { m_overrideDiskCacheDirectory = dir; }
- void setCookieStorageDirectory(const String& dir) { m_overrideCookieStorageDirectory = dir; }
-
- void useTestingNetworkSession();
-
- void allowSpecificHTTPSCertificateForHost(const WebCertificateInfo*, const String& host);
-
- WebProcessProxy& ensureSharedWebProcess();
- WebProcessProxy& createNewWebProcessRespectingProcessCountLimit(); // Will return an existing one if limit is met.
- void warmInitialProcess();
-
- bool shouldTerminate(WebProcessProxy*);
-
- void disableProcessTermination() { m_processTerminationEnabled = false; }
- void enableProcessTermination();
-
- // Defaults to false.
- void setHTTPPipeliningEnabled(bool);
- bool httpPipeliningEnabled() const;
-
- void getStatistics(uint32_t statisticsMask, std::function<void (ImmutableDictionary*, CallbackBase::Error)>);
-
- void garbageCollectJavaScriptObjects();
- void setJavaScriptGarbageCollectorTimerEnabled(bool flag);
-
-#if PLATFORM(COCOA)
- static bool omitPDFSupport();
-#endif
-
- void fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled);
-
- void textCheckerStateChanged();
-
- PassRefPtr<ImmutableDictionary> plugInAutoStartOriginHashes() const;
- void setPlugInAutoStartOriginHashes(ImmutableDictionary&);
- void setPlugInAutoStartOrigins(API::Array&);
- void setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(ImmutableDictionary&, double time);
-
- // Network Process Management
-
- void setUsesNetworkProcess(bool);
- bool usesNetworkProcess() const;
-
-#if ENABLE(NETWORK_PROCESS)
- void ensureNetworkProcess();
- NetworkProcessProxy* networkProcess() { return m_networkProcess.get(); }
- void networkProcessCrashed(NetworkProcessProxy*);
-
- void getNetworkProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply>);
-#endif
-
-#if ENABLE(DATABASE_PROCESS)
- void ensureDatabaseProcess();
- void getDatabaseProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetDatabaseProcessConnection::DelayedReply>);
- void databaseProcessCrashed(DatabaseProcessProxy*);
-#endif
-
-#if PLATFORM(COCOA)
- bool processSuppressionEnabled() const;
-#endif
-
- void windowServerConnectionStateChanged();
-
- static void willStartUsingPrivateBrowsing();
- static void willStopUsingPrivateBrowsing();
-
- static bool isEphemeralSession(WebCore::SessionID);
-
-#if USE(SOUP)
- void setIgnoreTLSErrors(bool);
- bool ignoreTLSErrors() const { return m_ignoreTLSErrors; }
-#endif
-
- static void setInvalidMessageCallback(void (*)(WKStringRef));
- static void didReceiveInvalidMessage(const IPC::StringReference& messageReceiverName, const IPC::StringReference& messageName);
-
- void processDidCachePage(WebProcessProxy*);
-
- bool isURLKnownHSTSHost(const String& urlString, bool privateBrowsingEnabled) const;
- void resetHSTSHosts();
-
- void registerSchemeForCustomProtocol(const String&);
- void unregisterSchemeForCustomProtocol(const String&);
-
- static HashSet<String>& globalURLSchemesWithCustomProtocolHandlers();
- static void registerGlobalURLSchemeAsHavingCustomProtocolHandlers(const String&);
- static void unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(const String&);
-
-#if PLATFORM(COCOA)
- void updateProcessSuppressionState();
-
- NSMutableDictionary *ensureBundleParameters();
- NSMutableDictionary *bundleParameters() { return m_bundleParameters.get(); }
-#else
- void updateProcessSuppressionState() const { }
-#endif
-
- void setMemoryCacheDisabled(bool);
-
- UserObservablePageToken userObservablePageCount()
- {
- return m_userObservablePageCounter.token<UserObservablePageTokenType>();
- }
-
- ProcessSuppressionDisabledToken processSuppressionDisabledForPageCount()
- {
- return m_processSuppressionDisabledForPageCounter.token<ProcessSuppressionDisabledTokenType>();
- }
-
-private:
- void platformInitialize();
-
- void platformInitializeWebProcess(WebProcessCreationParameters&);
- void platformInvalidateContext();
-
- WebProcessProxy& createNewWebProcess();
-
- void requestWebContentStatistics(StatisticsRequest*);
- void requestNetworkingStatistics(StatisticsRequest*);
-
-#if ENABLE(NETWORK_PROCESS)
- void platformInitializeNetworkProcess(NetworkProcessCreationParameters&);
-#endif
-
-#if PLATFORM(IOS)
- void writeWebContentToPasteboard(const WebCore::PasteboardWebContent&);
- void writeImageToPasteboard(const WebCore::PasteboardImage&);
- void writeStringToPasteboard(const String& pasteboardType, const String&);
- void readStringFromPasteboard(uint64_t index, const String& pasteboardType, WTF::String&);
- void readURLFromPasteboard(uint64_t index, const String& pasteboardType, String&);
- void readBufferFromPasteboard(uint64_t index, const String& pasteboardType, SharedMemory::Handle&, uint64_t& size);
- void getPasteboardItemsCount(uint64_t& itemsCount);
-#endif
-#if PLATFORM(COCOA)
- void getPasteboardTypes(const String& pasteboardName, Vector<String>& pasteboardTypes);
- void getPasteboardPathnamesForType(const String& pasteboardName, const String& pasteboardType, Vector<String>& pathnames);
- void getPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, String&);
- void getPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, SharedMemory::Handle&, uint64_t& size);
- void pasteboardCopy(const String& fromPasteboard, const String& toPasteboard, uint64_t& newChangeCount);
- void getPasteboardChangeCount(const String& pasteboardName, uint64_t& changeCount);
- void getPasteboardUniqueName(String& pasteboardName);
- void getPasteboardColor(const String& pasteboardName, WebCore::Color&);
- void getPasteboardURL(const String& pasteboardName, WTF::String&);
- void addPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, uint64_t& newChangeCount);
- void setPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, uint64_t& newChangeCount);
- void setPasteboardPathnamesForType(const String& pasteboardName, const String& pasteboardType, const Vector<String>& pathnames, uint64_t& newChangeCount);
- void setPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, const String&, uint64_t& newChangeCount);
- void setPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, const SharedMemory::Handle&, uint64_t size, uint64_t& newChangeCount);
-#endif
-
-#if !PLATFORM(COCOA)
- // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
- // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
- void dummy(bool&);
-#endif
-
- void didGetStatistics(const StatisticsData&, uint64_t callbackID);
-
- // Implemented in generated WebContextMessageReceiver.cpp
- void didReceiveWebContextMessage(IPC::Connection*, IPC::MessageDecoder&);
- void didReceiveSyncWebContextMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&);
-
- static void languageChanged(void* context);
- void languageChanged();
-
- String applicationCacheDirectory() const;
- String platformDefaultApplicationCacheDirectory() const;
-
- String platformDefaultIconDatabasePath() const;
-
- static String platformDefaultLocalStorageDirectory();
- static String platformDefaultIndexedDBDatabaseDirectory();
- static String platformDefaultWebSQLDatabaseDirectory();
- static String platformDefaultMediaKeysStorageDirectory();
-
- String diskCacheDirectory() const;
- String platformDefaultDiskCacheDirectory() const;
-
- String cookieStorageDirectory() const;
- String platformDefaultCookieStorageDirectory() const;
-
-#if PLATFORM(IOS)
- String openGLCacheDirectory() const;
- String parentBundleDirectory() const;
- String networkingHSTSDatabasePath() const;
- String webContentHSTSDatabasePath() const;
- String containerTemporaryDirectory() const;
-#endif
-
-#if PLATFORM(COCOA)
- void registerNotificationObservers();
- void unregisterNotificationObservers();
-#endif
-
- void addPlugInAutoStartOriginHash(const String& pageOrigin, unsigned plugInOriginHash, WebCore::SessionID);
- void plugInDidReceiveUserInteraction(unsigned plugInOriginHash, WebCore::SessionID);
-
- void setAnyPageGroupMightHavePrivateBrowsingEnabled(bool);
-
-#if ENABLE(NETSCAPE_PLUGIN_API)
- // PluginInfoStoreClient:
- virtual void pluginInfoStoreDidLoadPlugins(PluginInfoStore*) override;
-#endif
-
- IPC::MessageReceiverMap m_messageReceiverMap;
-
- ProcessModel m_processModel;
- unsigned m_webProcessCountLimit; // The limit has no effect when process model is ProcessModelSharedSecondaryProcess.
-
- Vector<RefPtr<WebProcessProxy>> m_processes;
- bool m_haveInitialEmptyProcess;
-
- WebProcessProxy* m_processWithPageCache;
-
- Ref<WebPageGroup> m_defaultPageGroup;
-
- RefPtr<API::Object> m_injectedBundleInitializationUserData;
- String m_injectedBundlePath;
- WebContextInjectedBundleClient m_injectedBundleClient;
-
- WebContextClient m_client;
- WebContextConnectionClient m_connectionClient;
- std::unique_ptr<API::DownloadClient> m_downloadClient;
- std::unique_ptr<API::LegacyContextHistoryClient> m_historyClient;
-
-#if ENABLE(NETSCAPE_PLUGIN_API)
- PluginInfoStore m_pluginInfoStore;
-#endif
- RefPtr<VisitedLinkProvider> m_visitedLinkProvider;
- bool m_visitedLinksPopulated;
-
- PlugInAutoStartProvider m_plugInAutoStartProvider;
-
- HashSet<String> m_schemesToRegisterAsEmptyDocument;
- HashSet<String> m_schemesToRegisterAsSecure;
- HashSet<String> m_schemesToSetDomainRelaxationForbiddenFor;
- HashSet<String> m_schemesToRegisterAsLocal;
- HashSet<String> m_schemesToRegisterAsNoAccess;
- HashSet<String> m_schemesToRegisterAsDisplayIsolated;
- HashSet<String> m_schemesToRegisterAsCORSEnabled;
-#if ENABLE(CACHE_PARTITIONING)
- HashSet<String> m_schemesToRegisterAsCachePartitioned;
-#endif
-
- bool m_alwaysUsesComplexTextCodePath;
- bool m_shouldUseFontSmoothing;
-
- // Messages that were posted before any pages were created.
- // The client should use initialization messages instead, so that a restarted process would get the same state.
- Vector<std::pair<String, RefPtr<API::Object>>> m_messagesToInjectedBundlePostedToEmptyContext;
-
- CacheModel m_cacheModel;
-
- bool m_memorySamplerEnabled;
- double m_memorySamplerInterval;
-
- RefPtr<WebIconDatabase> m_iconDatabase;
-#if ENABLE(NETSCAPE_PLUGIN_API)
- RefPtr<WebPluginSiteDataManager> m_pluginSiteDataManager;
-#endif
-
- RefPtr<WebsiteDataStore> m_websiteDataStore;
- RefPtr<StorageManager> m_storageManager;
-
- typedef HashMap<const char*, RefPtr<WebContextSupplement>, PtrHash<const char*>> WebContextSupplementMap;
- WebContextSupplementMap m_supplements;
-
-#if USE(SOUP)
- HTTPCookieAcceptPolicy m_initialHTTPCookieAcceptPolicy;
-#endif
-
-#if PLATFORM(MAC)
- RetainPtr<NSObject> m_enhancedAccessibilityObserver;
- RetainPtr<NSObject> m_automaticTextReplacementNotificationObserver;
- RetainPtr<NSObject> m_automaticSpellingCorrectionNotificationObserver;
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
- RetainPtr<NSObject> m_automaticQuoteSubstitutionNotificationObserver;
- RetainPtr<NSObject> m_automaticDashSubstitutionNotificationObserver;
-#endif
-#endif
-
- String m_overrideApplicationCacheDirectory;
- String m_overrideIconDatabasePath;
- String m_overrideDiskCacheDirectory;
- String m_overrideCookieStorageDirectory;
-
- String m_webSQLDatabaseDirectory;
- String m_indexedDBDatabaseDirectory;
- String m_mediaKeysStorageDirectory;
-
- bool m_shouldUseTestingNetworkSession;
-
- bool m_processTerminationEnabled;
-
-#if ENABLE(NETWORK_PROCESS)
- bool m_canHandleHTTPSServerTrustEvaluation;
- bool m_usesNetworkProcess;
- RefPtr<NetworkProcessProxy> m_networkProcess;
-#endif
-
-#if ENABLE(DATABASE_PROCESS)
- RefPtr<DatabaseProcessProxy> m_databaseProcess;
-#endif
-
- HashMap<uint64_t, RefPtr<DictionaryCallback>> m_dictionaryCallbacks;
- HashMap<uint64_t, RefPtr<StatisticsRequest>> m_statisticsRequests;
-
-#if USE(SOUP)
- bool m_ignoreTLSErrors;
-#endif
-
- bool m_memoryCacheDisabled;
-
- RefCounter m_userObservablePageCounter;
- RefCounter m_processSuppressionDisabledForPageCounter;
-
-#if PLATFORM(COCOA)
- RetainPtr<NSMutableDictionary> m_bundleParameters;
- ProcessSuppressionDisabledToken m_pluginProcessManagerProcessSuppressionDisabledToken;
-#endif
-};
-
-template<typename T>
-void WebContext::sendToNetworkingProcess(T&& message)
-{
- switch (m_processModel) {
- case ProcessModelSharedSecondaryProcess:
-#if ENABLE(NETWORK_PROCESS)
- if (m_usesNetworkProcess) {
- if (m_networkProcess && m_networkProcess->canSendMessage())
- m_networkProcess->send(std::forward<T>(message), 0);
- return;
- }
-#endif
- if (!m_processes.isEmpty() && m_processes[0]->canSendMessage())
- m_processes[0]->send(std::forward<T>(message), 0);
- return;
- case ProcessModelMultipleSecondaryProcesses:
-#if ENABLE(NETWORK_PROCESS)
- if (m_networkProcess && m_networkProcess->canSendMessage())
- m_networkProcess->send(std::forward<T>(message), 0);
- return;
-#else
- break;
-#endif
- }
- ASSERT_NOT_REACHED();
-}
-
-template<typename T>
-void WebContext::sendToNetworkingProcessRelaunchingIfNecessary(T&& message)
-{
- switch (m_processModel) {
- case ProcessModelSharedSecondaryProcess:
-#if ENABLE(NETWORK_PROCESS)
- if (m_usesNetworkProcess) {
- ensureNetworkProcess();
- m_networkProcess->send(std::forward<T>(message), 0);
- return;
- }
-#endif
- ensureSharedWebProcess();
- m_processes[0]->send(std::forward<T>(message), 0);
- return;
- case ProcessModelMultipleSecondaryProcesses:
-#if ENABLE(NETWORK_PROCESS)
- ensureNetworkProcess();
- m_networkProcess->send(std::forward<T>(message), 0);
- return;
-#else
- break;
-#endif
- }
- ASSERT_NOT_REACHED();
-}
-
-template<typename T>
-void WebContext::sendToDatabaseProcessRelaunchingIfNecessary(T&& message)
-{
-#if ENABLE(DATABASE_PROCESS)
- ensureDatabaseProcess();
- m_databaseProcess->send(std::forward<T>(message), 0);
-#else
- sendToAllProcessesRelaunchingThemIfNecessary(std::forward<T>(message));
-#endif
-}
-
-template<typename T>
-void WebContext::sendToAllProcesses(const T& message)
-{
- size_t processCount = m_processes.size();
- for (size_t i = 0; i < processCount; ++i) {
- WebProcessProxy* process = m_processes[i].get();
- if (process->canSendMessage())
- process->send(T(message), 0);
- }
-}
-
-template<typename T>
-void WebContext::sendToAllProcessesRelaunchingThemIfNecessary(const T& message)
-{
-// FIXME (Multi-WebProcess): WebContext doesn't track processes that have exited, so it cannot relaunch these. Perhaps this functionality won't be needed in this mode.
- if (m_processModel == ProcessModelSharedSecondaryProcess)
- ensureSharedWebProcess();
- sendToAllProcesses(message);
-}
-
-template<typename T>
-void WebContext::sendToOneProcess(T&& message)
-{
- if (m_processModel == ProcessModelSharedSecondaryProcess)
- ensureSharedWebProcess();
-
- bool messageSent = false;
- size_t processCount = m_processes.size();
- for (size_t i = 0; i < processCount; ++i) {
- WebProcessProxy* process = m_processes[i].get();
- if (process->canSendMessage()) {
- process->send(std::forward<T>(message), 0);
- messageSent = true;
- break;
- }
- }
-
- if (!messageSent && m_processModel == ProcessModelMultipleSecondaryProcesses) {
- warmInitialProcess();
- RefPtr<WebProcessProxy> process = m_processes.last();
- if (process->canSendMessage())
- process->send(std::forward<T>(message), 0);
- }
-}
-
-} // namespace WebKit
-
-#endif // WebContext_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextmessagesin"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/WebContext.messages.in (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.messages.in        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebContext.messages.in        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -1,64 +0,0 @@
</span><del>-# Copyright (C) 2010 Apple Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-messages -> WebContext LegacyReceiver {
-
- DidGetStatistics(struct WebKit::StatisticsData statisticsData, uint64_t callbackID)
-
-#if PLATFORM(IOS)
- WriteWebContentToPasteboard(struct WebCore::PasteboardWebContent content)
- WriteImageToPasteboard(struct WebCore::PasteboardImage pasteboardImage)
- WriteStringToPasteboard(String pasteboardType, String text)
- ReadStringFromPasteboard(uint64_t index, String pasteboardType) -> (String string)
- ReadURLFromPasteboard(uint64_t index, String pasteboardType) -> (String string)
- ReadBufferFromPasteboard(uint64_t index, String pasteboardType) -> (WebKit::SharedMemory::Handle handle, uint64_t size)
- GetPasteboardItemsCount() -> (uint64_t itemsCount)
-#endif
-
-#if PLATFORM(COCOA)
- # Pasteboard messages.
- GetPasteboardTypes(String pasteboardName) -> (Vector<String> types)
- GetPasteboardPathnamesForType(String pasteboardName, String pasteboardType) -> (Vector<String> pathnames)
- GetPasteboardStringForType(String pasteboardName, String pasteboardType) -> (String string)
- GetPasteboardBufferForType(String pasteboardName, String pasteboardType) -> (WebKit::SharedMemory::Handle handle, uint64_t size)
- PasteboardCopy(String fromPasteboard, String toPasteboard) -> (uint64_t changeCount)
- GetPasteboardChangeCount(String pasteboardName) -> (uint64_t changeCount)
- GetPasteboardUniqueName() -> (String pasteboardName)
- GetPasteboardColor(String pasteboardName) -> (WebCore::Color color)
- GetPasteboardURL(String pasteboardName) -> (String urlString)
- AddPasteboardTypes(String pasteboardName, Vector<String> pasteboardTypes) -> (uint64_t changeCount)
- SetPasteboardTypes(String pasteboardName, Vector<String> pasteboardTypes) -> (uint64_t changeCount)
- SetPasteboardPathnamesForType(String pasteboardName, String pasteboardType, Vector<String> pathnames) -> (uint64_t changeCount)
- SetPasteboardStringForType(String pasteboardName, String pasteboardType, String string) -> (uint64_t changeCount)
- SetPasteboardBufferForType(String pasteboardName, String pasteboardType, WebKit::SharedMemory::Handle handle, uint64_t size) -> (uint64_t changeCount)
-#endif
-
-#if !PLATFORM(COCOA)
- // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
- // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
- Dummy() -> (bool dummyReturn)
-#endif
-
- # Plug-in messages.
- void AddPlugInAutoStartOriginHash(String pageOrigin, uint32_t hash, WebCore::SessionID sessionID)
- void PlugInDidReceiveUserInteraction(uint32_t hash, WebCore::SessionID sessionID)
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContextClient.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContextClient.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebContextClient.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -27,27 +27,27 @@
</span><span class="cx"> #include "WebContextClient.h"
</span><span class="cx">
</span><span class="cx"> #include "APIArray.h"
</span><del>-#include "WebContext.h"
</del><ins>+#include "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-void WebContextClient::plugInAutoStartOriginHashesChanged(WebContext* context)
</del><ins>+void WebContextClient::plugInAutoStartOriginHashesChanged(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.plugInAutoStartOriginHashesChanged)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.plugInAutoStartOriginHashesChanged(toAPI(context), m_client.base.clientInfo);
</del><ins>+ m_client.plugInAutoStartOriginHashesChanged(toAPI(processPool), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void WebContextClient::networkProcessDidCrash(WebContext* context)
</del><ins>+void WebContextClient::networkProcessDidCrash(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.networkProcessDidCrash)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.networkProcessDidCrash(toAPI(context), m_client.base.clientInfo);
</del><ins>+ m_client.networkProcessDidCrash(toAPI(processPool), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void WebContextClient::plugInInformationBecameAvailable(WebContext* context, API::Array* plugInInfo)
</del><ins>+void WebContextClient::plugInInformationBecameAvailable(WebProcessPool* processPool, API::Array* plugInInfo)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.plugInInformationBecameAvailable)
</span><span class="cx"> return;
</span><span class="lines">@@ -55,15 +55,15 @@
</span><span class="cx"> // FIXME: The API contract expects us to hand a reference to the array here. This is wrong.
</span><span class="cx"> plugInInfo->ref();
</span><span class="cx">
</span><del>- m_client.plugInInformationBecameAvailable(toAPI(context), toAPI(plugInInfo), m_client.base.clientInfo);
</del><ins>+ m_client.plugInInformationBecameAvailable(toAPI(processPool), toAPI(plugInInfo), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<API::Data> WebContextClient::copyWebCryptoMasterKey(WebContext* context)
</del><ins>+PassRefPtr<API::Data> WebContextClient::copyWebCryptoMasterKey(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.copyWebCryptoMasterKey)
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return adoptRef(toImpl(m_client.copyWebCryptoMasterKey(toAPI(context), m_client.base.clientInfo)));
</del><ins>+ return adoptRef(toImpl(m_client.copyWebCryptoMasterKey(toAPI(processPool), m_client.base.clientInfo)));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContextClient.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContextClient.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebContextClient.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -38,16 +38,17 @@
</span><span class="cx"> };
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx">
</span><span class="cx"> class WebContextClient : public API::Client<WKContextClientBase> {
</span><span class="cx"> public:
</span><del>- void plugInAutoStartOriginHashesChanged(WebContext*);
- void networkProcessDidCrash(WebContext*);
- void plugInInformationBecameAvailable(WebContext*, API::Array*);
- PassRefPtr<API::Data> copyWebCryptoMasterKey(WebContext*);
</del><ins>+ void plugInAutoStartOriginHashesChanged(WebProcessPool*);
+ void networkProcessDidCrash(WebProcessPool*);
+ void plugInInformationBecameAvailable(WebProcessPool*, API::Array*);
+ PassRefPtr<API::Data> copyWebCryptoMasterKey(WebProcessPool*);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextConnectionClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContextConnectionClient.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContextConnectionClient.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebContextConnectionClient.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -27,16 +27,16 @@
</span><span class="cx"> #include "WebContextConnectionClient.h"
</span><span class="cx">
</span><span class="cx"> #include "WKAPICast.h"
</span><del>-#include "WebContext.h"
</del><ins>+#include "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-void WebContextConnectionClient::didCreateConnection(WebContext* context, WebConnection* connection)
</del><ins>+void WebContextConnectionClient::didCreateConnection(WebProcessPool* processPool, WebConnection* connection)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didCreateConnection)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didCreateConnection(toAPI(context), toAPI(connection), m_client.base.clientInfo);
</del><ins>+ m_client.didCreateConnection(toAPI(processPool), toAPI(connection), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextConnectionClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContextConnectionClient.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContextConnectionClient.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebContextConnectionClient.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -38,11 +38,11 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> class WebConnection;
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx">
</span><span class="cx"> class WebContextConnectionClient : public API::Client<WKContextConnectionClientBase> {
</span><span class="cx"> public:
</span><del>- void didCreateConnection(WebContext*, WebConnection*);
</del><ins>+ void didCreateConnection(WebProcessPool*, WebConnection*);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextInjectedBundleClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContextInjectedBundleClient.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContextInjectedBundleClient.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebContextInjectedBundleClient.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -27,37 +27,37 @@
</span><span class="cx"> #include "WebContextInjectedBundleClient.h"
</span><span class="cx">
</span><span class="cx"> #include "WKAPICast.h"
</span><del>-#include "WebContext.h"
</del><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-void WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle(WebContext* context, const String& messageName, API::Object* messageBody)
</del><ins>+void WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle(WebProcessPool* processPool, const String& messageName, API::Object* messageBody)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didReceiveMessageFromInjectedBundle)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- m_client.didReceiveMessageFromInjectedBundle(toAPI(context), toAPI(messageName.impl()), toAPI(messageBody), m_client.base.clientInfo);
</del><ins>+ m_client.didReceiveMessageFromInjectedBundle(toAPI(processPool), toAPI(messageName.impl()), toAPI(messageBody), m_client.base.clientInfo);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void WebContextInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle(WebContext* context, const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData)
</del><ins>+void WebContextInjectedBundleClient::didReceiveSynchronousMessageFromInjectedBundle(WebProcessPool* processPool, const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.didReceiveSynchronousMessageFromInjectedBundle)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> WKTypeRef returnDataRef = 0;
</span><del>- m_client.didReceiveSynchronousMessageFromInjectedBundle(toAPI(context), toAPI(messageName.impl()), toAPI(messageBody), &returnDataRef, m_client.base.clientInfo);
</del><ins>+ m_client.didReceiveSynchronousMessageFromInjectedBundle(toAPI(processPool), toAPI(messageName.impl()), toAPI(messageBody), &returnDataRef, m_client.base.clientInfo);
</ins><span class="cx"> returnData = adoptRef(toImpl(returnDataRef));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<API::Object> WebContextInjectedBundleClient::getInjectedBundleInitializationUserData(WebContext* context)
</del><ins>+PassRefPtr<API::Object> WebContextInjectedBundleClient::getInjectedBundleInitializationUserData(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_client.getInjectedBundleInitializationUserData)
</span><span class="cx"> return 0;
</span><span class="cx">
</span><del>- return toImpl(m_client.getInjectedBundleInitializationUserData(toAPI(context), m_client.base.clientInfo));
</del><ins>+ return toImpl(m_client.getInjectedBundleInitializationUserData(toAPI(processPool), m_client.base.clientInfo));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextInjectedBundleClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContextInjectedBundleClient.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContextInjectedBundleClient.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebContextInjectedBundleClient.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -40,13 +40,13 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx">
</span><span class="cx"> class WebContextInjectedBundleClient : public API::Client<WKContextInjectedBundleClientBase> {
</span><span class="cx"> public:
</span><del>- void didReceiveMessageFromInjectedBundle(WebContext*, const String&, API::Object*);
- void didReceiveSynchronousMessageFromInjectedBundle(WebContext*, const String&, API::Object*, RefPtr<API::Object>& returnData);
- PassRefPtr<API::Object> getInjectedBundleInitializationUserData(WebContext*);
</del><ins>+ void didReceiveMessageFromInjectedBundle(WebProcessPool*, const String&, API::Object*);
+ void didReceiveSynchronousMessageFromInjectedBundle(WebProcessPool*, const String&, API::Object*, RefPtr<API::Object>& returnData);
+ PassRefPtr<API::Object> getInjectedBundleInitializationUserData(WebProcessPool*);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextSupplementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContextSupplement.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContextSupplement.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebContextSupplement.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -30,13 +30,13 @@
</span><span class="cx">
</span><span class="cx"> class DatabaseProcessProxy;
</span><span class="cx"> class NetworkProcessProxy;
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx"> class WebProcessProxy;
</span><span class="cx">
</span><span class="cx"> class WebContextSupplement {
</span><span class="cx"> public:
</span><del>- WebContextSupplement(WebContext* context)
- : m_context(context)
</del><ins>+ WebContextSupplement(WebProcessPool* processPool)
+ : m_processPool(processPool)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>- virtual void contextDestroyed()
</del><ins>+ virtual void processPoolDestroyed()
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -65,8 +65,8 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- WebContext* context() const { return m_context; }
- void clearContext() { m_context = 0; }
</del><ins>+ WebProcessPool* processPool() const { return m_processPool; }
+ void clearProcessPool() { m_processPool = nullptr; }
</ins><span class="cx">
</span><span class="cx"> void ref() { refWebContextSupplement(); }
</span><span class="cx"> void deref() { derefWebContextSupplement(); }
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> virtual void refWebContextSupplement() = 0;
</span><span class="cx"> virtual void derefWebContextSupplement() = 0;
</span><span class="cx">
</span><del>- WebContext* m_context;
</del><ins>+ WebProcessPool* m_processPool;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextUserMessageCodersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContextUserMessageCoders.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContextUserMessageCoders.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebContextUserMessageCoders.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -24,7 +24,6 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> #include "UserMessageCoders.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebFrameProxy.h"
</span><span class="cx"> #include "WebPageGroup.h"
</span><span class="cx"> #include "WebPageGroupData.h"
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebCookieManagerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebCookieManagerProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -29,9 +29,9 @@
</span><span class="cx"> #include "APIArray.h"
</span><span class="cx"> #include "APISecurityOrigin.h"
</span><span class="cx"> #include "SecurityOriginData.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebCookieManagerMessages.h"
</span><span class="cx"> #include "WebCookieManagerProxyMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="lines">@@ -40,18 +40,18 @@
</span><span class="cx"> return "WebCookieManagerProxy";
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<WebCookieManagerProxy> WebCookieManagerProxy::create(WebContext* context)
</del><ins>+PassRefPtr<WebCookieManagerProxy> WebCookieManagerProxy::create(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new WebCookieManagerProxy(context));
</del><ins>+ return adoptRef(new WebCookieManagerProxy(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-WebCookieManagerProxy::WebCookieManagerProxy(WebContext* context)
- : WebContextSupplement(context)
</del><ins>+WebCookieManagerProxy::WebCookieManagerProxy(WebProcessPool* processPool)
+ : WebContextSupplement(processPool)
</ins><span class="cx"> #if USE(SOUP)
</span><span class="cx"> , m_cookiePersistentStorageType(SoupCookiePersistentStorageSQLite)
</span><span class="cx"> #endif
</span><span class="cx"> {
</span><del>- WebContextSupplement::context()->addMessageReceiver(Messages::WebCookieManagerProxy::messageReceiverName(), *this);
</del><ins>+ WebContextSupplement::processPool()->addMessageReceiver(Messages::WebCookieManagerProxy::messageReceiverName(), *this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebCookieManagerProxy::~WebCookieManagerProxy()
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><span class="cx">
</span><del>-void WebCookieManagerProxy::contextDestroyed()
</del><ins>+void WebCookieManagerProxy::processPoolDestroyed()
</ins><span class="cx"> {
</span><span class="cx"> invalidateCallbackMap(m_arrayCallbacks, CallbackBase::Error::OwnerWasInvalidated);
</span><span class="cx"> invalidateCallbackMap(m_httpCookieAcceptPolicyCallbacks, CallbackBase::Error::OwnerWasInvalidated);
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx">
</span><span class="cx"> bool WebCookieManagerProxy::shouldTerminate(WebProcessProxy*) const
</span><span class="cx"> {
</span><del>- return context()->processModel() != ProcessModelSharedSecondaryProcess
</del><ins>+ return processPool()->processModel() != ProcessModelSharedSecondaryProcess
</ins><span class="cx"> || (m_arrayCallbacks.isEmpty() && m_httpCookieAcceptPolicyCallbacks.isEmpty());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> uint64_t callbackID = callback->callbackID();
</span><span class="cx"> m_arrayCallbacks.set(callbackID, callback.release());
</span><span class="cx">
</span><del>- context()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::GetHostnamesWithCookies(callbackID));
</del><ins>+ processPool()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::GetHostnamesWithCookies(callbackID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebCookieManagerProxy::didGetHostnamesWithCookies(const Vector<String>& hostnames, uint64_t callbackID)
</span><span class="lines">@@ -121,27 +121,27 @@
</span><span class="cx">
</span><span class="cx"> void WebCookieManagerProxy::deleteCookiesForHostname(const String& hostname)
</span><span class="cx"> {
</span><del>- context()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::DeleteCookiesForHostname(hostname));
</del><ins>+ processPool()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::DeleteCookiesForHostname(hostname));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebCookieManagerProxy::deleteAllCookies()
</span><span class="cx"> {
</span><del>- context()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::DeleteAllCookies());
</del><ins>+ processPool()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::DeleteAllCookies());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebCookieManagerProxy::deleteAllCookiesModifiedSince(std::chrono::system_clock::time_point time)
</span><span class="cx"> {
</span><del>- context()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::DeleteAllCookiesModifiedSince(time));
</del><ins>+ processPool()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::DeleteAllCookiesModifiedSince(time));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebCookieManagerProxy::startObservingCookieChanges()
</span><span class="cx"> {
</span><del>- context()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::StartObservingCookieChanges());
</del><ins>+ processPool()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::StartObservingCookieChanges());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebCookieManagerProxy::stopObservingCookieChanges()
</span><span class="cx"> {
</span><del>- context()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::StopObservingCookieChanges());
</del><ins>+ processPool()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::StopObservingCookieChanges());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebCookieManagerProxy::cookiesDidChange()
</span><span class="lines">@@ -155,10 +155,10 @@
</span><span class="cx"> persistHTTPCookieAcceptPolicy(policy);
</span><span class="cx"> #endif
</span><span class="cx"> #if USE(SOUP)
</span><del>- context()->setInitialHTTPCookieAcceptPolicy(policy);
</del><ins>+ processPool()->setInitialHTTPCookieAcceptPolicy(policy);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- context()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::SetHTTPCookieAcceptPolicy(policy));
</del><ins>+ processPool()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::SetHTTPCookieAcceptPolicy(policy));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebCookieManagerProxy::getHTTPCookieAcceptPolicy(std::function<void (HTTPCookieAcceptPolicy, CallbackBase::Error)> callbackFunction)
</span><span class="lines">@@ -168,7 +168,7 @@
</span><span class="cx"> uint64_t callbackID = callback->callbackID();
</span><span class="cx"> m_httpCookieAcceptPolicyCallbacks.set(callbackID, callback.release());
</span><span class="cx">
</span><del>- context()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::GetHTTPCookieAcceptPolicy(callbackID));
</del><ins>+ processPool()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::WebCookieManager::GetHTTPCookieAcceptPolicy(callbackID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebCookieManagerProxy::didGetHTTPCookieAcceptPolicy(uint32_t policy, uint64_t callbackID)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebCookieManagerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebCookieManagerProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebCookieManagerProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebCookieManagerProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -43,9 +43,10 @@
</span><span class="cx"> class Array;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx"> class WebProcessProxy;
</span><span class="cx">
</span><span class="cx"> typedef GenericCallback<API::Array*> ArrayCallback;
</span><span class="lines">@@ -55,7 +56,7 @@
</span><span class="cx"> public:
</span><span class="cx"> static const char* supplementName();
</span><span class="cx">
</span><del>- static PassRefPtr<WebCookieManagerProxy> create(WebContext*);
</del><ins>+ static PassRefPtr<WebCookieManagerProxy> create(WebProcessPool*);
</ins><span class="cx"> virtual ~WebCookieManagerProxy();
</span><span class="cx">
</span><span class="cx"> void initializeClient(const WKCookieManagerClientBase*);
</span><span class="lines">@@ -80,7 +81,7 @@
</span><span class="cx"> using API::Object::deref;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- WebCookieManagerProxy(WebContext*);
</del><ins>+ WebCookieManagerProxy(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> void didGetHostnamesWithCookies(const Vector<String>&, uint64_t callbackID);
</span><span class="cx"> void didGetHTTPCookieAcceptPolicy(uint32_t policy, uint64_t callbackID);
</span><span class="lines">@@ -88,7 +89,7 @@
</span><span class="cx"> void cookiesDidChange();
</span><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><del>- virtual void contextDestroyed() override;
</del><ins>+ virtual void processPoolDestroyed() override;
</ins><span class="cx"> virtual void processDidClose(WebProcessProxy*) override;
</span><span class="cx"> virtual void processDidClose(NetworkProcessProxy*) override;
</span><span class="cx"> virtual bool shouldTerminate(WebProcessProxy*) const override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebDatabaseManagerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -31,9 +31,9 @@
</span><span class="cx"> #include "APIArray.h"
</span><span class="cx"> #include "APISecurityOrigin.h"
</span><span class="cx"> #include "ImmutableDictionary.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebDatabaseManagerMessages.h"
</span><span class="cx"> #include "WebDatabaseManagerProxyMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -105,15 +105,15 @@
</span><span class="cx"> return key;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<WebDatabaseManagerProxy> WebDatabaseManagerProxy::create(WebContext* webContext)
</del><ins>+PassRefPtr<WebDatabaseManagerProxy> WebDatabaseManagerProxy::create(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new WebDatabaseManagerProxy(webContext));
</del><ins>+ return adoptRef(new WebDatabaseManagerProxy(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-WebDatabaseManagerProxy::WebDatabaseManagerProxy(WebContext* webContext)
- : WebContextSupplement(webContext)
</del><ins>+WebDatabaseManagerProxy::WebDatabaseManagerProxy(WebProcessPool* processPool)
+ : WebContextSupplement(processPool)
</ins><span class="cx"> {
</span><del>- WebContextSupplement::context()->addMessageReceiver(Messages::WebDatabaseManagerProxy::messageReceiverName(), *this);
</del><ins>+ WebContextSupplement::processPool()->addMessageReceiver(Messages::WebDatabaseManagerProxy::messageReceiverName(), *this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebDatabaseManagerProxy::~WebDatabaseManagerProxy()
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><span class="cx">
</span><del>-void WebDatabaseManagerProxy::contextDestroyed()
</del><ins>+void WebDatabaseManagerProxy::processPoolDestroyed()
</ins><span class="cx"> {
</span><span class="cx"> invalidateCallbackMap(m_arrayCallbacks, CallbackBase::Error::OwnerWasInvalidated);
</span><span class="cx"> }
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx"> uint64_t callbackID = callback->callbackID();
</span><span class="cx"> m_arrayCallbacks.set(callbackID, callback.release());
</span><span class="cx">
</span><del>- context()->sendToOneProcess(Messages::WebDatabaseManager::GetDatabasesByOrigin(callbackID));
</del><ins>+ processPool()->sendToOneProcess(Messages::WebDatabaseManager::GetDatabasesByOrigin(callbackID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebDatabaseManagerProxy::didGetDatabasesByOrigin(const Vector<OriginAndDatabases>& originAndDatabasesVector, uint64_t callbackID)
</span><span class="lines">@@ -211,7 +211,7 @@
</span><span class="cx"> uint64_t callbackID = callback->callbackID();
</span><span class="cx"> m_arrayCallbacks.set(callbackID, callback.release());
</span><span class="cx">
</span><del>- context()->sendToOneProcess(Messages::WebDatabaseManager::GetDatabaseOrigins(callbackID));
</del><ins>+ processPool()->sendToOneProcess(Messages::WebDatabaseManager::GetDatabaseOrigins(callbackID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebDatabaseManagerProxy::didGetDatabaseOrigins(const Vector<String>& originIdentifiers, uint64_t callbackID)
</span><span class="lines">@@ -233,22 +233,22 @@
</span><span class="cx">
</span><span class="cx"> void WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin(const String& databaseIdentifier, API::SecurityOrigin* origin)
</span><span class="cx"> {
</span><del>- context()->sendToOneProcess(Messages::WebDatabaseManager::DeleteDatabaseWithNameForOrigin(databaseIdentifier, origin->securityOrigin().databaseIdentifier()));
</del><ins>+ processPool()->sendToOneProcess(Messages::WebDatabaseManager::DeleteDatabaseWithNameForOrigin(databaseIdentifier, origin->securityOrigin().databaseIdentifier()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebDatabaseManagerProxy::deleteDatabasesForOrigin(API::SecurityOrigin* origin)
</span><span class="cx"> {
</span><del>- context()->sendToOneProcess(Messages::WebDatabaseManager::DeleteDatabasesForOrigin(origin->securityOrigin().databaseIdentifier()));
</del><ins>+ processPool()->sendToOneProcess(Messages::WebDatabaseManager::DeleteDatabasesForOrigin(origin->securityOrigin().databaseIdentifier()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebDatabaseManagerProxy::deleteAllDatabases()
</span><span class="cx"> {
</span><del>- context()->sendToOneProcess(Messages::WebDatabaseManager::DeleteAllDatabases());
</del><ins>+ processPool()->sendToOneProcess(Messages::WebDatabaseManager::DeleteAllDatabases());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebDatabaseManagerProxy::setQuotaForOrigin(API::SecurityOrigin* origin, uint64_t quota)
</span><span class="cx"> {
</span><del>- context()->sendToOneProcess(Messages::WebDatabaseManager::SetQuotaForOrigin(origin->securityOrigin().databaseIdentifier(), quota));
</del><ins>+ processPool()->sendToOneProcess(Messages::WebDatabaseManager::SetQuotaForOrigin(origin->securityOrigin().databaseIdentifier(), quota));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebDatabaseManagerProxy::didModifyOrigin(const String& originIdentifier)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebDatabaseManagerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx"> class WebProcessProxy;
</span><span class="cx">
</span><span class="cx"> typedef GenericCallback<API::Array*> ArrayCallback;
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> public:
</span><span class="cx"> static const char* supplementName();
</span><span class="cx">
</span><del>- static PassRefPtr<WebDatabaseManagerProxy> create(WebContext*);
</del><ins>+ static PassRefPtr<WebDatabaseManagerProxy> create(WebProcessPool*);
</ins><span class="cx"> virtual ~WebDatabaseManagerProxy();
</span><span class="cx">
</span><span class="cx"> void initializeClient(const WKDatabaseManagerClientBase*);
</span><span class="lines">@@ -76,10 +76,10 @@
</span><span class="cx"> using API::Object::deref;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit WebDatabaseManagerProxy(WebContext*);
</del><ins>+ explicit WebDatabaseManagerProxy(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><del>- virtual void contextDestroyed() override;
</del><ins>+ virtual void processPoolDestroyed() override;
</ins><span class="cx"> virtual void processDidClose(WebProcessProxy*) override;
</span><span class="cx"> virtual bool shouldTerminate(WebProcessProxy*) const override;
</span><span class="cx"> virtual void refWebContextSupplement() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebFrameProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebFrameProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -27,11 +27,11 @@
</span><span class="cx"> #include "WebFrameProxy.h"
</span><span class="cx">
</span><span class="cx"> #include "WebCertificateInfo.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebFormSubmissionListenerProxy.h"
</span><span class="cx"> #include "WebFramePolicyListenerProxy.h"
</span><span class="cx"> #include "WebPageMessages.h"
</span><span class="cx"> #include "WebPageProxy.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include <WebCore/DOMImplementation.h>
</span><span class="cx"> #include <WebCore/Image.h>
</span><span class="cx"> #include <WebCore/MIMETypeRegistry.h>
</span><span class="lines">@@ -47,12 +47,12 @@
</span><span class="cx"> , m_isFrameSet(false)
</span><span class="cx"> , m_frameID(frameID)
</span><span class="cx"> {
</span><del>- WebContext::statistics().wkFrameCount++;
</del><ins>+ WebProcessPool::statistics().wkFrameCount++;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebFrameProxy::~WebFrameProxy()
</span><span class="cx"> {
</span><del>- WebContext::statistics().wkFrameCount--;
</del><ins>+ WebProcessPool::statistics().wkFrameCount--;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebFrameProxy::disconnect()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebGeolocationManagerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -26,9 +26,9 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "WebGeolocationManagerProxy.h"
</span><span class="cx">
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebGeolocationManagerMessages.h"
</span><span class="cx"> #include "WebGeolocationManagerProxyMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="lines">@@ -37,15 +37,15 @@
</span><span class="cx"> return "WebGeolocationManagerProxy";
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<WebGeolocationManagerProxy> WebGeolocationManagerProxy::create(WebContext* context)
</del><ins>+PassRefPtr<WebGeolocationManagerProxy> WebGeolocationManagerProxy::create(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new WebGeolocationManagerProxy(context));
</del><ins>+ return adoptRef(new WebGeolocationManagerProxy(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-WebGeolocationManagerProxy::WebGeolocationManagerProxy(WebContext* context)
- : WebContextSupplement(context)
</del><ins>+WebGeolocationManagerProxy::WebGeolocationManagerProxy(WebProcessPool* processPool)
+ : WebContextSupplement(processPool)
</ins><span class="cx"> {
</span><del>- WebContextSupplement::context()->addMessageReceiver(Messages::WebGeolocationManagerProxy::messageReceiverName(), *this);
</del><ins>+ WebContextSupplement::processPool()->addMessageReceiver(Messages::WebGeolocationManagerProxy::messageReceiverName(), *this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebGeolocationManagerProxy::initializeProvider(const WKGeolocationProviderBase* provider)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><span class="cx">
</span><del>-void WebGeolocationManagerProxy::contextDestroyed()
</del><ins>+void WebGeolocationManagerProxy::processPoolDestroyed()
</ins><span class="cx"> {
</span><span class="cx"> m_updateRequesters.clear();
</span><span class="cx"> m_provider.stopUpdating(this);
</span><span class="lines">@@ -78,24 +78,24 @@
</span><span class="cx">
</span><span class="cx"> void WebGeolocationManagerProxy::providerDidChangePosition(WebGeolocationPosition* position)
</span><span class="cx"> {
</span><del>- if (!context())
</del><ins>+ if (!processPool())
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- context()->sendToAllProcesses(Messages::WebGeolocationManager::DidChangePosition(position->data()));
</del><ins>+ processPool()->sendToAllProcesses(Messages::WebGeolocationManager::DidChangePosition(position->data()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebGeolocationManagerProxy::providerDidFailToDeterminePosition(const String& errorMessage)
</span><span class="cx"> {
</span><del>- if (!context())
</del><ins>+ if (!processPool())
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- context()->sendToAllProcesses(Messages::WebGeolocationManager::DidFailToDeterminePosition(errorMessage));
</del><ins>+ processPool()->sendToAllProcesses(Messages::WebGeolocationManager::DidFailToDeterminePosition(errorMessage));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> void WebGeolocationManagerProxy::resetPermissions()
</span><span class="cx"> {
</span><del>- context()->sendToAllProcesses(Messages::WebGeolocationManager::ResetPermissions());
</del><ins>+ processPool()->sendToAllProcesses(Messages::WebGeolocationManager::ResetPermissions());
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebGeolocationManagerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebGeolocationManagerProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -36,14 +36,14 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
</del><span class="cx"> class WebGeolocationPosition;
</span><ins>+class WebProcessPool;
</ins><span class="cx">
</span><span class="cx"> class WebGeolocationManagerProxy : public API::ObjectImpl<API::Object::Type::GeolocationManager>, public WebContextSupplement, private IPC::MessageReceiver {
</span><span class="cx"> public:
</span><span class="cx"> static const char* supplementName();
</span><span class="cx">
</span><del>- static PassRefPtr<WebGeolocationManagerProxy> create(WebContext*);
</del><ins>+ static PassRefPtr<WebGeolocationManagerProxy> create(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> void initializeProvider(const WKGeolocationProviderBase*);
</span><span class="cx">
</span><span class="lines">@@ -57,10 +57,10 @@
</span><span class="cx"> using API::Object::deref;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit WebGeolocationManagerProxy(WebContext*);
</del><ins>+ explicit WebGeolocationManagerProxy(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><del>- virtual void contextDestroyed() override;
</del><ins>+ virtual void processPoolDestroyed() override;
</ins><span class="cx"> virtual void processDidClose(WebProcessProxy*) override;
</span><span class="cx"> virtual void refWebContextSupplement() override;
</span><span class="cx"> virtual void derefWebContextSupplement() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebIconDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebIconDatabase.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebIconDatabase.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebIconDatabase.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -27,9 +27,9 @@
</span><span class="cx"> #include "WebIconDatabase.h"
</span><span class="cx">
</span><span class="cx"> #include "Logging.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebIconDatabaseMessages.h"
</span><span class="cx"> #include "WebIconDatabaseProxyMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include <WebCore/FileSystem.h>
</span><span class="cx"> #include <WebCore/IconDatabase.h>
</span><span class="cx"> #include <WebCore/Image.h>
</span><span class="lines">@@ -39,22 +39,22 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-PassRefPtr<WebIconDatabase> WebIconDatabase::create(WebContext* context)
</del><ins>+PassRefPtr<WebIconDatabase> WebIconDatabase::create(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new WebIconDatabase(*context));
</del><ins>+ return adoptRef(new WebIconDatabase(*processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebIconDatabase::~WebIconDatabase()
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebIconDatabase::WebIconDatabase(WebContext& context)
- : m_webContext(&context)
</del><ins>+WebIconDatabase::WebIconDatabase(WebProcessPool& processPool)
+ : m_processPool(&processPool)
</ins><span class="cx"> , m_urlImportCompleted(false)
</span><span class="cx"> , m_databaseCleanupDisabled(false)
</span><span class="cx"> , m_shouldDerefWhenAppropriate(false)
</span><span class="cx"> {
</span><del>- m_webContext->addMessageReceiver(Messages::WebIconDatabase::messageReceiverName(), *this);
</del><ins>+ m_processPool->addMessageReceiver(Messages::WebIconDatabase::messageReceiverName(), *this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebIconDatabase::invalidate()
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> m_databaseCleanupDisabled = true;
</span><span class="cx"> m_iconDatabaseImpl->setEnabled(true);
</span><span class="cx">
</span><del>- // FIXME: WebIconDatabases are per-WebContext but WebContext's don't have their own notion of the current private browsing setting.
</del><ins>+ // FIXME: WebIconDatabases are per-ProcessPool but ProcessPools's don't have their own notion of the current private browsing setting.
</ins><span class="cx"> // As we clean up private browsing throughout the stack we need to clean it up here.
</span><span class="cx"> m_iconDatabaseImpl->setPrivateBrowsingEnabled(WebPreferences::anyPagesAreUsingPrivateBrowsing());
</span><span class="cx">
</span><span class="lines">@@ -161,12 +161,12 @@
</span><span class="cx"> {
</span><span class="cx"> LOG(IconDatabase, "WK2 UIProcess getting load decision for icon URL %s with callback ID %lli", iconURL.ascii().data(), static_cast<long long>(callbackID));
</span><span class="cx">
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (!m_iconDatabaseImpl || !m_iconDatabaseImpl->isOpen() || iconURL.isEmpty()) {
</span><span class="cx"> // FIXME (Multi-WebProcess): <rdar://problem/12240223> We need to know which connection to send this message to.
</span><del>- m_webContext->sendToAllProcesses(Messages::WebIconDatabaseProxy::ReceivedIconLoadDecision(static_cast<int>(IconLoadNo), callbackID));
</del><ins>+ m_processPool->sendToAllProcesses(Messages::WebIconDatabaseProxy::ReceivedIconLoadDecision(static_cast<int>(IconLoadNo), callbackID));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -181,7 +181,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FIXME (Multi-WebProcess): <rdar://problem/12240223> We need to know which connection to send this message to.
</span><del>- m_webContext->sendToAllProcesses(Messages::WebIconDatabaseProxy::ReceivedIconLoadDecision((int)decision, callbackID));
</del><ins>+ m_processPool->sendToAllProcesses(Messages::WebIconDatabaseProxy::ReceivedIconLoadDecision((int)decision, callbackID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebIconDatabase::didReceiveIconForPageURL(const String& pageURL)
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx">
</span><span class="cx"> Image* WebIconDatabase::imageForPageURL(const String& pageURL, const IntSize& iconSize)
</span><span class="cx"> {
</span><del>- if (!m_webContext || !m_iconDatabaseImpl || !m_iconDatabaseImpl->isOpen() || pageURL.isEmpty())
</del><ins>+ if (!m_processPool || !m_iconDatabaseImpl || !m_iconDatabaseImpl->isOpen() || pageURL.isEmpty())
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> // The WebCore IconDatabase ignores the passed in size parameter.
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx">
</span><span class="cx"> NativeImagePtr WebIconDatabase::nativeImageForPageURL(const String& pageURL, const IntSize& iconSize)
</span><span class="cx"> {
</span><del>- if (!m_webContext || !m_iconDatabaseImpl || !m_iconDatabaseImpl->isOpen() || pageURL.isEmpty())
</del><ins>+ if (!m_processPool || !m_iconDatabaseImpl || !m_iconDatabaseImpl->isOpen() || pageURL.isEmpty())
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><span class="cx"> return m_iconDatabaseImpl->synchronousNativeIconForPageURL(pageURL, iconSize);
</span><span class="lines">@@ -262,7 +262,7 @@
</span><span class="cx">
</span><span class="cx"> void WebIconDatabase::didFinishURLImport()
</span><span class="cx"> {
</span><del>- if (!m_webContext)
</del><ins>+ if (!m_processPool)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> ASSERT(!m_urlImportCompleted);
</span><span class="lines">@@ -277,7 +277,7 @@
</span><span class="cx"> ASSERT(decision != IconLoadUnknown);
</span><span class="cx">
</span><span class="cx"> // FIXME (Multi-WebProcess): <rdar://problem/12240223> We need to know which connection to send this message to.
</span><del>- m_webContext->sendToAllProcesses(Messages::WebIconDatabaseProxy::ReceivedIconLoadDecision(static_cast<int>(decision), slot.key));
</del><ins>+ m_processPool->sendToAllProcesses(Messages::WebIconDatabaseProxy::ReceivedIconLoadDecision(static_cast<int>(decision), slot.key));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> m_pendingLoadDecisionURLMap.clear();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebIconDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebIconDatabase.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebIconDatabase.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebIconDatabase.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -44,15 +44,15 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx">
</span><span class="cx"> class WebIconDatabase : public API::ObjectImpl<API::Object::Type::IconDatabase>, private WebCore::IconDatabaseClient, private IPC::MessageReceiver {
</span><span class="cx"> public:
</span><del>- static PassRefPtr<WebIconDatabase> create(WebContext*);
</del><ins>+ static PassRefPtr<WebIconDatabase> create(WebProcessPool*);
</ins><span class="cx"> virtual ~WebIconDatabase();
</span><span class="cx">
</span><span class="cx"> void invalidate();
</span><del>- void clearContext() { m_webContext = nullptr; }
</del><ins>+ void clearProcessPool() { m_processPool = nullptr; }
</ins><span class="cx"> void setDatabasePath(const String&);
</span><span class="cx"> void enableDatabaseCleanup();
</span><span class="cx">
</span><span class="lines">@@ -84,13 +84,13 @@
</span><span class="cx">
</span><span class="cx"> void setPrivateBrowsingEnabled(bool);
</span><span class="cx">
</span><del>- // Called when the WebContext is through with this WebIconDatabase but the
</del><ins>+ // Called when the WebProcessPool is through with this WebIconDatabase but the
</ins><span class="cx"> // WebCore::IconDatabase possibly isn't done shutting down.
</span><span class="cx"> // In that case this WebIconDatabase will deref() itself when the time is right.
</span><span class="cx"> void derefWhenAppropriate();
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit WebIconDatabase(WebContext&);
</del><ins>+ explicit WebIconDatabase(WebProcessPool&);
</ins><span class="cx">
</span><span class="cx"> // WebCore::IconDatabaseClient
</span><span class="cx"> virtual void didImportIconURLForPageURL(const String&) override;
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx">
</span><span class="cx"> void notifyIconDataReadyForPageURL(const String&);
</span><span class="cx">
</span><del>- WebContext* m_webContext;
</del><ins>+ WebProcessPool* m_processPool;
</ins><span class="cx">
</span><span class="cx"> std::unique_ptr<WebCore::IconDatabase> m_iconDatabaseImpl;
</span><span class="cx"> bool m_urlImportCompleted;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebInspectorProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><span class="cx">
</span><span class="cx"> #include "APIURLRequest.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebFramePolicyListenerProxy.h"
</span><span class="cx"> #include "WebFrameProxy.h"
</span><span class="cx"> #include "WebInspectorMessages.h"
</span><span class="lines">@@ -39,6 +38,7 @@
</span><span class="cx"> #include "WebPageGroup.h"
</span><span class="cx"> #include "WebPageProxy.h"
</span><span class="cx"> #include "WebPreferences.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include "WebProcessProxy.h"
</span><span class="cx"> #include <WebCore/SchemeRegistry.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="lines">@@ -362,20 +362,21 @@
</span><span class="cx"> return WebInspectorPageGroups::shared().isInspectorPageGroup(page.pageGroup());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-WebContext& WebInspectorProxy::inspectorContext()
</del><ins>+WebProcessPool& WebInspectorProxy::inspectorProcessPool()
</ins><span class="cx"> {
</span><del>- // Having our own context removes us from the main context's process pool and
</del><ins>+ // Having our own process pool removes us from the main process pool and
</ins><span class="cx"> // guarantees no process sharing for our user interface.
</span><span class="cx">
</span><del>- static WebContext* context;
- if (!context) {
- WebContextConfiguration configuration;
- WebContext::applyPlatformSpecificConfigurationDefaults(configuration);
- context = (WebContext::create(configuration)).leakRef();
- context->setProcessModel(ProcessModelMultipleSecondaryProcesses);
</del><ins>+ static WebProcessPool* processPool;
+ if (!processPool) {
+ WebProcessPoolConfiguration configuration;
+ WebProcessPool::applyPlatformSpecificConfigurationDefaults(configuration);
+
+ processPool = (WebProcessPool::create(WTF::move(configuration))).leakRef();
+ processPool->setProcessModel(ProcessModelMultipleSecondaryProcesses);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- return *context;
</del><ins>+ return *processPool;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool isMainOrTestInspectorPage(const WebInspectorProxy* webInspectorProxy, WKURLRequestRef requestRef)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebInspectorProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -61,10 +61,10 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
</del><span class="cx"> class WebFrameProxy;
</span><span class="cx"> class WebPageGroup;
</span><span class="cx"> class WebPageProxy;
</span><ins>+class WebProcessPool;
</ins><span class="cx">
</span><span class="cx"> enum AttachmentSide {
</span><span class="cx"> AttachmentSideBottom,
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx"> void togglePageProfiling();
</span><span class="cx">
</span><span class="cx"> static bool isInspectorPage(WebPageProxy&);
</span><del>- static WebContext& inspectorContext();
</del><ins>+ static WebProcessPool& inspectorProcessPool();
</ins><span class="cx">
</span><span class="cx"> // Provided by platform WebInspectorProxy implementations.
</span><span class="cx"> String inspectorPageURL() const;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebKeyValueStorageManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebKeyValueStorageManager.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebKeyValueStorageManager.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebKeyValueStorageManager.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> #include "APISecurityOrigin.h"
</span><span class="cx"> #include "LocalStorageDetails.h"
</span><span class="cx"> #include "SecurityOriginData.h"
</span><del>-#include "WebContext.h"
</del><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -60,13 +60,13 @@
</span><span class="cx"> return key;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<WebKeyValueStorageManager> WebKeyValueStorageManager::create(WebContext* context)
</del><ins>+PassRefPtr<WebKeyValueStorageManager> WebKeyValueStorageManager::create(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new WebKeyValueStorageManager(context));
</del><ins>+ return adoptRef(new WebKeyValueStorageManager(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-WebKeyValueStorageManager::WebKeyValueStorageManager(WebContext* context)
- : WebContextSupplement(context)
</del><ins>+WebKeyValueStorageManager::WebKeyValueStorageManager(WebProcessPool* processPool)
+ : WebContextSupplement(processPool)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx">
</span><span class="cx"> void WebKeyValueStorageManager::getKeyValueStorageOrigins(std::function<void (API::Array*, CallbackBase::Error)> callbackFunction)
</span><span class="cx"> {
</span><del>- context()->storageManager().getOrigins([callbackFunction](Vector<RefPtr<SecurityOrigin>> securityOrigins) {
</del><ins>+ processPool()->storageManager().getOrigins([callbackFunction](Vector<RefPtr<SecurityOrigin>> securityOrigins) {
</ins><span class="cx"> Vector<RefPtr<API::Object>> webSecurityOrigins;
</span><span class="cx"> webSecurityOrigins.reserveInitialCapacity(securityOrigins.size());
</span><span class="cx"> for (auto& origin : securityOrigins)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">
</span><span class="cx"> void WebKeyValueStorageManager::getStorageDetailsByOrigin(std::function<void (API::Array*, CallbackBase::Error)> callbackFunction)
</span><span class="cx"> {
</span><del>- context()->storageManager().getStorageDetailsByOrigin([callbackFunction](Vector<LocalStorageDetails> storageDetails) {
</del><ins>+ processPool()->storageManager().getStorageDetailsByOrigin([callbackFunction](Vector<LocalStorageDetails> storageDetails) {
</ins><span class="cx"> HashMap<String, RefPtr<API::Object>> detailsMap;
</span><span class="cx"> Vector<RefPtr<API::Object>> result;
</span><span class="cx"> result.reserveInitialCapacity(storageDetails.size());
</span><span class="lines">@@ -125,12 +125,12 @@
</span><span class="cx">
</span><span class="cx"> void WebKeyValueStorageManager::deleteEntriesForOrigin(API::SecurityOrigin* origin)
</span><span class="cx"> {
</span><del>- context()->storageManager().deleteEntriesForOrigin(origin->securityOrigin());
</del><ins>+ processPool()->storageManager().deleteEntriesForOrigin(origin->securityOrigin());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebKeyValueStorageManager::deleteAllEntries()
</span><span class="cx"> {
</span><del>- context()->storageManager().deleteAllEntries();
</del><ins>+ processPool()->storageManager().deleteAllEntries();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebKeyValueStorageManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebKeyValueStorageManager.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebKeyValueStorageManager.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebKeyValueStorageManager.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -36,13 +36,14 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><ins>+class WebProcessPool;
</ins><span class="cx"> typedef GenericCallback<API::Array*> ArrayCallback;
</span><span class="cx">
</span><span class="cx"> class WebKeyValueStorageManager : public API::ObjectImpl<API::Object::Type::KeyValueStorageManager>, public WebContextSupplement {
</span><span class="cx"> public:
</span><span class="cx"> static const char* supplementName();
</span><span class="cx">
</span><del>- static PassRefPtr<WebKeyValueStorageManager> create(WebContext*);
</del><ins>+ static PassRefPtr<WebKeyValueStorageManager> create(WebProcessPool*);
</ins><span class="cx"> virtual ~WebKeyValueStorageManager();
</span><span class="cx">
</span><span class="cx"> void getKeyValueStorageOrigins(std::function<void (API::Array*, CallbackBase::Error)>);
</span><span class="lines">@@ -58,7 +59,7 @@
</span><span class="cx"> static String modificationTimeKey();
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit WebKeyValueStorageManager(WebContext*);
</del><ins>+ explicit WebKeyValueStorageManager(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><span class="cx"> virtual void refWebContextSupplement() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebMediaCacheManagerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -27,10 +27,9 @@
</span><span class="cx"> #include "WebMediaCacheManagerProxy.h"
</span><span class="cx">
</span><span class="cx"> #include "APIArray.h"
</span><del>-#include "APISecurityOrigin.h"
-#include "WebContext.h"
</del><span class="cx"> #include "WebMediaCacheManagerMessages.h"
</span><span class="cx"> #include "WebMediaCacheManagerProxyMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="lines">@@ -39,15 +38,15 @@
</span><span class="cx"> return "WebMediaCacheManagerProxy";
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<WebMediaCacheManagerProxy> WebMediaCacheManagerProxy::create(WebContext* context)
</del><ins>+PassRefPtr<WebMediaCacheManagerProxy> WebMediaCacheManagerProxy::create(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new WebMediaCacheManagerProxy(context));
</del><ins>+ return adoptRef(new WebMediaCacheManagerProxy(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-WebMediaCacheManagerProxy::WebMediaCacheManagerProxy(WebContext* context)
- : WebContextSupplement(context)
</del><ins>+WebMediaCacheManagerProxy::WebMediaCacheManagerProxy(WebProcessPool* processPool)
+ : WebContextSupplement(processPool)
</ins><span class="cx"> {
</span><del>- WebContextSupplement::context()->addMessageReceiver(Messages::WebMediaCacheManagerProxy::messageReceiverName(), *this);
</del><ins>+ WebContextSupplement::processPool()->addMessageReceiver(Messages::WebMediaCacheManagerProxy::messageReceiverName(), *this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebMediaCacheManagerProxy::~WebMediaCacheManagerProxy()
</span><span class="lines">@@ -56,7 +55,7 @@
</span><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><span class="cx">
</span><del>-void WebMediaCacheManagerProxy::contextDestroyed()
</del><ins>+void WebMediaCacheManagerProxy::processPoolDestroyed()
</ins><span class="cx"> {
</span><span class="cx"> invalidateCallbackMap(m_arrayCallbacks, CallbackBase::Error::OwnerWasInvalidated);
</span><span class="cx"> }
</span><span class="lines">@@ -88,7 +87,7 @@
</span><span class="cx"> m_arrayCallbacks.set(callbackID, callback.release());
</span><span class="cx">
</span><span class="cx"> // FIXME (Multi-WebProcess): <rdar://problem/12239765> When we're sending this to multiple processes, we need to aggregate the callback data when it comes back.
</span><del>- context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebMediaCacheManager::GetHostnamesWithMediaCache(callbackID));
</del><ins>+ processPool()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebMediaCacheManager::GetHostnamesWithMediaCache(callbackID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache(const Vector<String>& hostnames, uint64_t callbackID)
</span><span class="lines">@@ -104,12 +103,12 @@
</span><span class="cx">
</span><span class="cx"> void WebMediaCacheManagerProxy::clearCacheForHostname(const String& hostname)
</span><span class="cx"> {
</span><del>- context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebMediaCacheManager::ClearCacheForHostname(hostname));
</del><ins>+ processPool()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebMediaCacheManager::ClearCacheForHostname(hostname));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebMediaCacheManagerProxy::clearCacheForAllHostnames()
</span><span class="cx"> {
</span><del>- context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebMediaCacheManager::ClearCacheForAllHostnames());
</del><ins>+ processPool()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebMediaCacheManager::ClearCacheForAllHostnames());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebMediaCacheManagerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebMediaCacheManagerProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx"> class WebProcessProxy;
</span><span class="cx">
</span><span class="cx"> typedef GenericCallback<API::Array*> ArrayCallback;
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> public:
</span><span class="cx"> static const char* supplementName();
</span><span class="cx">
</span><del>- static PassRefPtr<WebMediaCacheManagerProxy> create(WebContext*);
</del><ins>+ static PassRefPtr<WebMediaCacheManagerProxy> create(WebProcessPool*);
</ins><span class="cx"> virtual ~WebMediaCacheManagerProxy();
</span><span class="cx">
</span><span class="cx"> void getHostnamesWithMediaCache(std::function<void (API::Array*, CallbackBase::Error)>);
</span><span class="lines">@@ -56,12 +56,12 @@
</span><span class="cx"> using API::Object::deref;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit WebMediaCacheManagerProxy(WebContext*);
</del><ins>+ explicit WebMediaCacheManagerProxy(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> void didGetHostnamesWithMediaCache(const Vector<String>&, uint64_t callbackID);
</span><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><del>- virtual void contextDestroyed() override;
</del><ins>+ virtual void processPoolDestroyed() override;
</ins><span class="cx"> virtual void processDidClose(WebProcessProxy*) override;
</span><span class="cx"> virtual bool shouldTerminate(WebProcessProxy*) const override;
</span><span class="cx"> virtual void refWebContextSupplement() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebOriginDataManagerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebOriginDataManagerProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -28,9 +28,9 @@
</span><span class="cx">
</span><span class="cx"> #include "APISecurityOrigin.h"
</span><span class="cx"> #include "SecurityOriginData.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebOriginDataManagerMessages.h"
</span><span class="cx"> #include "WebOriginDataManagerProxyMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -42,15 +42,15 @@
</span><span class="cx"> return "WebOriginDataManagerProxy";
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<WebOriginDataManagerProxy> WebOriginDataManagerProxy::create(WebContext* context)
</del><ins>+PassRefPtr<WebOriginDataManagerProxy> WebOriginDataManagerProxy::create(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new WebOriginDataManagerProxy(context));
</del><ins>+ return adoptRef(new WebOriginDataManagerProxy(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-WebOriginDataManagerProxy::WebOriginDataManagerProxy(WebContext* context)
- : WebContextSupplement(context)
</del><ins>+WebOriginDataManagerProxy::WebOriginDataManagerProxy(WebProcessPool* processPool)
+ : WebContextSupplement(processPool)
</ins><span class="cx"> {
</span><del>- context->addMessageReceiver(Messages::WebOriginDataManagerProxy::messageReceiverName(), *this);
</del><ins>+ processPool->addMessageReceiver(Messages::WebOriginDataManagerProxy::messageReceiverName(), *this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebOriginDataManagerProxy::~WebOriginDataManagerProxy()
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-void WebOriginDataManagerProxy::contextDestroyed()
</del><ins>+void WebOriginDataManagerProxy::processPoolDestroyed()
</ins><span class="cx"> {
</span><span class="cx"> invalidateCallbackMap(m_arrayCallbacks, CallbackBase::Error::OwnerWasInvalidated);
</span><span class="cx"> }
</span><span class="lines">@@ -155,9 +155,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <typename CallbackType, typename MessageType, typename... Parameters>
</span><del>-static void sendMessageToAllProcessesInContext(WebContext* context, typename CallbackType::CallbackFunction callback, HashMap<uint64_t, RefPtr<CallbackType>>& callbackStorage, Parameters... parameters)
</del><ins>+static void sendMessageToAllProcessesInProcessPool(WebProcessPool* processPool, typename CallbackType::CallbackFunction callback, HashMap<uint64_t, RefPtr<CallbackType>>& callbackStorage, Parameters... parameters)
</ins><span class="cx"> {
</span><del>- if (!context) {
</del><ins>+ if (!processPool) {
</ins><span class="cx"> CallbackType::create(callback)->invalidate();
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx"> RefPtr<CallbackSynchronizer> synchronizer = synchronizerAndCallback.first;
</span><span class="cx"> auto perProcessCallback = synchronizerAndCallback.second;
</span><span class="cx">
</span><del>- for (auto& process : context->processes()) {
</del><ins>+ for (auto& process : processPool->processes()) {
</ins><span class="cx"> if (!process || !process->canSendMessage())
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="lines">@@ -182,13 +182,13 @@
</span><span class="cx"> RefPtr<CallbackType> callback = CallbackType::create(perProcessCallback);
</span><span class="cx"> uint64_t callbackID = callback->callbackID();
</span><span class="cx"> callbackStorage.set(callbackID, callback.release());
</span><del>- context->sendToDatabaseProcessRelaunchingIfNecessary(MessageType(parameters..., callbackID));
</del><ins>+ processPool->sendToDatabaseProcessRelaunchingIfNecessary(MessageType(parameters..., callbackID));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebOriginDataManagerProxy::getOrigins(WKOriginDataTypes types, std::function<void (API::Array*, CallbackBase::Error)> callbackFunction)
</span><span class="cx"> {
</span><del>- sendMessageToAllProcessesInContext<ArrayCallback, Messages::WebOriginDataManager::GetOrigins>(context(), callbackFunction, m_arrayCallbacks, types);
</del><ins>+ sendMessageToAllProcessesInProcessPool<ArrayCallback, Messages::WebOriginDataManager::GetOrigins>(processPool(), callbackFunction, m_arrayCallbacks, types);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebOriginDataManagerProxy::didGetOrigins(IPC::Connection* connection, const Vector<SecurityOriginData>& originIdentifiers, uint64_t callbackID)
</span><span class="lines">@@ -212,12 +212,12 @@
</span><span class="cx"> securityOriginData.host = origin->securityOrigin().host();
</span><span class="cx"> securityOriginData.port = origin->securityOrigin().port();
</span><span class="cx">
</span><del>- sendMessageToAllProcessesInContext<VoidCallback, Messages::WebOriginDataManager::DeleteEntriesForOrigin>(context(), callbackFunction, m_voidCallbacks, types, securityOriginData);
</del><ins>+ sendMessageToAllProcessesInProcessPool<VoidCallback, Messages::WebOriginDataManager::DeleteEntriesForOrigin>(processPool(), callbackFunction, m_voidCallbacks, types, securityOriginData);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates(WKOriginDataTypes types, double startDate, double endDate, std::function<void (CallbackBase::Error)> callbackFunction)
</span><span class="cx"> {
</span><del>- sendMessageToAllProcessesInContext<VoidCallback, Messages::WebOriginDataManager::DeleteEntriesModifiedBetweenDates>(context(), callbackFunction, m_voidCallbacks, types, startDate, endDate);
</del><ins>+ sendMessageToAllProcessesInProcessPool<VoidCallback, Messages::WebOriginDataManager::DeleteEntriesModifiedBetweenDates>(processPool(), callbackFunction, m_voidCallbacks, types, startDate, endDate);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebOriginDataManagerProxy::didDeleteEntries(IPC::Connection* connection, uint64_t callbackID)
</span><span class="lines">@@ -229,7 +229,7 @@
</span><span class="cx">
</span><span class="cx"> void WebOriginDataManagerProxy::deleteAllEntries(WKOriginDataTypes types, std::function<void (CallbackBase::Error)> callbackFunction)
</span><span class="cx"> {
</span><del>- sendMessageToAllProcessesInContext<VoidCallback, Messages::WebOriginDataManager::DeleteAllEntries>(context(), callbackFunction, m_voidCallbacks, types);
</del><ins>+ sendMessageToAllProcessesInProcessPool<VoidCallback, Messages::WebOriginDataManager::DeleteAllEntries>(processPool(), callbackFunction, m_voidCallbacks, types);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebOriginDataManagerProxy::didDeleteAllEntries(IPC::Connection* connection, uint64_t callbackID)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebOriginDataManagerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebOriginDataManagerProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebOriginDataManagerProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebOriginDataManagerProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><ins>+class WebProcessPool;
</ins><span class="cx"> struct SecurityOriginData;
</span><span class="cx">
</span><span class="cx"> typedef GenericCallback<API::Array*> ArrayCallback;
</span><span class="lines">@@ -49,7 +50,7 @@
</span><span class="cx"> public:
</span><span class="cx"> static const char* supplementName();
</span><span class="cx">
</span><del>- static PassRefPtr<WebOriginDataManagerProxy> create(WebContext*);
</del><ins>+ static PassRefPtr<WebOriginDataManagerProxy> create(WebProcessPool*);
</ins><span class="cx"> virtual ~WebOriginDataManagerProxy();
</span><span class="cx">
</span><span class="cx"> void getOrigins(WKOriginDataTypes, std::function<void (API::Array*, CallbackBase::Error)>);
</span><span class="lines">@@ -64,14 +65,14 @@
</span><span class="cx"> virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) override;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit WebOriginDataManagerProxy(WebContext*);
</del><ins>+ explicit WebOriginDataManagerProxy(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> void didGetOrigins(IPC::Connection*, const Vector<SecurityOriginData>&, uint64_t callbackID);
</span><span class="cx"> void didDeleteEntries(IPC::Connection*, uint64_t callbackID);
</span><span class="cx"> void didDeleteAllEntries(IPC::Connection*, uint64_t callbackID);
</span><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><del>- virtual void contextDestroyed() override;
</del><ins>+ virtual void processPoolDestroyed() override;
</ins><span class="cx"> virtual void processDidClose(WebProcessProxy*) override;
</span><span class="cx"> virtual bool shouldTerminate(WebProcessProxy*) const override;
</span><span class="cx"> virtual void refWebContextSupplement() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -61,7 +61,6 @@
</span><span class="cx"> #include "WebBackForwardList.h"
</span><span class="cx"> #include "WebBackForwardListItem.h"
</span><span class="cx"> #include "WebCertificateInfo.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebContextMenuProxy.h"
</span><span class="cx"> #include "WebContextUserMessageCoders.h"
</span><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><span class="lines">@@ -86,6 +85,7 @@
</span><span class="cx"> #include "WebPopupMenuProxy.h"
</span><span class="cx"> #include "WebPreferences.h"
</span><span class="cx"> #include "WebProcessMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include "WebProcessProxy.h"
</span><span class="cx"> #include "WebProtectionSpace.h"
</span><span class="cx"> #include "WebUserContentControllerProxy.h"
</span><span class="lines">@@ -402,7 +402,7 @@
</span><span class="cx"> webPageProxyCounter.increment();
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- WebContext::statistics().wkPageCount++;
</del><ins>+ WebProcessPool::statistics().wkPageCount++;
</ins><span class="cx">
</span><span class="cx"> m_preferences->addPage(*this);
</span><span class="cx"> m_pageGroup->addPage(this);
</span><span class="lines">@@ -424,7 +424,7 @@
</span><span class="cx">
</span><span class="cx"> // FIXME: If we ever expose the session storage size as a preference, we need to pass it here.
</span><span class="cx"> IPC::Connection* connection = m_process->state() == WebProcessProxy::State::Running ? m_process->connection() : nullptr;
</span><del>- m_process->context().storageManager().createSessionStorageNamespace(m_pageID, connection, std::numeric_limits<unsigned>::max());
</del><ins>+ m_process->processPool().storageManager().createSessionStorageNamespace(m_pageID, connection, std::numeric_limits<unsigned>::max());
</ins><span class="cx"> setSessionID(configuration.sessionID);
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -446,7 +446,7 @@
</span><span class="cx"> if (!m_isClosed)
</span><span class="cx"> close();
</span><span class="cx">
</span><del>- WebContext::statistics().wkPageCount--;
</del><ins>+ WebProcessPool::statistics().wkPageCount--;
</ins><span class="cx">
</span><span class="cx"> if (m_hasSpellDocumentTag)
</span><span class="cx"> TextChecker::closeSpellDocumentWithTag(m_spellDocumentTag);
</span><span class="lines">@@ -566,10 +566,10 @@
</span><span class="cx"> m_process->removeWebPage(m_pageID);
</span><span class="cx"> m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID);
</span><span class="cx">
</span><del>- if (m_process->context().processModel() == ProcessModelSharedSecondaryProcess)
- m_process = m_process->context().ensureSharedWebProcess();
</del><ins>+ if (m_process->processPool().processModel() == ProcessModelSharedSecondaryProcess)
+ m_process = m_process->processPool().ensureSharedWebProcess();
</ins><span class="cx"> else
</span><del>- m_process = m_process->context().createNewWebProcessRespectingProcessCountLimit();
</del><ins>+ m_process = m_process->processPool().createNewWebProcessRespectingProcessCountLimit();
</ins><span class="cx">
</span><span class="cx"> ASSERT(m_process->state() != ChildProcessProxy::State::Terminated);
</span><span class="cx"> if (m_process->state() == ChildProcessProxy::State::Running)
</span><span class="lines">@@ -625,7 +625,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><span class="cx"> if (sessionID.isEphemeral())
</span><del>- m_process->context().sendToNetworkingProcess(Messages::NetworkProcess::EnsurePrivateBrowsingSession(sessionID));
</del><ins>+ m_process->processPool().sendToNetworkingProcess(Messages::NetworkProcess::EnsurePrivateBrowsingSession(sessionID));
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -692,8 +692,8 @@
</span><span class="cx"> m_process->send(Messages::WebPage::Close(), m_pageID);
</span><span class="cx"> m_process->removeWebPage(m_pageID);
</span><span class="cx"> m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID);
</span><del>- m_process->context().storageManager().destroySessionStorageNamespace(m_pageID);
- m_process->context().supplement<WebNotificationManagerProxy>()->clearNotifications(this);
</del><ins>+ m_process->processPool().storageManager().destroySessionStorageNamespace(m_pageID);
+ m_process->processPool().supplement<WebNotificationManagerProxy>()->clearNotifications(this);
</ins><span class="cx">
</span><span class="cx"> m_websiteDataStore->removeWebPage(*this);
</span><span class="cx"> }
</span><span class="lines">@@ -1039,14 +1039,14 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx"> String newMimeType = mimeType;
</span><del>- PluginModuleInfo plugin = m_process->context().pluginInfoStore().findPlugin(newMimeType, URL());
</del><ins>+ PluginModuleInfo plugin = m_process->processPool().pluginInfoStore().findPlugin(newMimeType, URL());
</ins><span class="cx"> if (!plugin.path.isNull() && m_preferences->pluginsEnabled())
</span><span class="cx"> return true;
</span><span class="cx"> #endif // ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> // On Mac, we can show PDFs.
</span><del>- if (MIMETypeRegistry::isPDFOrPostScriptMIMEType(mimeType) && !WebContext::omitPDFSupport())
</del><ins>+ if (MIMETypeRegistry::isPDFOrPostScriptMIMEType(mimeType) && !WebProcessPool::omitPDFSupport())
</ins><span class="cx"> return true;
</span><span class="cx"> #endif // PLATFORM(COCOA)
</span><span class="cx">
</span><span class="lines">@@ -1271,7 +1271,7 @@
</span><span class="cx"> if (m_viewState & ViewState::IsVisuallyIdle)
</span><span class="cx"> m_pageIsUserObservableCount = nullptr;
</span><span class="cx"> else if (!m_pageIsUserObservableCount)
</span><del>- m_pageIsUserObservableCount = m_process->context().userObservablePageCount();
</del><ins>+ m_pageIsUserObservableCount = m_process->processPool().userObservablePageCount();
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> if (!isViewVisible())
</span><span class="lines">@@ -1286,7 +1286,7 @@
</span><span class="cx"> if (m_preferences->pageVisibilityBasedProcessSuppressionEnabled())
</span><span class="cx"> m_preventProcessSuppressionCount = nullptr;
</span><span class="cx"> else if (!m_preventProcessSuppressionCount)
</span><del>- m_preventProcessSuppressionCount = m_process->context().processSuppressionDisabledForPageCount();
</del><ins>+ m_preventProcessSuppressionCount = m_process->processPool().processSuppressionDisabledForPageCount();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::layerHostingModeDidChange()
</span><span class="lines">@@ -1664,7 +1664,7 @@
</span><span class="cx"> pluginLoadPolicy = PluginModuleLoadNormally;
</span><span class="cx">
</span><span class="cx"> PluginData::AllowedPluginTypes allowedPluginTypes = allowOnlyApplicationPlugins ? PluginData::OnlyApplicationPlugins : PluginData::AllPlugins;
</span><del>- PluginModuleInfo plugin = m_process->context().pluginInfoStore().findPlugin(newMimeType, URL(URL(), urlString), allowedPluginTypes);
</del><ins>+ PluginModuleInfo plugin = m_process->processPool().pluginInfoStore().findPlugin(newMimeType, URL(URL(), urlString), allowedPluginTypes);
</ins><span class="cx"> if (!plugin.path) {
</span><span class="cx"> pluginProcessToken = 0;
</span><span class="cx"> return;
</span><span class="lines">@@ -1828,7 +1828,7 @@
</span><span class="cx"> // Create a download proxy.
</span><span class="cx"> // FIXME: We should ensure that the downloadRequest is never empty.
</span><span class="cx"> const ResourceRequest& downloadRequest = m_decidePolicyForResponseRequest ? *m_decidePolicyForResponseRequest : ResourceRequest();
</span><del>- DownloadProxy* download = m_process->context().createDownloadProxy(downloadRequest);
</del><ins>+ DownloadProxy* download = m_process->processPool().createDownloadProxy(downloadRequest);
</ins><span class="cx"> downloadID = download->downloadID();
</span><span class="cx"> handleDownloadRequest(download);
</span><span class="cx"> }
</span><span class="lines">@@ -3079,7 +3079,7 @@
</span><span class="cx"> MESSAGE_CHECK(frame->page() == this);
</span><span class="cx">
</span><span class="cx"> m_loaderClient->didNavigateWithNavigationData(*this, store, *frame);
</span><del>- process().context().historyClient().didNavigateWithNavigationData(process().context(), *this, store, *frame);
</del><ins>+ process().processPool().historyClient().didNavigateWithNavigationData(process().processPool(), *this, store, *frame);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didPerformClientRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID)
</span><span class="lines">@@ -3095,7 +3095,7 @@
</span><span class="cx"> MESSAGE_CHECK_URL(destinationURLString);
</span><span class="cx">
</span><span class="cx"> m_loaderClient->didPerformClientRedirect(*this, sourceURLString, destinationURLString, *frame);
</span><del>- process().context().historyClient().didPerformClientRedirect(process().context(), *this, sourceURLString, destinationURLString, *frame);
</del><ins>+ process().processPool().historyClient().didPerformClientRedirect(process().processPool(), *this, sourceURLString, destinationURLString, *frame);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didPerformServerRedirect(const String& sourceURLString, const String& destinationURLString, uint64_t frameID)
</span><span class="lines">@@ -3111,7 +3111,7 @@
</span><span class="cx"> MESSAGE_CHECK_URL(destinationURLString);
</span><span class="cx">
</span><span class="cx"> m_loaderClient->didPerformServerRedirect(*this, sourceURLString, destinationURLString, *frame);
</span><del>- process().context().historyClient().didPerformServerRedirect(process().context(), *this, sourceURLString, destinationURLString, *frame);
</del><ins>+ process().processPool().historyClient().didPerformServerRedirect(process().processPool(), *this, sourceURLString, destinationURLString, *frame);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didUpdateHistoryTitle(const String& title, const String& url, uint64_t frameID)
</span><span class="lines">@@ -3123,7 +3123,7 @@
</span><span class="cx"> MESSAGE_CHECK_URL(url);
</span><span class="cx">
</span><span class="cx"> m_loaderClient->didUpdateHistoryTitle(*this, title, url, *frame);
</span><del>- process().context().historyClient().didUpdateHistoryTitle(process().context(), *this, title, url, *frame);
</del><ins>+ process().processPool().historyClient().didUpdateHistoryTitle(process().processPool(), *this, title, url, *frame);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // UIClient
</span><span class="lines">@@ -3141,7 +3141,7 @@
</span><span class="cx">
</span><span class="cx"> newPageID = newPage->pageID();
</span><span class="cx"> newPageParameters = newPage->creationParameters();
</span><del>- process().context().storageManager().cloneSessionStorageNamespace(m_pageID, newPage->pageID());
</del><ins>+ process().processPool().storageManager().cloneSessionStorageNamespace(m_pageID, newPage->pageID());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::showPage()
</span><span class="lines">@@ -3267,14 +3267,14 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(connection == m_process->connection());
</span><span class="cx">
</span><del>- m_process->context().storageManager().setAllowedSessionStorageNamespaceConnection(m_pageID, connection);
</del><ins>+ m_process->processPool().storageManager().setAllowedSessionStorageNamespaceConnection(m_pageID, connection);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::connectionWillClose(IPC::Connection* connection)
</span><span class="cx"> {
</span><span class="cx"> ASSERT_UNUSED(connection, connection == m_process->connection());
</span><span class="cx">
</span><del>- m_process->context().storageManager().setAllowedSessionStorageNamespaceConnection(m_pageID, 0);
</del><ins>+ m_process->processPool().storageManager().setAllowedSessionStorageNamespaceConnection(m_pageID, 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::processDidFinishLaunching()
</span><span class="lines">@@ -3296,7 +3296,7 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<ImmutableDictionary> pluginInformation;
</span><span class="cx"> String newMimeType = mimeType;
</span><del>- PluginModuleInfo plugin = m_process->context().pluginInfoStore().findPlugin(newMimeType, URL(URL(), pluginURLString));
</del><ins>+ PluginModuleInfo plugin = m_process->processPool().pluginInfoStore().findPlugin(newMimeType, URL(URL(), pluginURLString));
</ins><span class="cx"> pluginInformation = createPluginInformationDictionary(plugin, frameURLString, mimeType, pageURLString, pluginspageAttributeURLString, pluginURLString);
</span><span class="cx">
</span><span class="cx"> WKPluginUnavailabilityReason pluginUnavailabilityReason = kWKPluginUnavailabilityReasonPluginMissing;
</span><span class="lines">@@ -3971,15 +3971,15 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> if (item.action() == ContextMenuItemTagDownloadImageToDisk) {
</span><del>- m_process->context().download(this, URL(URL(), m_activeContextMenuContextData.webHitTestResultData().absoluteImageURL));
</del><ins>+ m_process->processPool().download(this, URL(URL(), m_activeContextMenuContextData.webHitTestResultData().absoluteImageURL));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> if (item.action() == ContextMenuItemTagDownloadLinkToDisk) {
</span><del>- m_process->context().download(this, URL(URL(), m_activeContextMenuContextData.webHitTestResultData().absoluteLinkURL));
</del><ins>+ m_process->processPool().download(this, URL(URL(), m_activeContextMenuContextData.webHitTestResultData().absoluteLinkURL));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> if (item.action() == ContextMenuItemTagDownloadMediaToDisk) {
</span><del>- m_process->context().download(this, URL(URL(), m_activeContextMenuContextData.webHitTestResultData().absoluteMediaURL));
</del><ins>+ m_process->processPool().download(this, URL(URL(), m_activeContextMenuContextData.webHitTestResultData().absoluteMediaURL));
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> if (item.action() == ContextMenuItemTagCheckSpellingWhileTyping) {
</span><span class="lines">@@ -4854,22 +4854,22 @@
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::showNotification(const String& title, const String& body, const String& iconURL, const String& tag, const String& lang, const String& dir, const String& originString, uint64_t notificationID)
</span><span class="cx"> {
</span><del>- m_process->context().supplement<WebNotificationManagerProxy>()->show(this, title, body, iconURL, tag, lang, dir, originString, notificationID);
</del><ins>+ m_process->processPool().supplement<WebNotificationManagerProxy>()->show(this, title, body, iconURL, tag, lang, dir, originString, notificationID);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::cancelNotification(uint64_t notificationID)
</span><span class="cx"> {
</span><del>- m_process->context().supplement<WebNotificationManagerProxy>()->cancel(this, notificationID);
</del><ins>+ m_process->processPool().supplement<WebNotificationManagerProxy>()->cancel(this, notificationID);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::clearNotifications(const Vector<uint64_t>& notificationIDs)
</span><span class="cx"> {
</span><del>- m_process->context().supplement<WebNotificationManagerProxy>()->clearNotifications(this, notificationIDs);
</del><ins>+ m_process->processPool().supplement<WebNotificationManagerProxy>()->clearNotifications(this, notificationIDs);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::didDestroyNotification(uint64_t notificationID)
</span><span class="cx"> {
</span><del>- m_process->context().supplement<WebNotificationManagerProxy>()->didDestroyNotification(this, notificationID);
</del><ins>+ m_process->processPool().supplement<WebNotificationManagerProxy>()->didDestroyNotification(this, notificationID);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> float WebPageProxy::headerHeight(WebFrameProxy* frame)
</span><span class="lines">@@ -4966,7 +4966,7 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA) && ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx"> String newMimeType = mimeType;
</span><del>- PluginModuleInfo plugin = m_process->context().pluginInfoStore().findPlugin(newMimeType, URL(URL(), pluginURLString));
</del><ins>+ PluginModuleInfo plugin = m_process->processPool().pluginInfoStore().findPlugin(newMimeType, URL(URL(), pluginURLString));
</ins><span class="cx"> pluginInformation = createPluginInformationDictionary(plugin, frameURLString, mimeType, pageURLString, String(), String(), replacementObscured);
</span><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(mimeType);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPreferencescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPreferences.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPreferences.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebPreferences.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -26,9 +26,9 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "WebPreferences.h"
</span><span class="cx">
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebPageGroup.h"
</span><span class="cx"> #include "WebPreferencesKeys.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include <wtf/ThreadingPrimitives.h>
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx">
</span><span class="cx"> if (privateBrowsingEnabled()) {
</span><span class="cx"> if (!privateBrowsingPageCount)
</span><del>- WebContext::willStartUsingPrivateBrowsing();
</del><ins>+ WebProcessPool::willStartUsingPrivateBrowsing();
</ins><span class="cx">
</span><span class="cx"> ++privateBrowsingPageCount;
</span><span class="cx"> }
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx"> if (privateBrowsingEnabled()) {
</span><span class="cx"> --privateBrowsingPageCount;
</span><span class="cx"> if (!privateBrowsingPageCount)
</span><del>- WebContext::willStopUsingPrivateBrowsing();
</del><ins>+ WebProcessPool::willStopUsingPrivateBrowsing();
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx">
</span><span class="cx"> if (value) {
</span><span class="cx"> if (!privateBrowsingPageCount)
</span><del>- WebContext::willStartUsingPrivateBrowsing();
</del><ins>+ WebProcessPool::willStartUsingPrivateBrowsing();
</ins><span class="cx"> privateBrowsingPageCount += pagesChanged;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx"> ASSERT(privateBrowsingPageCount >= pagesChanged);
</span><span class="cx"> privateBrowsingPageCount -= pagesChanged;
</span><span class="cx"> if (!privateBrowsingPageCount)
</span><del>- WebContext::willStopUsingPrivateBrowsing();
</del><ins>+ WebProcessPool::willStopUsingPrivateBrowsing();
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolcppfromrev177636trunkSourceWebKit2UIProcessWebContextcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (from rev 177636, trunk/Source/WebKit2/UIProcess/WebContext.cpp) (0 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -0,0 +1,1495 @@
</span><ins>+/*
+ * Copyright (C) 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebProcessPool.h"
+
+#include "APIArray.h"
+#include "APIDownloadClient.h"
+#include "APILegacyContextHistoryClient.h"
+#include "CustomProtocolManagerMessages.h"
+#include "DownloadProxy.h"
+#include "DownloadProxyMessages.h"
+#include "Logging.h"
+#include "MutableDictionary.h"
+#include "SandboxExtension.h"
+#include "StatisticsData.h"
+#include "TextChecker.h"
+#include "WKContextPrivate.h"
+#include "WebApplicationCacheManagerProxy.h"
+#include "WebContextMessageKinds.h"
+#include "WebContextSupplement.h"
+#include "WebContextUserMessageCoders.h"
+#include "WebCookieManagerProxy.h"
+#include "WebCoreArgumentCoders.h"
+#include "WebDatabaseManagerProxy.h"
+#include "WebGeolocationManagerProxy.h"
+#include "WebIconDatabase.h"
+#include "WebKeyValueStorageManager.h"
+#include "WebKit2Initialize.h"
+#include "WebMediaCacheManagerProxy.h"
+#include "WebMemorySampler.h"
+#include "WebNotificationManagerProxy.h"
+#include "WebPageGroup.h"
+#include "WebPluginSiteDataManager.h"
+#include "WebPreferences.h"
+#include "WebProcessCreationParameters.h"
+#include "WebProcessMessages.h"
+#include "WebProcessPoolMessages.h"
+#include "WebProcessProxy.h"
+#include "WebResourceCacheManagerProxy.h"
+#include "WebsiteDataStore.h"
+#include <WebCore/ApplicationCacheStorage.h>
+#include <WebCore/Language.h>
+#include <WebCore/LinkHash.h>
+#include <WebCore/Logging.h>
+#include <WebCore/ResourceRequest.h>
+#include <WebCore/SessionID.h>
+#include <runtime/JSCInlines.h>
+#include <wtf/CurrentTime.h>
+#include <wtf/MainThread.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/RunLoop.h>
+
+#if ENABLE(BATTERY_STATUS)
+#include "WebBatteryManagerProxy.h"
+#endif
+
+#if ENABLE(DATABASE_PROCESS)
+#include "DatabaseProcessCreationParameters.h"
+#include "DatabaseProcessMessages.h"
+#include "WebOriginDataManagerProxy.h"
+#endif
+
+#if ENABLE(NETWORK_PROCESS)
+#include "NetworkProcessCreationParameters.h"
+#include "NetworkProcessMessages.h"
+#include "NetworkProcessProxy.h"
+#endif
+
+#if ENABLE(SERVICE_CONTROLS)
+#include "ServicesController.h"
+#endif
+
+#if ENABLE(REMOTE_INSPECTOR)
+#include <JavaScriptCore/RemoteInspector.h>
+#endif
+
+#if USE(SOUP)
+#include "WebSoupCustomProtocolRequestManager.h"
+#endif
+
+#ifndef NDEBUG
+#include <wtf/RefCountedLeakCounter.h>
+#endif
+
+using namespace WebCore;
+using namespace WebKit;
+
+namespace WebKit {
+
+static const double sharedSecondaryProcessShutdownTimeout = 60;
+
+DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, processPoolCounter, ("WebProcessPool"));
+
+void WebProcessPool::applyPlatformSpecificConfigurationDefaults(WebProcessPoolConfiguration& configuration)
+{
+ // FIXME: This function should not be needed; all ports should make sure that the configuration has the right
+ // values, and then we should get rid of the platform specific defaults inside WebProcessPool.
+
+ if (!configuration.localStorageDirectory)
+ configuration.localStorageDirectory = platformDefaultLocalStorageDirectory();
+
+ if (!configuration.webSQLDatabaseDirectory)
+ configuration.webSQLDatabaseDirectory = platformDefaultWebSQLDatabaseDirectory();
+
+ // *********
+ // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (<rdar://problem/17454712>)
+ // *********
+ if (!configuration.indexedDBDatabaseDirectory)
+ configuration.indexedDBDatabaseDirectory = platformDefaultIndexedDBDatabaseDirectory();
+
+ if (!configuration.mediaKeysStorageDirectory)
+ configuration.mediaKeysStorageDirectory = platformDefaultMediaKeysStorageDirectory();
+}
+
+PassRefPtr<WebProcessPool> WebProcessPool::create(WebProcessPoolConfiguration configuration)
+{
+ InitializeWebKit2();
+ return adoptRef(new WebProcessPool(WTF::move(configuration)));
+}
+
+static Vector<WebProcessPool*>& processPools()
+{
+ static NeverDestroyed<Vector<WebProcessPool*>> processPools;
+ return processPools;
+}
+
+const Vector<WebProcessPool*>& WebProcessPool::allProcessPools()
+{
+ return processPools();
+}
+
+static WebsiteDataStore::Configuration websiteDataStoreConfiguration()
+{
+ WebsiteDataStore::Configuration configuration;
+
+ // FIXME: Fill in the configuration.
+ return configuration;
+}
+
+WebProcessPool::WebProcessPool(WebProcessPoolConfiguration configuration)
+ : m_processModel(ProcessModelSharedSecondaryProcess)
+ , m_webProcessCountLimit(UINT_MAX)
+ , m_haveInitialEmptyProcess(false)
+ , m_processWithPageCache(0)
+ , m_defaultPageGroup(WebPageGroup::createNonNull())
+ , m_injectedBundlePath(configuration.injectedBundlePath)
+ , m_downloadClient(std::make_unique<API::DownloadClient>())
+ , m_historyClient(std::make_unique<API::LegacyContextHistoryClient>())
+ , m_visitedLinkProvider(VisitedLinkProvider::create())
+ , m_visitedLinksPopulated(false)
+ , m_plugInAutoStartProvider(this)
+ , m_alwaysUsesComplexTextCodePath(false)
+ , m_shouldUseFontSmoothing(true)
+ , m_cacheModel(CacheModelDocumentViewer)
+ , m_memorySamplerEnabled(false)
+ , m_memorySamplerInterval(1400.0)
+ , m_websiteDataStore(WebsiteDataStore::create(websiteDataStoreConfiguration()))
+ , m_storageManager(StorageManager::create(configuration.localStorageDirectory))
+#if USE(SOUP)
+ , m_initialHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicyOnlyFromMainDocumentDomain)
+#endif
+ , m_webSQLDatabaseDirectory(WTF::move(configuration.webSQLDatabaseDirectory))
+ , m_indexedDBDatabaseDirectory(WTF::move(configuration.indexedDBDatabaseDirectory))
+ , m_mediaKeysStorageDirectory(WTF::move(configuration.mediaKeysStorageDirectory))
+ , m_shouldUseTestingNetworkSession(false)
+ , m_processTerminationEnabled(true)
+#if ENABLE(NETWORK_PROCESS)
+ , m_canHandleHTTPSServerTrustEvaluation(true)
+ , m_usesNetworkProcess(false)
+#endif
+#if USE(SOUP)
+ , m_ignoreTLSErrors(true)
+#endif
+ , m_memoryCacheDisabled(false)
+ , m_userObservablePageCounter([this](bool) { updateProcessSuppressionState(); })
+ , m_processSuppressionDisabledForPageCounter([this](bool) { updateProcessSuppressionState(); })
+{
+ platformInitialize();
+
+ addMessageReceiver(Messages::WebProcessPool::messageReceiverName(), *this);
+ addMessageReceiver(WebContextLegacyMessages::messageReceiverName(), *this);
+
+ // NOTE: These sub-objects must be initialized after m_messageReceiverMap..
+ m_iconDatabase = WebIconDatabase::create(this);
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ m_pluginSiteDataManager = WebPluginSiteDataManager::create(this);
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
+ addSupplement<WebApplicationCacheManagerProxy>();
+ addSupplement<WebCookieManagerProxy>();
+ addSupplement<WebGeolocationManagerProxy>();
+ addSupplement<WebKeyValueStorageManager>();
+ addSupplement<WebMediaCacheManagerProxy>();
+ addSupplement<WebNotificationManagerProxy>();
+ addSupplement<WebResourceCacheManagerProxy>();
+#if ENABLE(SQL_DATABASE)
+ addSupplement<WebDatabaseManagerProxy>();
+#endif
+#if USE(SOUP)
+ addSupplement<WebSoupCustomProtocolRequestManager>();
+#endif
+#if ENABLE(BATTERY_STATUS)
+ addSupplement<WebBatteryManagerProxy>();
+#endif
+#if ENABLE(DATABASE_PROCESS)
+ addSupplement<WebOriginDataManagerProxy>();
+#endif
+
+ processPools().append(this);
+
+ addLanguageChangeObserver(this, languageChanged);
+
+#if !LOG_DISABLED
+ WebCore::initializeLoggingChannelsIfNecessary();
+ WebKit::initializeLogChannelsIfNecessary();
+#endif // !LOG_DISABLED
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ m_pluginInfoStore.setClient(this);
+#endif
+
+#ifndef NDEBUG
+ processPoolCounter.increment();
+#endif
+}
+
+#if !PLATFORM(COCOA)
+void WebProcessPool::platformInitialize()
+{
+}
+#endif
+
+WebProcessPool::~WebProcessPool()
+{
+ ASSERT(processPools().find(this) != notFound);
+ processPools().remove(processPools().find(this));
+
+ removeLanguageChangeObserver(this);
+
+ m_messageReceiverMap.invalidate();
+
+ WebContextSupplementMap::const_iterator it = m_supplements.begin();
+ WebContextSupplementMap::const_iterator end = m_supplements.end();
+ for (; it != end; ++it) {
+ it->value->processPoolDestroyed();
+ it->value->clearProcessPool();
+ }
+
+ m_iconDatabase->invalidate();
+ m_iconDatabase->clearProcessPool();
+ WebIconDatabase* rawIconDatabase = m_iconDatabase.release().leakRef();
+ rawIconDatabase->derefWhenAppropriate();
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ m_pluginSiteDataManager->invalidate();
+ m_pluginSiteDataManager->clearProcessPool();
+#endif
+
+ invalidateCallbackMap(m_dictionaryCallbacks, CallbackBase::Error::OwnerWasInvalidated);
+
+ platformInvalidateContext();
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ m_pluginInfoStore.setClient(0);
+#endif
+
+#ifndef NDEBUG
+ processPoolCounter.decrement();
+#endif
+}
+
+void WebProcessPool::initializeClient(const WKContextClientBase* client)
+{
+ m_client.initialize(client);
+}
+
+void WebProcessPool::initializeInjectedBundleClient(const WKContextInjectedBundleClientBase* client)
+{
+ m_injectedBundleClient.initialize(client);
+}
+
+void WebProcessPool::initializeConnectionClient(const WKContextConnectionClientBase* client)
+{
+ m_connectionClient.initialize(client);
+}
+
+void WebProcessPool::setHistoryClient(std::unique_ptr<API::LegacyContextHistoryClient> historyClient)
+{
+ if (!historyClient)
+ m_historyClient = std::make_unique<API::LegacyContextHistoryClient>();
+ else
+ m_historyClient = WTF::move(historyClient);
+}
+
+void WebProcessPool::setDownloadClient(std::unique_ptr<API::DownloadClient> downloadClient)
+{
+ if (!downloadClient)
+ m_downloadClient = std::make_unique<API::DownloadClient>();
+ else
+ m_downloadClient = WTF::move(downloadClient);
+}
+
+void WebProcessPool::setProcessModel(ProcessModel processModel)
+{
+ // Guard against API misuse.
+ if (!m_processes.isEmpty())
+ CRASH();
+ if (processModel != ProcessModelSharedSecondaryProcess && !m_messagesToInjectedBundlePostedToEmptyContext.isEmpty())
+ CRASH();
+
+ m_processModel = processModel;
+}
+
+void WebProcessPool::setMaximumNumberOfProcesses(unsigned maximumNumberOfProcesses)
+{
+ // Guard against API misuse.
+ if (!m_processes.isEmpty())
+ CRASH();
+
+ if (maximumNumberOfProcesses == 0)
+ m_webProcessCountLimit = UINT_MAX;
+ else
+ m_webProcessCountLimit = maximumNumberOfProcesses;
+}
+
+IPC::Connection* WebProcessPool::networkingProcessConnection()
+{
+ switch (m_processModel) {
+ case ProcessModelSharedSecondaryProcess:
+#if ENABLE(NETWORK_PROCESS)
+ if (m_usesNetworkProcess)
+ return m_networkProcess->connection();
+#endif
+ return m_processes[0]->connection();
+ case ProcessModelMultipleSecondaryProcesses:
+#if ENABLE(NETWORK_PROCESS)
+ ASSERT(m_usesNetworkProcess);
+ return m_networkProcess->connection();
+#else
+ break;
+#endif
+ }
+ ASSERT_NOT_REACHED();
+ return 0;
+}
+
+void WebProcessPool::languageChanged(void* context)
+{
+ static_cast<WebProcessPool*>(context)->languageChanged();
+}
+
+void WebProcessPool::languageChanged()
+{
+ sendToAllProcesses(Messages::WebProcess::UserPreferredLanguagesChanged(userPreferredLanguages()));
+#if USE(SOUP) && ENABLE(NETWORK_PROCESS)
+ if (m_usesNetworkProcess && m_networkProcess)
+ m_networkProcess->send(Messages::NetworkProcess::UserPreferredLanguagesChanged(userPreferredLanguages()), 0);
+#endif
+}
+
+void WebProcessPool::fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled)
+{
+ sendToAllProcesses(Messages::WebProcess::FullKeyboardAccessModeChanged(fullKeyboardAccessEnabled));
+}
+
+void WebProcessPool::textCheckerStateChanged()
+{
+ sendToAllProcesses(Messages::WebProcess::SetTextCheckerState(TextChecker::state()));
+}
+
+void WebProcessPool::setUsesNetworkProcess(bool usesNetworkProcess)
+{
+#if ENABLE(NETWORK_PROCESS)
+ m_usesNetworkProcess = usesNetworkProcess;
+#else
+ UNUSED_PARAM(usesNetworkProcess);
+#endif
+}
+
+bool WebProcessPool::usesNetworkProcess() const
+{
+#if ENABLE(NETWORK_PROCESS)
+ return m_usesNetworkProcess;
+#else
+ return false;
+#endif
+}
+
+#if ENABLE(NETWORK_PROCESS)
+void WebProcessPool::ensureNetworkProcess()
+{
+ if (m_networkProcess)
+ return;
+
+ m_networkProcess = NetworkProcessProxy::create(*this);
+
+ NetworkProcessCreationParameters parameters;
+
+ parameters.privateBrowsingEnabled = WebPreferences::anyPagesAreUsingPrivateBrowsing();
+
+ parameters.cacheModel = m_cacheModel;
+ parameters.canHandleHTTPSServerTrustEvaluation = m_canHandleHTTPSServerTrustEvaluation;
+
+ parameters.diskCacheDirectory = stringByResolvingSymlinksInPath(diskCacheDirectory());
+ if (!parameters.diskCacheDirectory.isEmpty())
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.diskCacheDirectory, parameters.diskCacheDirectoryExtensionHandle);
+
+ parameters.cookieStorageDirectory = cookieStorageDirectory();
+
+#if PLATFORM(IOS)
+ if (!parameters.cookieStorageDirectory.isEmpty())
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.cookieStorageDirectory, parameters.cookieStorageDirectoryExtensionHandle);
+
+ String hstsDatabasePath = networkingHSTSDatabasePath();
+ if (!hstsDatabasePath.isEmpty())
+ SandboxExtension::createHandle(hstsDatabasePath, SandboxExtension::ReadWrite, parameters.hstsDatabasePathExtensionHandle);
+
+ String parentBundleDirectory = this->parentBundleDirectory();
+ if (!parentBundleDirectory.isEmpty())
+ SandboxExtension::createHandle(parentBundleDirectory, SandboxExtension::ReadOnly, parameters.parentBundleDirectoryExtensionHandle);
+#endif
+
+ parameters.shouldUseTestingNetworkSession = m_shouldUseTestingNetworkSession;
+
+ // Add any platform specific parameters
+ platformInitializeNetworkProcess(parameters);
+
+ // Initialize the network process.
+ m_networkProcess->send(Messages::NetworkProcess::InitializeNetworkProcess(parameters), 0);
+
+#if PLATFORM(COCOA)
+ m_networkProcess->send(Messages::NetworkProcess::SetQOS(networkProcessLatencyQOS(), networkProcessThroughputQOS()), 0);
+#endif
+}
+
+void WebProcessPool::networkProcessCrashed(NetworkProcessProxy* networkProcessProxy)
+{
+ ASSERT(m_networkProcess);
+ ASSERT(networkProcessProxy == m_networkProcess.get());
+
+ WebContextSupplementMap::const_iterator it = m_supplements.begin();
+ WebContextSupplementMap::const_iterator end = m_supplements.end();
+ for (; it != end; ++it)
+ it->value->processDidClose(networkProcessProxy);
+
+ m_networkProcess = nullptr;
+
+ m_client.networkProcessDidCrash(this);
+}
+
+void WebProcessPool::getNetworkProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply> reply)
+{
+ ASSERT(reply);
+
+ ensureNetworkProcess();
+ ASSERT(m_networkProcess);
+
+ m_networkProcess->getNetworkProcessConnection(reply);
+}
+#endif
+
+#if ENABLE(DATABASE_PROCESS)
+void WebProcessPool::ensureDatabaseProcess()
+{
+ if (m_databaseProcess)
+ return;
+
+ m_databaseProcess = DatabaseProcessProxy::create(this);
+
+ ASSERT(!m_indexedDBDatabaseDirectory.isEmpty());
+
+ // *********
+ // IMPORTANT: Do not change the directory structure for indexed databases on disk without first consulting a reviewer from Apple (<rdar://problem/17454712>)
+ // *********
+ DatabaseProcessCreationParameters parameters;
+ parameters.indexedDatabaseDirectory = m_indexedDBDatabaseDirectory;
+
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.indexedDatabaseDirectory, parameters.indexedDatabaseDirectoryExtensionHandle);
+
+ m_databaseProcess->send(Messages::DatabaseProcess::InitializeDatabaseProcess(parameters), 0);
+}
+
+void WebProcessPool::getDatabaseProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetDatabaseProcessConnection::DelayedReply> reply)
+{
+ ASSERT(reply);
+
+ ensureDatabaseProcess();
+
+ m_databaseProcess->getDatabaseProcessConnection(reply);
+}
+
+void WebProcessPool::databaseProcessCrashed(DatabaseProcessProxy* databaseProcessProxy)
+{
+ ASSERT(m_databaseProcess);
+ ASSERT(databaseProcessProxy == m_databaseProcess.get());
+
+ for (auto& supplement : m_supplements)
+ supplement.value->processDidClose(databaseProcessProxy);
+
+ m_databaseProcess = nullptr;
+}
+#endif
+
+void WebProcessPool::willStartUsingPrivateBrowsing()
+{
+ for (auto* processPool : allProcessPools())
+ processPool->setAnyPageGroupMightHavePrivateBrowsingEnabled(true);
+}
+
+void WebProcessPool::willStopUsingPrivateBrowsing()
+{
+ for (auto* processPool : allProcessPools())
+ processPool->setAnyPageGroupMightHavePrivateBrowsingEnabled(false);
+}
+
+void WebProcessPool::windowServerConnectionStateChanged()
+{
+ size_t processCount = m_processes.size();
+ for (size_t i = 0; i < processCount; ++i)
+ m_processes[i]->windowServerConnectionStateChanged();
+}
+
+void WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled(bool privateBrowsingEnabled)
+{
+ m_iconDatabase->setPrivateBrowsingEnabled(privateBrowsingEnabled);
+
+#if ENABLE(NETWORK_PROCESS)
+ if (usesNetworkProcess() && networkProcess()) {
+ if (privateBrowsingEnabled)
+ networkProcess()->send(Messages::NetworkProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID()), 0);
+ else
+ networkProcess()->send(Messages::NetworkProcess::DestroyPrivateBrowsingSession(SessionID::legacyPrivateSessionID()), 0);
+ }
+#endif // ENABLED(NETWORK_PROCESS)
+
+ if (privateBrowsingEnabled)
+ sendToAllProcesses(Messages::WebProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID()));
+ else
+ sendToAllProcesses(Messages::WebProcess::DestroyPrivateBrowsingSession(SessionID::legacyPrivateSessionID()));
+}
+
+void (*s_invalidMessageCallback)(WKStringRef messageName);
+
+void WebProcessPool::setInvalidMessageCallback(void (*invalidMessageCallback)(WKStringRef messageName))
+{
+ s_invalidMessageCallback = invalidMessageCallback;
+}
+
+void WebProcessPool::didReceiveInvalidMessage(const IPC::StringReference& messageReceiverName, const IPC::StringReference& messageName)
+{
+ if (!s_invalidMessageCallback)
+ return;
+
+ StringBuilder messageNameStringBuilder;
+ messageNameStringBuilder.append(messageReceiverName.data(), messageReceiverName.size());
+ messageNameStringBuilder.append(".");
+ messageNameStringBuilder.append(messageName.data(), messageName.size());
+
+ s_invalidMessageCallback(toAPI(API::String::create(messageNameStringBuilder.toString()).get()));
+}
+
+void WebProcessPool::processDidCachePage(WebProcessProxy* process)
+{
+ if (m_processWithPageCache && m_processWithPageCache != process)
+ m_processWithPageCache->releasePageCache();
+ m_processWithPageCache = process;
+}
+
+WebProcessProxy& WebProcessPool::ensureSharedWebProcess()
+{
+ ASSERT(m_processModel == ProcessModelSharedSecondaryProcess);
+ if (m_processes.isEmpty())
+ createNewWebProcess();
+ return *m_processes[0];
+}
+
+WebProcessProxy& WebProcessPool::createNewWebProcess()
+{
+#if ENABLE(NETWORK_PROCESS)
+ if (m_usesNetworkProcess)
+ ensureNetworkProcess();
+#endif
+
+ Ref<WebProcessProxy> process = WebProcessProxy::create(*this);
+
+ WebProcessCreationParameters parameters;
+
+ parameters.injectedBundlePath = injectedBundlePath();
+ if (!parameters.injectedBundlePath.isEmpty())
+ SandboxExtension::createHandle(parameters.injectedBundlePath, SandboxExtension::ReadOnly, parameters.injectedBundlePathExtensionHandle);
+
+ parameters.applicationCacheDirectory = applicationCacheDirectory();
+ if (!parameters.applicationCacheDirectory.isEmpty())
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.applicationCacheDirectory, parameters.applicationCacheDirectoryExtensionHandle);
+
+ parameters.webSQLDatabaseDirectory = m_webSQLDatabaseDirectory;
+ if (!parameters.webSQLDatabaseDirectory.isEmpty())
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.webSQLDatabaseDirectory, parameters.webSQLDatabaseDirectoryExtensionHandle);
+
+ parameters.diskCacheDirectory = diskCacheDirectory();
+ if (!parameters.diskCacheDirectory.isEmpty())
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.diskCacheDirectory, parameters.diskCacheDirectoryExtensionHandle);
+
+ parameters.cookieStorageDirectory = cookieStorageDirectory();
+
+#if PLATFORM(IOS)
+ if (!parameters.cookieStorageDirectory.isEmpty())
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.cookieStorageDirectory, parameters.cookieStorageDirectoryExtensionHandle);
+
+ String openGLCacheDirectory = this->openGLCacheDirectory();
+ if (!openGLCacheDirectory.isEmpty())
+ SandboxExtension::createHandleForReadWriteDirectory(openGLCacheDirectory, parameters.openGLCacheDirectoryExtensionHandle);
+
+ String containerTemporaryDirectory = this->containerTemporaryDirectory();
+ if (!containerTemporaryDirectory.isEmpty())
+ SandboxExtension::createHandleForReadWriteDirectory(containerTemporaryDirectory, parameters.containerTemporaryDirectoryExtensionHandle);
+
+ String hstsDatabasePath = webContentHSTSDatabasePath();
+ if (!hstsDatabasePath.isEmpty())
+ SandboxExtension::createHandle(hstsDatabasePath, SandboxExtension::ReadWrite, parameters.hstsDatabasePathExtensionHandle);
+#endif
+
+ parameters.mediaKeyStorageDirectory = m_mediaKeysStorageDirectory;
+ if (!parameters.mediaKeyStorageDirectory.isEmpty())
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.mediaKeyStorageDirectory, parameters.mediaKeyStorageDirectoryExtensionHandle);
+
+ parameters.shouldUseTestingNetworkSession = m_shouldUseTestingNetworkSession;
+
+ parameters.cacheModel = m_cacheModel;
+ parameters.languages = userPreferredLanguages();
+
+ copyToVector(m_schemesToRegisterAsEmptyDocument, parameters.urlSchemesRegistererdAsEmptyDocument);
+ copyToVector(m_schemesToRegisterAsSecure, parameters.urlSchemesRegisteredAsSecure);
+ copyToVector(m_schemesToSetDomainRelaxationForbiddenFor, parameters.urlSchemesForWhichDomainRelaxationIsForbidden);
+ copyToVector(m_schemesToRegisterAsLocal, parameters.urlSchemesRegisteredAsLocal);
+ copyToVector(m_schemesToRegisterAsNoAccess, parameters.urlSchemesRegisteredAsNoAccess);
+ copyToVector(m_schemesToRegisterAsDisplayIsolated, parameters.urlSchemesRegisteredAsDisplayIsolated);
+ copyToVector(m_schemesToRegisterAsCORSEnabled, parameters.urlSchemesRegisteredAsCORSEnabled);
+#if ENABLE(CACHE_PARTITIONING)
+ copyToVector(m_schemesToRegisterAsCachePartitioned, parameters.urlSchemesRegisteredAsCachePartitioned);
+#endif
+
+ parameters.shouldAlwaysUseComplexTextCodePath = m_alwaysUsesComplexTextCodePath;
+ parameters.shouldUseFontSmoothing = m_shouldUseFontSmoothing;
+
+ // FIXME: This leaves UI process and WebProcess disagreeing about the state if the client hasn't set the path.
+ // iconDatabasePath is non-empty by default, but m_iconDatabase isn't enabled in UI process unless setDatabasePath is called explicitly.
+ parameters.iconDatabaseEnabled = !iconDatabasePath().isEmpty();
+
+ parameters.terminationTimeout = (m_processModel == ProcessModelSharedSecondaryProcess) ? sharedSecondaryProcessShutdownTimeout : 0;
+
+ parameters.textCheckerState = TextChecker::state();
+
+ parameters.fullKeyboardAccessEnabled = WebProcessProxy::fullKeyboardAccessEnabled();
+
+ parameters.defaultRequestTimeoutInterval = API::URLRequest::defaultTimeoutInterval();
+
+#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
+ // FIXME: There should be a generic way for supplements to add to the intialization parameters.
+ supplement<WebNotificationManagerProxy>()->populateCopyOfNotificationPermissions(parameters.notificationPermissions);
+#endif
+
+#if ENABLE(NETWORK_PROCESS)
+ parameters.usesNetworkProcess = m_usesNetworkProcess;
+#endif
+
+ parameters.plugInAutoStartOriginHashes = m_plugInAutoStartProvider.autoStartOriginHashesCopy();
+ copyToVector(m_plugInAutoStartProvider.autoStartOrigins(), parameters.plugInAutoStartOrigins);
+
+ parameters.memoryCacheDisabled = m_memoryCacheDisabled;
+
+#if ENABLE(SERVICE_CONTROLS)
+ parameters.hasImageServices = ServicesController::shared().hasImageServices();
+ parameters.hasSelectionServices = ServicesController::shared().hasSelectionServices();
+ parameters.hasRichContentServices = ServicesController::shared().hasRichContentServices();
+ ServicesController::shared().refreshExistingServices();
+#endif
+
+ // Add any platform specific parameters
+ platformInitializeWebProcess(parameters);
+
+ RefPtr<API::Object> injectedBundleInitializationUserData = m_injectedBundleClient.getInjectedBundleInitializationUserData(this);
+ if (!injectedBundleInitializationUserData)
+ injectedBundleInitializationUserData = m_injectedBundleInitializationUserData;
+ process->send(Messages::WebProcess::InitializeWebProcess(parameters, WebContextUserMessageEncoder(injectedBundleInitializationUserData.get(), process)), 0);
+
+#if PLATFORM(COCOA)
+ process->send(Messages::WebProcess::SetQOS(webProcessLatencyQOS(), webProcessThroughputQOS()), 0);
+#endif
+#if PLATFORM(IOS)
+ cacheStorage().setDefaultOriginQuota(25ULL * 1024 * 1024);
+#endif
+
+ if (WebPreferences::anyPagesAreUsingPrivateBrowsing())
+ process->send(Messages::WebProcess::EnsurePrivateBrowsingSession(SessionID::legacyPrivateSessionID()), 0);
+
+ m_processes.append(process.ptr());
+
+ if (m_processModel == ProcessModelSharedSecondaryProcess) {
+ for (size_t i = 0; i != m_messagesToInjectedBundlePostedToEmptyContext.size(); ++i) {
+ std::pair<String, RefPtr<API::Object>>& message = m_messagesToInjectedBundlePostedToEmptyContext[i];
+
+ IPC::ArgumentEncoder messageData;
+
+ messageData.encode(message.first);
+ messageData.encode(WebContextUserMessageEncoder(message.second.get(), process));
+ process->send(Messages::WebProcess::PostInjectedBundleMessage(IPC::DataReference(messageData.buffer(), messageData.bufferSize())), 0);
+ }
+ m_messagesToInjectedBundlePostedToEmptyContext.clear();
+ } else
+ ASSERT(m_messagesToInjectedBundlePostedToEmptyContext.isEmpty());
+
+#if ENABLE(REMOTE_INSPECTOR)
+ // Initialize remote inspector connection now that we have a sub-process that is hosting one of our web views.
+ Inspector::RemoteInspector::shared();
+#endif
+
+ return process;
+}
+
+void WebProcessPool::warmInitialProcess()
+{
+ if (m_haveInitialEmptyProcess) {
+ ASSERT(!m_processes.isEmpty());
+ return;
+ }
+
+ if (m_processes.size() >= m_webProcessCountLimit)
+ return;
+
+ createNewWebProcess();
+ m_haveInitialEmptyProcess = true;
+}
+
+void WebProcessPool::enableProcessTermination()
+{
+ m_processTerminationEnabled = true;
+ Vector<RefPtr<WebProcessProxy>> processes = m_processes;
+ for (size_t i = 0; i < processes.size(); ++i) {
+ if (shouldTerminate(processes[i].get()))
+ processes[i]->terminate();
+ }
+}
+
+bool WebProcessPool::shouldTerminate(WebProcessProxy* process)
+{
+ ASSERT(m_processes.contains(process));
+
+ if (!m_processTerminationEnabled)
+ return false;
+
+ for (const auto& supplement : m_supplements.values()) {
+ if (!supplement->shouldTerminate(process))
+ return false;
+ }
+
+ return true;
+}
+
+void WebProcessPool::processWillOpenConnection(WebProcessProxy* process)
+{
+ m_storageManager->processWillOpenConnection(process);
+}
+
+void WebProcessPool::processWillCloseConnection(WebProcessProxy* process)
+{
+ m_storageManager->processWillCloseConnection(process);
+}
+
+void WebProcessPool::applicationWillTerminate()
+{
+ m_storageManager->applicationWillTerminate();
+}
+
+void WebProcessPool::processDidFinishLaunching(WebProcessProxy* process)
+{
+ ASSERT(m_processes.contains(process));
+
+ if (!m_visitedLinksPopulated) {
+ populateVisitedLinks();
+ m_visitedLinksPopulated = true;
+ }
+
+ // Sometimes the memorySampler gets initialized after process initialization has happened but before the process has finished launching
+ // so check if it needs to be started here
+ if (m_memorySamplerEnabled) {
+ SandboxExtension::Handle sampleLogSandboxHandle;
+ double now = WTF::currentTime();
+ String sampleLogFilePath = String::format("WebProcess%llupid%d", static_cast<unsigned long long>(now), process->processIdentifier());
+ sampleLogFilePath = SandboxExtension::createHandleForTemporaryFile(sampleLogFilePath, SandboxExtension::ReadWrite, sampleLogSandboxHandle);
+
+ process->send(Messages::WebProcess::StartMemorySampler(sampleLogSandboxHandle, sampleLogFilePath, m_memorySamplerInterval), 0);
+ }
+
+ m_connectionClient.didCreateConnection(this, process->webConnection());
+}
+
+void WebProcessPool::disconnectProcess(WebProcessProxy* process)
+{
+ ASSERT(m_processes.contains(process));
+
+ if (m_haveInitialEmptyProcess && process == m_processes.last())
+ m_haveInitialEmptyProcess = false;
+
+ // FIXME (Multi-WebProcess): <rdar://problem/12239765> Some of the invalidation calls below are still necessary in multi-process mode, but they should only affect data structures pertaining to the process being disconnected.
+ // Clearing everything causes assertion failures, so it's less trouble to skip that for now.
+ if (m_processModel != ProcessModelSharedSecondaryProcess) {
+ RefPtr<WebProcessProxy> protect(process);
+ if (m_processWithPageCache == process)
+ m_processWithPageCache = 0;
+
+ static_cast<WebContextSupplement*>(supplement<WebGeolocationManagerProxy>())->processDidClose(process);
+
+ m_processes.remove(m_processes.find(process));
+ return;
+ }
+
+ WebContextSupplementMap::const_iterator it = m_supplements.begin();
+ WebContextSupplementMap::const_iterator end = m_supplements.end();
+ for (; it != end; ++it)
+ it->value->processDidClose(process);
+
+ // The vector may have the last reference to process proxy, which in turn may have the last reference to the context.
+ // Since vector elements are destroyed in place, we would recurse into WebProcessProxy destructor
+ // if it were invoked from Vector::remove(). RefPtr delays destruction until it's safe.
+ RefPtr<WebProcessProxy> protect(process);
+ if (m_processWithPageCache == process)
+ m_processWithPageCache = 0;
+ m_processes.remove(m_processes.find(process));
+}
+
+WebProcessProxy& WebProcessPool::createNewWebProcessRespectingProcessCountLimit()
+{
+ if (m_processes.size() < m_webProcessCountLimit)
+ return createNewWebProcess();
+
+ // Choose the process with fewest pages.
+ auto& process = *std::min_element(m_processes.begin(), m_processes.end(), [](const RefPtr<WebProcessProxy>& a, const RefPtr<WebProcessProxy>& b) {
+ return a->pageCount() < b->pageCount();
+ });
+
+ return *process;
+}
+
+PassRefPtr<WebPageProxy> WebProcessPool::createWebPage(PageClient& pageClient, WebPageConfiguration configuration)
+{
+ if (!configuration.pageGroup)
+ configuration.pageGroup = m_defaultPageGroup.ptr();
+ if (!configuration.preferences)
+ configuration.preferences = &configuration.pageGroup->preferences();
+ if (!configuration.visitedLinkProvider)
+ configuration.visitedLinkProvider = m_visitedLinkProvider.get();
+ if (!configuration.websiteDataStore) {
+ ASSERT(!configuration.sessionID.isValid());
+ configuration.websiteDataStore = m_websiteDataStore.get();
+ configuration.sessionID = configuration.preferences->privateBrowsingEnabled() ? SessionID::legacyPrivateSessionID() : SessionID::defaultSessionID();
+ }
+
+ RefPtr<WebProcessProxy> process;
+ if (m_processModel == ProcessModelSharedSecondaryProcess) {
+ process = &ensureSharedWebProcess();
+ } else {
+ if (m_haveInitialEmptyProcess) {
+ process = m_processes.last();
+ m_haveInitialEmptyProcess = false;
+ } else if (configuration.relatedPage) {
+ // Sharing processes, e.g. when creating the page via window.open().
+ process = &configuration.relatedPage->process();
+ } else
+ process = &createNewWebProcessRespectingProcessCountLimit();
+ }
+
+ return process->createWebPage(pageClient, WTF::move(configuration));
+}
+
+DownloadProxy* WebProcessPool::download(WebPageProxy* initiatingPage, const ResourceRequest& request)
+{
+ DownloadProxy* downloadProxy = createDownloadProxy(request);
+ uint64_t initiatingPageID = initiatingPage ? initiatingPage->pageID() : 0;
+
+#if ENABLE(NETWORK_PROCESS)
+ if (usesNetworkProcess() && networkProcess()) {
+ // FIXME (NetworkProcess): Replicate whatever FrameLoader::setOriginalURLForDownloadRequest does with the request here.
+ networkProcess()->send(Messages::NetworkProcess::DownloadRequest(downloadProxy->downloadID(), request), 0);
+ return downloadProxy;
+ }
+#endif
+
+ m_processes[0]->send(Messages::WebProcess::DownloadRequest(downloadProxy->downloadID(), initiatingPageID, request), 0);
+ return downloadProxy;
+}
+
+DownloadProxy* WebProcessPool::resumeDownload(const API::Data* resumeData, const String& path)
+{
+ DownloadProxy* downloadProxy = createDownloadProxy(ResourceRequest());
+
+ SandboxExtension::Handle sandboxExtensionHandle;
+ if (!path.isEmpty())
+ SandboxExtension::createHandle(path, SandboxExtension::ReadWrite, sandboxExtensionHandle);
+
+#if ENABLE(NETWORK_PROCESS)
+ if (usesNetworkProcess() && networkProcess()) {
+ networkProcess()->send(Messages::NetworkProcess::ResumeDownload(downloadProxy->downloadID(), resumeData->dataReference(), path, sandboxExtensionHandle), 0);
+ return downloadProxy;
+ }
+#endif
+
+ m_processes[0]->send(Messages::WebProcess::ResumeDownload(downloadProxy->downloadID(), resumeData->dataReference(), path, sandboxExtensionHandle), 0);
+ return downloadProxy;
+}
+
+void WebProcessPool::postMessageToInjectedBundle(const String& messageName, API::Object* messageBody)
+{
+ if (m_processes.isEmpty()) {
+ if (m_processModel == ProcessModelSharedSecondaryProcess)
+ m_messagesToInjectedBundlePostedToEmptyContext.append(std::make_pair(messageName, messageBody));
+ return;
+ }
+
+ for (auto& process : m_processes) {
+ // FIXME: Return early if the message body contains any references to WKPageRefs/WKFrameRefs etc. since they're local to a process.
+ IPC::ArgumentEncoder messageData;
+ messageData.encode(messageName);
+ messageData.encode(WebContextUserMessageEncoder(messageBody, *process.get()));
+
+ process->send(Messages::WebProcess::PostInjectedBundleMessage(IPC::DataReference(messageData.buffer(), messageData.bufferSize())), 0);
+ }
+}
+
+// InjectedBundle client
+
+void WebProcessPool::didReceiveMessageFromInjectedBundle(const String& messageName, API::Object* messageBody)
+{
+ m_injectedBundleClient.didReceiveMessageFromInjectedBundle(this, messageName, messageBody);
+}
+
+void WebProcessPool::didReceiveSynchronousMessageFromInjectedBundle(const String& messageName, API::Object* messageBody, RefPtr<API::Object>& returnData)
+{
+ m_injectedBundleClient.didReceiveSynchronousMessageFromInjectedBundle(this, messageName, messageBody, returnData);
+}
+
+void WebProcessPool::populateVisitedLinks()
+{
+ m_historyClient->populateVisitedLinks(*this);
+}
+
+WebProcessPool::Statistics& WebProcessPool::statistics()
+{
+ static Statistics statistics = Statistics();
+
+ return statistics;
+}
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+void WebProcessPool::setAdditionalPluginsDirectory(const String& directory)
+{
+ Vector<String> directories;
+ directories.append(directory);
+
+ m_pluginInfoStore.setAdditionalPluginsDirectories(directories);
+}
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
+void WebProcessPool::setAlwaysUsesComplexTextCodePath(bool alwaysUseComplexText)
+{
+ m_alwaysUsesComplexTextCodePath = alwaysUseComplexText;
+ sendToAllProcesses(Messages::WebProcess::SetAlwaysUsesComplexTextCodePath(alwaysUseComplexText));
+}
+
+void WebProcessPool::setShouldUseFontSmoothing(bool useFontSmoothing)
+{
+ m_shouldUseFontSmoothing = useFontSmoothing;
+ sendToAllProcesses(Messages::WebProcess::SetShouldUseFontSmoothing(useFontSmoothing));
+}
+
+void WebProcessPool::registerURLSchemeAsEmptyDocument(const String& urlScheme)
+{
+ m_schemesToRegisterAsEmptyDocument.add(urlScheme);
+ sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsEmptyDocument(urlScheme));
+}
+
+void WebProcessPool::registerURLSchemeAsSecure(const String& urlScheme)
+{
+ m_schemesToRegisterAsSecure.add(urlScheme);
+ sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsSecure(urlScheme));
+}
+
+void WebProcessPool::setDomainRelaxationForbiddenForURLScheme(const String& urlScheme)
+{
+ m_schemesToSetDomainRelaxationForbiddenFor.add(urlScheme);
+ sendToAllProcesses(Messages::WebProcess::SetDomainRelaxationForbiddenForURLScheme(urlScheme));
+}
+
+void WebProcessPool::setCanHandleHTTPSServerTrustEvaluation(bool value)
+{
+#if ENABLE(NETWORK_PROCESS)
+ m_canHandleHTTPSServerTrustEvaluation = value;
+ if (m_usesNetworkProcess && m_networkProcess) {
+ m_networkProcess->send(Messages::NetworkProcess::SetCanHandleHTTPSServerTrustEvaluation(value), 0);
+ return;
+ }
+#else
+ UNUSED_PARAM(value);
+#endif
+}
+
+void WebProcessPool::registerURLSchemeAsLocal(const String& urlScheme)
+{
+ m_schemesToRegisterAsLocal.add(urlScheme);
+ sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsLocal(urlScheme));
+}
+
+void WebProcessPool::registerURLSchemeAsNoAccess(const String& urlScheme)
+{
+ m_schemesToRegisterAsNoAccess.add(urlScheme);
+ sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsNoAccess(urlScheme));
+}
+
+void WebProcessPool::registerURLSchemeAsDisplayIsolated(const String& urlScheme)
+{
+ m_schemesToRegisterAsDisplayIsolated.add(urlScheme);
+ sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsDisplayIsolated(urlScheme));
+}
+
+void WebProcessPool::registerURLSchemeAsCORSEnabled(const String& urlScheme)
+{
+ m_schemesToRegisterAsCORSEnabled.add(urlScheme);
+ sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsCORSEnabled(urlScheme));
+}
+
+HashSet<String>& WebProcessPool::globalURLSchemesWithCustomProtocolHandlers()
+{
+ static NeverDestroyed<HashSet<String>> set;
+ return set;
+}
+
+void WebProcessPool::registerGlobalURLSchemeAsHavingCustomProtocolHandlers(const String& urlScheme)
+{
+ if (!urlScheme)
+ return;
+
+ String schemeLower = urlScheme.lower();
+ globalURLSchemesWithCustomProtocolHandlers().add(schemeLower);
+ for (auto* processPool : allProcessPools())
+ processPool->registerSchemeForCustomProtocol(schemeLower);
+}
+
+void WebProcessPool::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(const String& urlScheme)
+{
+ if (!urlScheme)
+ return;
+
+ String schemeLower = urlScheme.lower();
+ globalURLSchemesWithCustomProtocolHandlers().remove(schemeLower);
+ for (auto* processPool : allProcessPools())
+ processPool->unregisterSchemeForCustomProtocol(schemeLower);
+}
+
+#if ENABLE(CACHE_PARTITIONING)
+void WebProcessPool::registerURLSchemeAsCachePartitioned(const String& urlScheme)
+{
+ m_schemesToRegisterAsCachePartitioned.add(urlScheme);
+ sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsCachePartitioned(urlScheme));
+}
+#endif
+
+void WebProcessPool::setCacheModel(CacheModel cacheModel)
+{
+ m_cacheModel = cacheModel;
+ sendToAllProcesses(Messages::WebProcess::SetCacheModel(static_cast<uint32_t>(m_cacheModel)));
+
+ // FIXME: Inform the Network Process if in use.
+}
+
+void WebProcessPool::setDefaultRequestTimeoutInterval(double timeoutInterval)
+{
+ sendToAllProcesses(Messages::WebProcess::SetDefaultRequestTimeoutInterval(timeoutInterval));
+}
+
+DownloadProxy* WebProcessPool::createDownloadProxy(const ResourceRequest& request)
+{
+#if ENABLE(NETWORK_PROCESS)
+ if (usesNetworkProcess()) {
+ ensureNetworkProcess();
+ ASSERT(m_networkProcess);
+ return m_networkProcess->createDownloadProxy(request);
+ }
+#endif
+
+ return ensureSharedWebProcess().createDownloadProxy(request);
+}
+
+void WebProcessPool::addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver& messageReceiver)
+{
+ m_messageReceiverMap.addMessageReceiver(messageReceiverName, messageReceiver);
+}
+
+void WebProcessPool::addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver& messageReceiver)
+{
+ m_messageReceiverMap.addMessageReceiver(messageReceiverName, destinationID, messageReceiver);
+}
+
+void WebProcessPool::removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID)
+{
+ m_messageReceiverMap.removeMessageReceiver(messageReceiverName, destinationID);
+}
+
+bool WebProcessPool::dispatchMessage(IPC::Connection* connection, IPC::MessageDecoder& decoder)
+{
+ return m_messageReceiverMap.dispatchMessage(connection, decoder);
+}
+
+bool WebProcessPool::dispatchSyncMessage(IPC::Connection* connection, IPC::MessageDecoder& decoder, std::unique_ptr<IPC::MessageEncoder>& replyEncoder)
+{
+ return m_messageReceiverMap.dispatchSyncMessage(connection, decoder, replyEncoder);
+}
+
+void WebProcessPool::didReceiveMessage(IPC::Connection* connection, IPC::MessageDecoder& decoder)
+{
+ if (decoder.messageReceiverName() == Messages::WebProcessPool::messageReceiverName()) {
+ didReceiveWebProcessPoolMessage(connection, decoder);
+ return;
+ }
+
+ if (decoder.messageReceiverName() == WebContextLegacyMessages::messageReceiverName()
+ && decoder.messageName() == WebContextLegacyMessages::postMessageMessageName()) {
+ String messageName;
+ RefPtr<API::Object> messageBody;
+ WebContextUserMessageDecoder messageBodyDecoder(messageBody, *WebProcessProxy::fromConnection(connection));
+ if (!decoder.decode(messageName))
+ return;
+ if (!decoder.decode(messageBodyDecoder))
+ return;
+
+ didReceiveMessageFromInjectedBundle(messageName, messageBody.get());
+ return;
+ }
+
+ ASSERT_NOT_REACHED();
+}
+
+void WebProcessPool::didReceiveSyncMessage(IPC::Connection* connection, IPC::MessageDecoder& decoder, std::unique_ptr<IPC::MessageEncoder>& replyEncoder)
+{
+ if (decoder.messageReceiverName() == Messages::WebProcessPool::messageReceiverName()) {
+ didReceiveSyncWebProcessPoolMessage(connection, decoder, replyEncoder);
+ return;
+ }
+
+ if (decoder.messageReceiverName() == WebContextLegacyMessages::messageReceiverName()
+ && decoder.messageName() == WebContextLegacyMessages::postSynchronousMessageMessageName()) {
+ // FIXME: We should probably encode something in the case that the arguments do not decode correctly.
+
+ WebProcessProxy* process = WebProcessProxy::fromConnection(connection);
+
+ String messageName;
+ RefPtr<API::Object> messageBody;
+ WebContextUserMessageDecoder messageBodyDecoder(messageBody, *process);
+ if (!decoder.decode(messageName))
+ return;
+ if (!decoder.decode(messageBodyDecoder))
+ return;
+
+ RefPtr<API::Object> returnData;
+ didReceiveSynchronousMessageFromInjectedBundle(messageName, messageBody.get(), returnData);
+ replyEncoder->encode(WebContextUserMessageEncoder(returnData.get(), *process));
+ return;
+ }
+
+ ASSERT_NOT_REACHED();
+}
+
+void WebProcessPool::setEnhancedAccessibility(bool flag)
+{
+ sendToAllProcesses(Messages::WebProcess::SetEnhancedAccessibility(flag));
+}
+
+void WebProcessPool::startMemorySampler(const double interval)
+{
+ // For new WebProcesses we will also want to start the Memory Sampler
+ m_memorySamplerEnabled = true;
+ m_memorySamplerInterval = interval;
+
+ // For UIProcess
+#if ENABLE(MEMORY_SAMPLER)
+ WebMemorySampler::shared()->start(interval);
+#endif
+
+ // For WebProcess
+ SandboxExtension::Handle sampleLogSandboxHandle;
+ double now = WTF::currentTime();
+ String sampleLogFilePath = String::format("WebProcess%llu", static_cast<unsigned long long>(now));
+ sampleLogFilePath = SandboxExtension::createHandleForTemporaryFile(sampleLogFilePath, SandboxExtension::ReadWrite, sampleLogSandboxHandle);
+
+ sendToAllProcesses(Messages::WebProcess::StartMemorySampler(sampleLogSandboxHandle, sampleLogFilePath, interval));
+}
+
+void WebProcessPool::stopMemorySampler()
+{
+ // For WebProcess
+ m_memorySamplerEnabled = false;
+
+ // For UIProcess
+#if ENABLE(MEMORY_SAMPLER)
+ WebMemorySampler::shared()->stop();
+#endif
+
+ sendToAllProcesses(Messages::WebProcess::StopMemorySampler());
+}
+
+String WebProcessPool::applicationCacheDirectory() const
+{
+ if (!m_overrideApplicationCacheDirectory.isEmpty())
+ return m_overrideApplicationCacheDirectory;
+
+ return platformDefaultApplicationCacheDirectory();
+}
+
+void WebProcessPool::setIconDatabasePath(const String& path)
+{
+ m_overrideIconDatabasePath = path;
+ if (!m_overrideIconDatabasePath.isEmpty()) {
+ // This implicitly enables the database on UI process side.
+ m_iconDatabase->setDatabasePath(path);
+ }
+}
+
+String WebProcessPool::iconDatabasePath() const
+{
+ if (!m_overrideIconDatabasePath.isNull())
+ return m_overrideIconDatabasePath;
+
+ return platformDefaultIconDatabasePath();
+}
+
+String WebProcessPool::diskCacheDirectory() const
+{
+ if (!m_overrideDiskCacheDirectory.isEmpty())
+ return m_overrideDiskCacheDirectory;
+
+ return platformDefaultDiskCacheDirectory();
+}
+
+String WebProcessPool::cookieStorageDirectory() const
+{
+ if (!m_overrideCookieStorageDirectory.isEmpty())
+ return m_overrideCookieStorageDirectory;
+
+ return platformDefaultCookieStorageDirectory();
+}
+
+void WebProcessPool::useTestingNetworkSession()
+{
+ ASSERT(m_processes.isEmpty());
+#if ENABLE(NETWORK_PROCESS)
+ ASSERT(!m_networkProcess);
+
+ if (m_networkProcess)
+ return;
+#endif
+
+ if (!m_processes.isEmpty())
+ return;
+
+ m_shouldUseTestingNetworkSession = true;
+}
+
+void WebProcessPool::allowSpecificHTTPSCertificateForHost(const WebCertificateInfo* certificate, const String& host)
+{
+#if ENABLE(NETWORK_PROCESS)
+ if (m_usesNetworkProcess && m_networkProcess) {
+ m_networkProcess->send(Messages::NetworkProcess::AllowSpecificHTTPSCertificateForHost(certificate->certificateInfo(), host), 0);
+ return;
+ }
+#endif
+
+#if USE(SOUP)
+ m_processes[0]->send(Messages::WebProcess::AllowSpecificHTTPSCertificateForHost(certificate->certificateInfo(), host), 0);
+ return;
+#else
+ UNUSED_PARAM(certificate);
+ UNUSED_PARAM(host);
+#endif
+
+#if !PLATFORM(IOS)
+ ASSERT_NOT_REACHED();
+#endif
+}
+
+void WebProcessPool::setHTTPPipeliningEnabled(bool enabled)
+{
+#if PLATFORM(COCOA)
+ ResourceRequest::setHTTPPipeliningEnabled(enabled);
+#else
+ UNUSED_PARAM(enabled);
+#endif
+}
+
+bool WebProcessPool::httpPipeliningEnabled() const
+{
+#if PLATFORM(COCOA)
+ return ResourceRequest::httpPipeliningEnabled();
+#else
+ return false;
+#endif
+}
+
+void WebProcessPool::getStatistics(uint32_t statisticsMask, std::function<void (ImmutableDictionary*, CallbackBase::Error)> callbackFunction)
+{
+ if (!statisticsMask) {
+ callbackFunction(nullptr, CallbackBase::Error::Unknown);
+ return;
+ }
+
+ RefPtr<StatisticsRequest> request = StatisticsRequest::create(DictionaryCallback::create(WTF::move(callbackFunction)));
+
+ if (statisticsMask & StatisticsRequestTypeWebContent)
+ requestWebContentStatistics(request.get());
+
+ if (statisticsMask & StatisticsRequestTypeNetworking)
+ requestNetworkingStatistics(request.get());
+}
+
+void WebProcessPool::requestWebContentStatistics(StatisticsRequest* request)
+{
+ if (m_processModel == ProcessModelSharedSecondaryProcess) {
+ if (m_processes.isEmpty())
+ return;
+
+ uint64_t requestID = request->addOutstandingRequest();
+ m_statisticsRequests.set(requestID, request);
+ m_processes[0]->send(Messages::WebProcess::GetWebCoreStatistics(requestID), 0);
+
+ } else {
+ // FIXME (Multi-WebProcess) <rdar://problem/13200059>: Make getting statistics from multiple WebProcesses work.
+ }
+}
+
+void WebProcessPool::requestNetworkingStatistics(StatisticsRequest* request)
+{
+ bool networkProcessUnavailable;
+#if ENABLE(NETWORK_PROCESS)
+ networkProcessUnavailable = !m_usesNetworkProcess || !m_networkProcess;
+#else
+ networkProcessUnavailable = true;
+#endif
+
+ if (networkProcessUnavailable) {
+ LOG_ERROR("Attempt to get NetworkProcess statistics but the NetworkProcess is unavailable");
+ return;
+ }
+
+#if ENABLE(NETWORK_PROCESS)
+ uint64_t requestID = request->addOutstandingRequest();
+ m_statisticsRequests.set(requestID, request);
+ m_networkProcess->send(Messages::NetworkProcess::GetNetworkProcessStatistics(requestID), 0);
+#else
+ UNUSED_PARAM(request);
+#endif
+}
+
+#if !PLATFORM(COCOA)
+void WebProcessPool::dummy(bool&)
+{
+}
+#endif
+
+void WebProcessPool::didGetStatistics(const StatisticsData& statisticsData, uint64_t requestID)
+{
+ RefPtr<StatisticsRequest> request = m_statisticsRequests.take(requestID);
+ if (!request) {
+ LOG_ERROR("Cannot report networking statistics.");
+ return;
+ }
+
+ request->completedRequest(requestID, statisticsData);
+}
+
+void WebProcessPool::garbageCollectJavaScriptObjects()
+{
+ sendToAllProcesses(Messages::WebProcess::GarbageCollectJavaScriptObjects());
+}
+
+void WebProcessPool::setJavaScriptGarbageCollectorTimerEnabled(bool flag)
+{
+ sendToAllProcesses(Messages::WebProcess::SetJavaScriptGarbageCollectorTimerEnabled(flag));
+}
+
+void WebProcessPool::addPlugInAutoStartOriginHash(const String& pageOrigin, unsigned plugInOriginHash, SessionID sessionID)
+{
+ m_plugInAutoStartProvider.addAutoStartOriginHash(pageOrigin, plugInOriginHash, sessionID);
+}
+
+void WebProcessPool::plugInDidReceiveUserInteraction(unsigned plugInOriginHash, SessionID sessionID)
+{
+ m_plugInAutoStartProvider.didReceiveUserInteraction(plugInOriginHash, sessionID);
+}
+
+PassRefPtr<ImmutableDictionary> WebProcessPool::plugInAutoStartOriginHashes() const
+{
+ return m_plugInAutoStartProvider.autoStartOriginsTableCopy();
+}
+
+void WebProcessPool::setPlugInAutoStartOriginHashes(ImmutableDictionary& dictionary)
+{
+ m_plugInAutoStartProvider.setAutoStartOriginsTable(dictionary);
+}
+
+void WebProcessPool::setPlugInAutoStartOrigins(API::Array& array)
+{
+ m_plugInAutoStartProvider.setAutoStartOriginsArray(array);
+}
+
+void WebProcessPool::setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(ImmutableDictionary& dictionary, double time)
+{
+ m_plugInAutoStartProvider.setAutoStartOriginsFilteringOutEntriesAddedAfterTime(dictionary, time);
+}
+
+void WebProcessPool::registerSchemeForCustomProtocol(const String& scheme)
+{
+ sendToNetworkingProcess(Messages::CustomProtocolManager::RegisterScheme(scheme));
+}
+
+void WebProcessPool::unregisterSchemeForCustomProtocol(const String& scheme)
+{
+ sendToNetworkingProcess(Messages::CustomProtocolManager::UnregisterScheme(scheme));
+}
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+void WebProcessPool::pluginInfoStoreDidLoadPlugins(PluginInfoStore* store)
+{
+#ifdef NDEBUG
+ UNUSED_PARAM(store);
+#endif
+ ASSERT(store == &m_pluginInfoStore);
+
+ Vector<PluginModuleInfo> pluginModules = m_pluginInfoStore.plugins();
+
+ Vector<RefPtr<API::Object>> plugins;
+ plugins.reserveInitialCapacity(pluginModules.size());
+
+ for (const auto& pluginModule : pluginModules) {
+ ImmutableDictionary::MapType map;
+ map.set(ASCIILiteral("path"), API::String::create(pluginModule.path));
+ map.set(ASCIILiteral("name"), API::String::create(pluginModule.info.name));
+ map.set(ASCIILiteral("file"), API::String::create(pluginModule.info.file));
+ map.set(ASCIILiteral("desc"), API::String::create(pluginModule.info.desc));
+
+ Vector<RefPtr<API::Object>> mimeTypes;
+ mimeTypes.reserveInitialCapacity(pluginModule.info.mimes.size());
+ for (const auto& mimeClassInfo : pluginModule.info.mimes)
+ mimeTypes.uncheckedAppend(API::String::create(mimeClassInfo.type));
+ map.set(ASCIILiteral("mimes"), API::Array::create(WTF::move(mimeTypes)));
+
+#if PLATFORM(COCOA)
+ map.set(ASCIILiteral("bundleId"), API::String::create(pluginModule.bundleIdentifier));
+ map.set(ASCIILiteral("version"), API::String::create(pluginModule.versionString));
+#endif
+
+ plugins.uncheckedAppend(ImmutableDictionary::create(WTF::move(map)));
+ }
+
+ m_client.plugInInformationBecameAvailable(this, API::Array::create(WTF::move(plugins)).get());
+}
+#endif
+
+void WebProcessPool::setMemoryCacheDisabled(bool disabled)
+{
+ m_memoryCacheDisabled = disabled;
+ sendToAllProcesses(Messages::WebProcess::SetMemoryCacheDisabled(disabled));
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolhfromrev177636trunkSourceWebKit2UIProcessWebContexth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (from rev 177636, trunk/Source/WebKit2/UIProcess/WebContext.h) (0 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -0,0 +1,693 @@
</span><ins>+/*
+ * Copyright (C) 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebProcessPool_h
+#define WebProcessPool_h
+
+#include "APIObject.h"
+#include "DownloadProxyMap.h"
+#include "GenericCallback.h"
+#include "ImmutableDictionary.h"
+#include "MessageReceiver.h"
+#include "MessageReceiverMap.h"
+#include "PlugInAutoStartProvider.h"
+#include "PluginInfoStore.h"
+#include "ProcessModel.h"
+#include "ProcessThrottler.h"
+#include "StatisticsRequest.h"
+#include "StorageManager.h"
+#include "VisitedLinkProvider.h"
+#include "WebContextClient.h"
+#include "WebContextConnectionClient.h"
+#include "WebContextInjectedBundleClient.h"
+#include "WebProcessProxy.h"
+#include <WebCore/LinkHash.h>
+#include <WebCore/SessionID.h>
+#include <wtf/Forward.h>
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounter.h>
+#include <wtf/RefPtr.h>
+#include <wtf/text/StringHash.h>
+#include <wtf/text/WTFString.h>
+
+#if ENABLE(DATABASE_PROCESS)
+#include "DatabaseProcessProxy.h"
+#endif
+
+#if ENABLE(NETWORK_PROCESS)
+#include "NetworkProcessProxy.h"
+#endif
+
+#if PLATFORM(COCOA)
+OBJC_CLASS NSMutableDictionary;
+OBJC_CLASS NSObject;
+OBJC_CLASS NSString;
+#endif
+
+namespace API {
+class DownloadClient;
+class LegacyContextHistoryClient;
+}
+
+namespace WebKit {
+
+class DownloadProxy;
+class WebContextSupplement;
+class WebIconDatabase;
+class WebPageGroup;
+class WebPageProxy;
+struct StatisticsData;
+struct WebPageConfiguration;
+struct WebProcessCreationParameters;
+
+typedef GenericCallback<ImmutableDictionary*> DictionaryCallback;
+
+#if ENABLE(NETWORK_PROCESS)
+struct NetworkProcessCreationParameters;
+#endif
+
+#if PLATFORM(COCOA)
+int networkProcessLatencyQOS();
+int networkProcessThroughputQOS();
+int webProcessLatencyQOS();
+int webProcessThroughputQOS();
+#endif
+
+struct WebProcessPoolConfiguration {
+ String injectedBundlePath;
+ String localStorageDirectory;
+ String webSQLDatabaseDirectory;
+ String indexedDBDatabaseDirectory;
+ String mediaKeysStorageDirectory;
+};
+
+class WebProcessPool : public API::ObjectImpl<API::Object::Type::ProcessPool>, private IPC::MessageReceiver
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ , private PluginInfoStoreClient
+#endif
+ {
+public:
+ static void applyPlatformSpecificConfigurationDefaults(WebProcessPoolConfiguration&);
+
+ WebProcessPool(WebProcessPoolConfiguration);
+
+ static PassRefPtr<WebProcessPool> create(WebProcessPoolConfiguration);
+ virtual ~WebProcessPool();
+
+ static const Vector<WebProcessPool*>& allProcessPools();
+
+ template <typename T>
+ T* supplement()
+ {
+ return static_cast<T*>(m_supplements.get(T::supplementName()));
+ }
+
+ template <typename T>
+ void addSupplement()
+ {
+ m_supplements.add(T::supplementName(), T::create(this));
+ }
+
+ void addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver&);
+ void addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver&);
+ void removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID);
+
+ bool dispatchMessage(IPC::Connection*, IPC::MessageDecoder&);
+ bool dispatchSyncMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&);
+
+ void initializeClient(const WKContextClientBase*);
+ void initializeInjectedBundleClient(const WKContextInjectedBundleClientBase*);
+ void initializeConnectionClient(const WKContextConnectionClientBase*);
+ void setHistoryClient(std::unique_ptr<API::LegacyContextHistoryClient>);
+ void setDownloadClient(std::unique_ptr<API::DownloadClient>);
+
+ void setProcessModel(ProcessModel); // Can only be called when there are no processes running.
+ ProcessModel processModel() const { return m_processModel; }
+
+ void setMaximumNumberOfProcesses(unsigned); // Can only be called when there are no processes running.
+ unsigned maximumNumberOfProcesses() const { return m_webProcessCountLimit; }
+
+ const Vector<RefPtr<WebProcessProxy>>& processes() const { return m_processes; }
+
+ // WebProcess or NetworkProcess as approporiate for current process model. The connection must be non-null.
+ IPC::Connection* networkingProcessConnection();
+
+ template<typename T> void sendToAllProcesses(const T& message);
+ template<typename T> void sendToAllProcessesRelaunchingThemIfNecessary(const T& message);
+ template<typename T> void sendToOneProcess(T&& message);
+
+ // Sends the message to WebProcess or NetworkProcess as approporiate for current process model.
+ template<typename T> void sendToNetworkingProcess(T&& message);
+ template<typename T> void sendToNetworkingProcessRelaunchingIfNecessary(T&& message);
+
+ // Sends the message to WebProcess or DatabaseProcess as approporiate for current process model.
+ template<typename T> void sendToDatabaseProcessRelaunchingIfNecessary(T&& message);
+
+ void processWillOpenConnection(WebProcessProxy*);
+ void processWillCloseConnection(WebProcessProxy*);
+ void processDidFinishLaunching(WebProcessProxy*);
+
+ void applicationWillTerminate();
+ // Disconnect the process from the context.
+ void disconnectProcess(WebProcessProxy*);
+
+ StorageManager& storageManager() const { return *m_storageManager; }
+
+ PassRefPtr<WebPageProxy> createWebPage(PageClient&, WebPageConfiguration);
+
+ const String& injectedBundlePath() const { return m_injectedBundlePath; }
+
+ DownloadProxy* download(WebPageProxy* initiatingPage, const WebCore::ResourceRequest&);
+ DownloadProxy* resumeDownload(const API::Data* resumeData, const String& path);
+
+ void setInjectedBundleInitializationUserData(PassRefPtr<API::Object> userData) { m_injectedBundleInitializationUserData = userData; }
+
+ void postMessageToInjectedBundle(const String&, API::Object*);
+
+ // InjectedBundle client
+ void didReceiveMessageFromInjectedBundle(const String&, API::Object*);
+ void didReceiveSynchronousMessageFromInjectedBundle(const String&, API::Object*, RefPtr<API::Object>& returnData);
+
+ void populateVisitedLinks();
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ void setAdditionalPluginsDirectory(const String&);
+
+ PluginInfoStore& pluginInfoStore() { return m_pluginInfoStore; }
+#endif
+
+ void setAlwaysUsesComplexTextCodePath(bool);
+ void setShouldUseFontSmoothing(bool);
+
+ void registerURLSchemeAsEmptyDocument(const String&);
+ void registerURLSchemeAsSecure(const String&);
+ void setDomainRelaxationForbiddenForURLScheme(const String&);
+ void setCanHandleHTTPSServerTrustEvaluation(bool);
+ void registerURLSchemeAsLocal(const String&);
+ void registerURLSchemeAsNoAccess(const String&);
+ void registerURLSchemeAsDisplayIsolated(const String&);
+ void registerURLSchemeAsCORSEnabled(const String&);
+#if ENABLE(CACHE_PARTITIONING)
+ void registerURLSchemeAsCachePartitioned(const String&);
+#endif
+
+ VisitedLinkProvider& visitedLinkProvider() { return *m_visitedLinkProvider; }
+
+ // MessageReceiver.
+ virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) override;
+ virtual void didReceiveSyncMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&) override;
+
+ void setCacheModel(CacheModel);
+ CacheModel cacheModel() const { return m_cacheModel; }
+
+ void setDefaultRequestTimeoutInterval(double);
+
+ void startMemorySampler(const double interval);
+ void stopMemorySampler();
+
+#if USE(SOUP)
+ void setInitialHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicy policy) { m_initialHTTPCookieAcceptPolicy = policy; }
+#endif
+ void setEnhancedAccessibility(bool);
+
+ // Downloads.
+ DownloadProxy* createDownloadProxy(const WebCore::ResourceRequest&);
+ API::DownloadClient& downloadClient() { return *m_downloadClient; }
+
+ API::LegacyContextHistoryClient& historyClient() { return *m_historyClient; }
+ WebContextClient& client() { return m_client; }
+
+ WebIconDatabase* iconDatabase() const { return m_iconDatabase.get(); }
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ WebPluginSiteDataManager* pluginSiteDataManager() const { return m_pluginSiteDataManager.get(); }
+#endif
+
+ struct Statistics {
+ unsigned wkViewCount;
+ unsigned wkPageCount;
+ unsigned wkFrameCount;
+ };
+ static Statistics& statistics();
+
+ void setApplicationCacheDirectory(const String& dir) { m_overrideApplicationCacheDirectory = dir; }
+ void setIconDatabasePath(const String&);
+ String iconDatabasePath() const;
+ void setDiskCacheDirectory(const String& dir) { m_overrideDiskCacheDirectory = dir; }
+ void setCookieStorageDirectory(const String& dir) { m_overrideCookieStorageDirectory = dir; }
+
+ void useTestingNetworkSession();
+
+ void allowSpecificHTTPSCertificateForHost(const WebCertificateInfo*, const String& host);
+
+ WebProcessProxy& ensureSharedWebProcess();
+ WebProcessProxy& createNewWebProcessRespectingProcessCountLimit(); // Will return an existing one if limit is met.
+ void warmInitialProcess();
+
+ bool shouldTerminate(WebProcessProxy*);
+
+ void disableProcessTermination() { m_processTerminationEnabled = false; }
+ void enableProcessTermination();
+
+ // Defaults to false.
+ void setHTTPPipeliningEnabled(bool);
+ bool httpPipeliningEnabled() const;
+
+ void getStatistics(uint32_t statisticsMask, std::function<void (ImmutableDictionary*, CallbackBase::Error)>);
+
+ void garbageCollectJavaScriptObjects();
+ void setJavaScriptGarbageCollectorTimerEnabled(bool flag);
+
+#if PLATFORM(COCOA)
+ static bool omitPDFSupport();
+#endif
+
+ void fullKeyboardAccessModeChanged(bool fullKeyboardAccessEnabled);
+
+ void textCheckerStateChanged();
+
+ PassRefPtr<ImmutableDictionary> plugInAutoStartOriginHashes() const;
+ void setPlugInAutoStartOriginHashes(ImmutableDictionary&);
+ void setPlugInAutoStartOrigins(API::Array&);
+ void setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(ImmutableDictionary&, double time);
+
+ // Network Process Management
+
+ void setUsesNetworkProcess(bool);
+ bool usesNetworkProcess() const;
+
+#if ENABLE(NETWORK_PROCESS)
+ void ensureNetworkProcess();
+ NetworkProcessProxy* networkProcess() { return m_networkProcess.get(); }
+ void networkProcessCrashed(NetworkProcessProxy*);
+
+ void getNetworkProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply>);
+#endif
+
+#if ENABLE(DATABASE_PROCESS)
+ void ensureDatabaseProcess();
+ void getDatabaseProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetDatabaseProcessConnection::DelayedReply>);
+ void databaseProcessCrashed(DatabaseProcessProxy*);
+#endif
+
+#if PLATFORM(COCOA)
+ bool processSuppressionEnabled() const;
+#endif
+
+ void windowServerConnectionStateChanged();
+
+ static void willStartUsingPrivateBrowsing();
+ static void willStopUsingPrivateBrowsing();
+
+ static bool isEphemeralSession(WebCore::SessionID);
+
+#if USE(SOUP)
+ void setIgnoreTLSErrors(bool);
+ bool ignoreTLSErrors() const { return m_ignoreTLSErrors; }
+#endif
+
+ static void setInvalidMessageCallback(void (*)(WKStringRef));
+ static void didReceiveInvalidMessage(const IPC::StringReference& messageReceiverName, const IPC::StringReference& messageName);
+
+ void processDidCachePage(WebProcessProxy*);
+
+ bool isURLKnownHSTSHost(const String& urlString, bool privateBrowsingEnabled) const;
+ void resetHSTSHosts();
+
+ void registerSchemeForCustomProtocol(const String&);
+ void unregisterSchemeForCustomProtocol(const String&);
+
+ static HashSet<String>& globalURLSchemesWithCustomProtocolHandlers();
+ static void registerGlobalURLSchemeAsHavingCustomProtocolHandlers(const String&);
+ static void unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(const String&);
+
+#if PLATFORM(COCOA)
+ void updateProcessSuppressionState();
+
+ NSMutableDictionary *ensureBundleParameters();
+ NSMutableDictionary *bundleParameters() { return m_bundleParameters.get(); }
+#else
+ void updateProcessSuppressionState() const { }
+#endif
+
+ void setMemoryCacheDisabled(bool);
+
+ UserObservablePageToken userObservablePageCount()
+ {
+ return m_userObservablePageCounter.token<UserObservablePageTokenType>();
+ }
+
+ ProcessSuppressionDisabledToken processSuppressionDisabledForPageCount()
+ {
+ return m_processSuppressionDisabledForPageCounter.token<ProcessSuppressionDisabledTokenType>();
+ }
+
+private:
+ void platformInitialize();
+
+ void platformInitializeWebProcess(WebProcessCreationParameters&);
+ void platformInvalidateContext();
+
+ WebProcessProxy& createNewWebProcess();
+
+ void requestWebContentStatistics(StatisticsRequest*);
+ void requestNetworkingStatistics(StatisticsRequest*);
+
+#if ENABLE(NETWORK_PROCESS)
+ void platformInitializeNetworkProcess(NetworkProcessCreationParameters&);
+#endif
+
+#if PLATFORM(IOS)
+ void writeWebContentToPasteboard(const WebCore::PasteboardWebContent&);
+ void writeImageToPasteboard(const WebCore::PasteboardImage&);
+ void writeStringToPasteboard(const String& pasteboardType, const String&);
+ void readStringFromPasteboard(uint64_t index, const String& pasteboardType, WTF::String&);
+ void readURLFromPasteboard(uint64_t index, const String& pasteboardType, String&);
+ void readBufferFromPasteboard(uint64_t index, const String& pasteboardType, SharedMemory::Handle&, uint64_t& size);
+ void getPasteboardItemsCount(uint64_t& itemsCount);
+#endif
+#if PLATFORM(COCOA)
+ void getPasteboardTypes(const String& pasteboardName, Vector<String>& pasteboardTypes);
+ void getPasteboardPathnamesForType(const String& pasteboardName, const String& pasteboardType, Vector<String>& pathnames);
+ void getPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, String&);
+ void getPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, SharedMemory::Handle&, uint64_t& size);
+ void pasteboardCopy(const String& fromPasteboard, const String& toPasteboard, uint64_t& newChangeCount);
+ void getPasteboardChangeCount(const String& pasteboardName, uint64_t& changeCount);
+ void getPasteboardUniqueName(String& pasteboardName);
+ void getPasteboardColor(const String& pasteboardName, WebCore::Color&);
+ void getPasteboardURL(const String& pasteboardName, WTF::String&);
+ void addPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, uint64_t& newChangeCount);
+ void setPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, uint64_t& newChangeCount);
+ void setPasteboardPathnamesForType(const String& pasteboardName, const String& pasteboardType, const Vector<String>& pathnames, uint64_t& newChangeCount);
+ void setPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, const String&, uint64_t& newChangeCount);
+ void setPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, const SharedMemory::Handle&, uint64_t size, uint64_t& newChangeCount);
+#endif
+
+#if !PLATFORM(COCOA)
+ // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
+ // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
+ void dummy(bool&);
+#endif
+
+ void didGetStatistics(const StatisticsData&, uint64_t callbackID);
+
+ // Implemented in generated WebProcessPoolMessageReceiver.cpp
+ void didReceiveWebProcessPoolMessage(IPC::Connection*, IPC::MessageDecoder&);
+ void didReceiveSyncWebProcessPoolMessage(IPC::Connection*, IPC::MessageDecoder&, std::unique_ptr<IPC::MessageEncoder>&);
+
+ static void languageChanged(void* context);
+ void languageChanged();
+
+ String applicationCacheDirectory() const;
+ String platformDefaultApplicationCacheDirectory() const;
+
+ String platformDefaultIconDatabasePath() const;
+
+ static String platformDefaultLocalStorageDirectory();
+ static String platformDefaultIndexedDBDatabaseDirectory();
+ static String platformDefaultWebSQLDatabaseDirectory();
+ static String platformDefaultMediaKeysStorageDirectory();
+
+ String diskCacheDirectory() const;
+ String platformDefaultDiskCacheDirectory() const;
+
+ String cookieStorageDirectory() const;
+ String platformDefaultCookieStorageDirectory() const;
+
+#if PLATFORM(IOS)
+ String openGLCacheDirectory() const;
+ String parentBundleDirectory() const;
+ String networkingHSTSDatabasePath() const;
+ String webContentHSTSDatabasePath() const;
+ String containerTemporaryDirectory() const;
+#endif
+
+#if PLATFORM(COCOA)
+ void registerNotificationObservers();
+ void unregisterNotificationObservers();
+#endif
+
+ void addPlugInAutoStartOriginHash(const String& pageOrigin, unsigned plugInOriginHash, WebCore::SessionID);
+ void plugInDidReceiveUserInteraction(unsigned plugInOriginHash, WebCore::SessionID);
+
+ void setAnyPageGroupMightHavePrivateBrowsingEnabled(bool);
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ // PluginInfoStoreClient:
+ virtual void pluginInfoStoreDidLoadPlugins(PluginInfoStore*) override;
+#endif
+
+ IPC::MessageReceiverMap m_messageReceiverMap;
+
+ ProcessModel m_processModel;
+ unsigned m_webProcessCountLimit; // The limit has no effect when process model is ProcessModelSharedSecondaryProcess.
+
+ Vector<RefPtr<WebProcessProxy>> m_processes;
+ bool m_haveInitialEmptyProcess;
+
+ WebProcessProxy* m_processWithPageCache;
+
+ Ref<WebPageGroup> m_defaultPageGroup;
+
+ RefPtr<API::Object> m_injectedBundleInitializationUserData;
+ String m_injectedBundlePath;
+ WebContextInjectedBundleClient m_injectedBundleClient;
+
+ WebContextClient m_client;
+ WebContextConnectionClient m_connectionClient;
+ std::unique_ptr<API::DownloadClient> m_downloadClient;
+ std::unique_ptr<API::LegacyContextHistoryClient> m_historyClient;
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ PluginInfoStore m_pluginInfoStore;
+#endif
+ RefPtr<VisitedLinkProvider> m_visitedLinkProvider;
+ bool m_visitedLinksPopulated;
+
+ PlugInAutoStartProvider m_plugInAutoStartProvider;
+
+ HashSet<String> m_schemesToRegisterAsEmptyDocument;
+ HashSet<String> m_schemesToRegisterAsSecure;
+ HashSet<String> m_schemesToSetDomainRelaxationForbiddenFor;
+ HashSet<String> m_schemesToRegisterAsLocal;
+ HashSet<String> m_schemesToRegisterAsNoAccess;
+ HashSet<String> m_schemesToRegisterAsDisplayIsolated;
+ HashSet<String> m_schemesToRegisterAsCORSEnabled;
+#if ENABLE(CACHE_PARTITIONING)
+ HashSet<String> m_schemesToRegisterAsCachePartitioned;
+#endif
+
+ bool m_alwaysUsesComplexTextCodePath;
+ bool m_shouldUseFontSmoothing;
+
+ // Messages that were posted before any pages were created.
+ // The client should use initialization messages instead, so that a restarted process would get the same state.
+ Vector<std::pair<String, RefPtr<API::Object>>> m_messagesToInjectedBundlePostedToEmptyContext;
+
+ CacheModel m_cacheModel;
+
+ bool m_memorySamplerEnabled;
+ double m_memorySamplerInterval;
+
+ RefPtr<WebIconDatabase> m_iconDatabase;
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ RefPtr<WebPluginSiteDataManager> m_pluginSiteDataManager;
+#endif
+
+ RefPtr<WebsiteDataStore> m_websiteDataStore;
+ RefPtr<StorageManager> m_storageManager;
+
+ typedef HashMap<const char*, RefPtr<WebContextSupplement>, PtrHash<const char*>> WebContextSupplementMap;
+ WebContextSupplementMap m_supplements;
+
+#if USE(SOUP)
+ HTTPCookieAcceptPolicy m_initialHTTPCookieAcceptPolicy;
+#endif
+
+#if PLATFORM(MAC)
+ RetainPtr<NSObject> m_enhancedAccessibilityObserver;
+ RetainPtr<NSObject> m_automaticTextReplacementNotificationObserver;
+ RetainPtr<NSObject> m_automaticSpellingCorrectionNotificationObserver;
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ RetainPtr<NSObject> m_automaticQuoteSubstitutionNotificationObserver;
+ RetainPtr<NSObject> m_automaticDashSubstitutionNotificationObserver;
+#endif
+#endif
+
+ String m_overrideApplicationCacheDirectory;
+ String m_overrideIconDatabasePath;
+ String m_overrideDiskCacheDirectory;
+ String m_overrideCookieStorageDirectory;
+
+ String m_webSQLDatabaseDirectory;
+ String m_indexedDBDatabaseDirectory;
+ String m_mediaKeysStorageDirectory;
+
+ bool m_shouldUseTestingNetworkSession;
+
+ bool m_processTerminationEnabled;
+
+#if ENABLE(NETWORK_PROCESS)
+ bool m_canHandleHTTPSServerTrustEvaluation;
+ bool m_usesNetworkProcess;
+ RefPtr<NetworkProcessProxy> m_networkProcess;
+#endif
+
+#if ENABLE(DATABASE_PROCESS)
+ RefPtr<DatabaseProcessProxy> m_databaseProcess;
+#endif
+
+ HashMap<uint64_t, RefPtr<DictionaryCallback>> m_dictionaryCallbacks;
+ HashMap<uint64_t, RefPtr<StatisticsRequest>> m_statisticsRequests;
+
+#if USE(SOUP)
+ bool m_ignoreTLSErrors;
+#endif
+
+ bool m_memoryCacheDisabled;
+
+ RefCounter m_userObservablePageCounter;
+ RefCounter m_processSuppressionDisabledForPageCounter;
+
+#if PLATFORM(COCOA)
+ RetainPtr<NSMutableDictionary> m_bundleParameters;
+ ProcessSuppressionDisabledToken m_pluginProcessManagerProcessSuppressionDisabledToken;
+#endif
+};
+
+template<typename T>
+void WebProcessPool::sendToNetworkingProcess(T&& message)
+{
+ switch (m_processModel) {
+ case ProcessModelSharedSecondaryProcess:
+#if ENABLE(NETWORK_PROCESS)
+ if (m_usesNetworkProcess) {
+ if (m_networkProcess && m_networkProcess->canSendMessage())
+ m_networkProcess->send(std::forward<T>(message), 0);
+ return;
+ }
+#endif
+ if (!m_processes.isEmpty() && m_processes[0]->canSendMessage())
+ m_processes[0]->send(std::forward<T>(message), 0);
+ return;
+ case ProcessModelMultipleSecondaryProcesses:
+#if ENABLE(NETWORK_PROCESS)
+ if (m_networkProcess && m_networkProcess->canSendMessage())
+ m_networkProcess->send(std::forward<T>(message), 0);
+ return;
+#else
+ break;
+#endif
+ }
+ ASSERT_NOT_REACHED();
+}
+
+template<typename T>
+void WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary(T&& message)
+{
+ switch (m_processModel) {
+ case ProcessModelSharedSecondaryProcess:
+#if ENABLE(NETWORK_PROCESS)
+ if (m_usesNetworkProcess) {
+ ensureNetworkProcess();
+ m_networkProcess->send(std::forward<T>(message), 0);
+ return;
+ }
+#endif
+ ensureSharedWebProcess();
+ m_processes[0]->send(std::forward<T>(message), 0);
+ return;
+ case ProcessModelMultipleSecondaryProcesses:
+#if ENABLE(NETWORK_PROCESS)
+ ensureNetworkProcess();
+ m_networkProcess->send(std::forward<T>(message), 0);
+ return;
+#else
+ break;
+#endif
+ }
+ ASSERT_NOT_REACHED();
+}
+
+template<typename T>
+void WebProcessPool::sendToDatabaseProcessRelaunchingIfNecessary(T&& message)
+{
+#if ENABLE(DATABASE_PROCESS)
+ ensureDatabaseProcess();
+ m_databaseProcess->send(std::forward<T>(message), 0);
+#else
+ sendToAllProcessesRelaunchingThemIfNecessary(std::forward<T>(message));
+#endif
+}
+
+template<typename T>
+void WebProcessPool::sendToAllProcesses(const T& message)
+{
+ size_t processCount = m_processes.size();
+ for (size_t i = 0; i < processCount; ++i) {
+ WebProcessProxy* process = m_processes[i].get();
+ if (process->canSendMessage())
+ process->send(T(message), 0);
+ }
+}
+
+template<typename T>
+void WebProcessPool::sendToAllProcessesRelaunchingThemIfNecessary(const T& message)
+{
+ // FIXME (Multi-WebProcess): WebProcessPool doesn't track processes that have exited, so it cannot relaunch these. Perhaps this functionality won't be needed in this mode.
+ if (m_processModel == ProcessModelSharedSecondaryProcess)
+ ensureSharedWebProcess();
+ sendToAllProcesses(message);
+}
+
+template<typename T>
+void WebProcessPool::sendToOneProcess(T&& message)
+{
+ if (m_processModel == ProcessModelSharedSecondaryProcess)
+ ensureSharedWebProcess();
+
+ bool messageSent = false;
+ size_t processCount = m_processes.size();
+ for (size_t i = 0; i < processCount; ++i) {
+ WebProcessProxy* process = m_processes[i].get();
+ if (process->canSendMessage()) {
+ process->send(std::forward<T>(message), 0);
+ messageSent = true;
+ break;
+ }
+ }
+
+ if (!messageSent && m_processModel == ProcessModelMultipleSecondaryProcesses) {
+ warmInitialProcess();
+ RefPtr<WebProcessProxy> process = m_processes.last();
+ if (process->canSendMessage())
+ process->send(std::forward<T>(message), 0);
+ }
+}
+
+} // namespace WebKit
+
+#endif // UIProcessPool_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolmessagesinfromrev177635trunkSourceWebKit2UIProcessWebContextmessagesin"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/WebProcessPool.messages.in (from rev 177635, trunk/Source/WebKit2/UIProcess/WebContext.messages.in) (0 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.messages.in         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.messages.in        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -0,0 +1,64 @@
</span><ins>+# Copyright (C) 2010 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+messages -> WebProcessPool LegacyReceiver {
+
+ DidGetStatistics(struct WebKit::StatisticsData statisticsData, uint64_t callbackID)
+
+#if PLATFORM(IOS)
+ WriteWebContentToPasteboard(struct WebCore::PasteboardWebContent content)
+ WriteImageToPasteboard(struct WebCore::PasteboardImage pasteboardImage)
+ WriteStringToPasteboard(String pasteboardType, String text)
+ ReadStringFromPasteboard(uint64_t index, String pasteboardType) -> (String string)
+ ReadURLFromPasteboard(uint64_t index, String pasteboardType) -> (String string)
+ ReadBufferFromPasteboard(uint64_t index, String pasteboardType) -> (WebKit::SharedMemory::Handle handle, uint64_t size)
+ GetPasteboardItemsCount() -> (uint64_t itemsCount)
+#endif
+
+#if PLATFORM(COCOA)
+ # Pasteboard messages.
+ GetPasteboardTypes(String pasteboardName) -> (Vector<String> types)
+ GetPasteboardPathnamesForType(String pasteboardName, String pasteboardType) -> (Vector<String> pathnames)
+ GetPasteboardStringForType(String pasteboardName, String pasteboardType) -> (String string)
+ GetPasteboardBufferForType(String pasteboardName, String pasteboardType) -> (WebKit::SharedMemory::Handle handle, uint64_t size)
+ PasteboardCopy(String fromPasteboard, String toPasteboard) -> (uint64_t changeCount)
+ GetPasteboardChangeCount(String pasteboardName) -> (uint64_t changeCount)
+ GetPasteboardUniqueName() -> (String pasteboardName)
+ GetPasteboardColor(String pasteboardName) -> (WebCore::Color color)
+ GetPasteboardURL(String pasteboardName) -> (String urlString)
+ AddPasteboardTypes(String pasteboardName, Vector<String> pasteboardTypes) -> (uint64_t changeCount)
+ SetPasteboardTypes(String pasteboardName, Vector<String> pasteboardTypes) -> (uint64_t changeCount)
+ SetPasteboardPathnamesForType(String pasteboardName, String pasteboardType, Vector<String> pathnames) -> (uint64_t changeCount)
+ SetPasteboardStringForType(String pasteboardName, String pasteboardType, String string) -> (uint64_t changeCount)
+ SetPasteboardBufferForType(String pasteboardName, String pasteboardType, WebKit::SharedMemory::Handle handle, uint64_t size) -> (uint64_t changeCount)
+#endif
+
+#if !PLATFORM(COCOA)
+ // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
+ // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
+ Dummy() -> (bool dummyReturn)
+#endif
+
+ # Plug-in messages.
+ void AddPlugInAutoStartOriginHash(String pageOrigin, uint32_t hash, WebCore::SessionID sessionID)
+ void PlugInDidReceiveUserInteraction(uint32_t hash, WebCore::SessionID sessionID)
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -39,7 +39,6 @@
</span><span class="cx"> #include "UserData.h"
</span><span class="cx"> #include "WebUserContentControllerProxy.h"
</span><span class="cx"> #include "WebBackForwardListItem.h"
</span><del>-#include "WebContext.h"
</del><span class="cx"> #include "WebInspectorProxy.h"
</span><span class="cx"> #include "WebNavigationDataStore.h"
</span><span class="cx"> #include "WebNotificationManagerProxy.h"
</span><span class="lines">@@ -47,6 +46,7 @@
</span><span class="cx"> #include "WebPageProxy.h"
</span><span class="cx"> #include "WebPluginSiteDataManager.h"
</span><span class="cx"> #include "WebProcessMessages.h"
</span><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include "WebProcessProxyMessages.h"
</span><span class="cx"> #include <WebCore/SuddenTermination.h>
</span><span class="cx"> #include <WebCore/URL.h>
</span><span class="lines">@@ -84,16 +84,16 @@
</span><span class="cx"> return pageMap;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Ref<WebProcessProxy> WebProcessProxy::create(WebContext& context)
</del><ins>+Ref<WebProcessProxy> WebProcessProxy::create(WebProcessPool& processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new WebProcessProxy(context));
</del><ins>+ return adoptRef(*new WebProcessProxy(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-WebProcessProxy::WebProcessProxy(WebContext& context)
</del><ins>+WebProcessProxy::WebProcessProxy(WebProcessPool& processPool)
</ins><span class="cx"> : m_responsivenessTimer(this)
</span><del>- , m_context(context)
</del><ins>+ , m_processPool(processPool)
</ins><span class="cx"> , m_mayHaveUniversalFileReadSandboxExtension(false)
</span><del>- , m_customProtocolManagerProxy(this, context)
</del><ins>+ , m_customProtocolManagerProxy(this, processPool)
</ins><span class="cx"> , m_numberOfTimesSuddenTerminationWasDisabled(0)
</span><span class="cx"> , m_throttler(std::make_unique<ProcessThrottler>(this))
</span><span class="cx"> {
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx"> {
</span><span class="cx"> launchOptions.processType = ProcessLauncher::WebProcess;
</span><span class="cx"> #if ENABLE(INSPECTOR)
</span><del>- if (&m_context.get() == &WebInspectorProxy::inspectorContext())
</del><ins>+ if (&m_processPool.get() == &WebInspectorProxy::inspectorProcessPool())
</ins><span class="cx"> launchOptions.extraInitializationData.add(ASCIILiteral("inspector-process"), ASCIILiteral("1"));
</span><span class="cx"> #endif
</span><span class="cx"> platformGetLaunchOptions(launchOptions);
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> for (WebPageProxyMap::iterator it = m_pageMap.begin(), end = m_pageMap.end(); it != end; ++it)
</span><span class="cx"> it->value->connectionWillOpen(connection);
</span><span class="cx">
</span><del>- m_context->processWillOpenConnection(this);
</del><ins>+ m_processPool->processWillOpenConnection(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcessProxy::connectionWillClose(IPC::Connection* connection)
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx"> for (WebPageProxyMap::iterator it = m_pageMap.begin(), end = m_pageMap.end(); it != end; ++it)
</span><span class="cx"> it->value->connectionWillClose(connection);
</span><span class="cx">
</span><del>- m_context->processWillCloseConnection(this);
</del><ins>+ m_processPool->processWillCloseConnection(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcessProxy::disconnect()
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx"> webUserContentControllerProxy->removeProcess(*this);
</span><span class="cx"> m_webUserContentControllerProxies.clear();
</span><span class="cx">
</span><del>- m_context->disconnectProcess(this);
</del><ins>+ m_processPool->disconnectProcess(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebPageProxy* WebProcessProxy::webPage(uint64_t pageID)
</span><span class="lines">@@ -216,7 +216,7 @@
</span><span class="cx">
</span><span class="cx"> // If this was the last WebPage open in that web process, and we have no other reason to keep it alive, let it go.
</span><span class="cx"> // We only allow this when using a network process, as otherwise the WebProcess needs to preserve its session state.
</span><del>- if (!m_context->usesNetworkProcess() || state() == State::Terminated || !canTerminateChildProcess())
</del><ins>+ if (!m_processPool->usesNetworkProcess() || state() == State::Terminated || !canTerminateChildProcess())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> abortProcessLaunchIfNeeded();
</span><span class="lines">@@ -365,15 +365,15 @@
</span><span class="cx"> void WebProcessProxy::getPlugins(bool refresh, Vector<PluginInfo>& plugins, Vector<PluginInfo>& applicationPlugins)
</span><span class="cx"> {
</span><span class="cx"> if (refresh)
</span><del>- m_context->pluginInfoStore().refresh();
</del><ins>+ m_processPool->pluginInfoStore().refresh();
</ins><span class="cx">
</span><del>- Vector<PluginModuleInfo> pluginModules = m_context->pluginInfoStore().plugins();
</del><ins>+ Vector<PluginModuleInfo> pluginModules = m_processPool->pluginInfoStore().plugins();
</ins><span class="cx"> for (size_t i = 0; i < pluginModules.size(); ++i)
</span><span class="cx"> plugins.append(pluginModules[i].info);
</span><span class="cx">
</span><span class="cx"> #if ENABLE(PDFKIT_PLUGIN)
</span><span class="cx"> // Add built-in PDF last, so that it's not used when a real plug-in is installed.
</span><del>- if (!m_context->omitPDFSupport()) {
</del><ins>+ if (!m_processPool->omitPDFSupport()) {
</ins><span class="cx"> plugins.append(PDFPlugin::pluginInfo());
</span><span class="cx"> applicationPlugins.append(PDFPlugin::pluginInfo());
</span><span class="cx"> }
</span><span class="lines">@@ -393,14 +393,14 @@
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><span class="cx"> void WebProcessProxy::getNetworkProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply> reply)
</span><span class="cx"> {
</span><del>- m_context->getNetworkProcessConnection(reply);
</del><ins>+ m_processPool->getNetworkProcessConnection(reply);
</ins><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(NETWORK_PROCESS)
</span><span class="cx">
</span><span class="cx"> #if ENABLE(DATABASE_PROCESS)
</span><span class="cx"> void WebProcessProxy::getDatabaseProcessConnection(PassRefPtr<Messages::WebProcessProxy::GetDatabaseProcessConnection::DelayedReply> reply)
</span><span class="cx"> {
</span><del>- m_context->getDatabaseProcessConnection(reply);
</del><ins>+ m_processPool->getDatabaseProcessConnection(reply);
</ins><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(DATABASE_PROCESS)
</span><span class="cx">
</span><span class="lines">@@ -409,7 +409,7 @@
</span><span class="cx"> if (dispatchMessage(connection, decoder))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (m_context->dispatchMessage(connection, decoder))
</del><ins>+ if (m_processPool->dispatchMessage(connection, decoder))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (decoder.messageReceiverName() == Messages::WebProcessProxy::messageReceiverName()) {
</span><span class="lines">@@ -425,7 +425,7 @@
</span><span class="cx"> if (dispatchSyncMessage(connection, decoder, replyEncoder))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (m_context->dispatchSyncMessage(connection, decoder, replyEncoder))
</del><ins>+ if (m_processPool->dispatchSyncMessage(connection, decoder, replyEncoder))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (decoder.messageReceiverName() == Messages::WebProcessProxy::messageReceiverName()) {
</span><span class="lines">@@ -458,7 +458,7 @@
</span><span class="cx"> {
</span><span class="cx"> WTFLogAlways("Received an invalid message \"%s.%s\" from the web process.\n", messageReceiverName.toString().data(), messageName.toString().data());
</span><span class="cx">
</span><del>- WebContext::didReceiveInvalidMessage(messageReceiverName, messageName);
</del><ins>+ WebProcessPool::didReceiveInvalidMessage(messageReceiverName, messageName);
</ins><span class="cx">
</span><span class="cx"> // Terminate the WebProcess.
</span><span class="cx"> terminate();
</span><span class="lines">@@ -503,7 +503,7 @@
</span><span class="cx">
</span><span class="cx"> m_webConnection = WebConnectionToWebProcess::create(this);
</span><span class="cx">
</span><del>- m_context->processDidFinishLaunching(this);
</del><ins>+ m_processPool->processDidFinishLaunching(this);
</ins><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS) && USE(XPC_SERVICES)
</span><span class="cx"> xpc_connection_t xpcConnection = connection()->xpcConnection();
</span><span class="lines">@@ -568,7 +568,7 @@
</span><span class="cx"> if (m_downloadProxyMap && !m_downloadProxyMap->isEmpty())
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- if (!m_context->shouldTerminate(this))
</del><ins>+ if (!m_processPool->shouldTerminate(this))
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> return true;
</span><span class="lines">@@ -578,7 +578,7 @@
</span><span class="cx"> {
</span><span class="cx"> shouldTerminate = canTerminateChildProcess();
</span><span class="cx"> if (shouldTerminate) {
</span><del>- // We know that the web process is going to terminate so disconnect it from the context.
</del><ins>+ // We know that the web process is going to terminate so disconnect it from the process pool.
</ins><span class="cx"> disconnect();
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -592,18 +592,18 @@
</span><span class="cx"> DownloadProxy* WebProcessProxy::createDownloadProxy(const ResourceRequest& request)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><del>- ASSERT(!m_context->usesNetworkProcess());
</del><ins>+ ASSERT(!m_processPool->usesNetworkProcess());
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> if (!m_downloadProxyMap)
</span><span class="cx"> m_downloadProxyMap = std::make_unique<DownloadProxyMap>(this);
</span><span class="cx">
</span><del>- return m_downloadProxyMap->createDownloadProxy(m_context, request);
</del><ins>+ return m_downloadProxyMap->createDownloadProxy(m_processPool, request);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcessProxy::didSaveToPageCache()
</span><span class="cx"> {
</span><del>- m_context->processDidCachePage(this);
</del><ins>+ m_processPool->processDidCachePage(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcessProxy::releasePageCache()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -58,8 +58,8 @@
</span><span class="cx">
</span><span class="cx"> class DownloadProxyMap;
</span><span class="cx"> class WebBackForwardListItem;
</span><del>-class WebContext;
</del><span class="cx"> class WebPageGroup;
</span><ins>+class WebProcessPool;
</ins><span class="cx"> struct WebNavigationDataStore;
</span><span class="cx">
</span><span class="cx"> class WebProcessProxy : public ChildProcessProxy, ResponsivenessTimer::Client {
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> typedef HashMap<uint64_t, RefPtr<WebFrameProxy>> WebFrameProxyMap;
</span><span class="cx"> typedef HashMap<uint64_t, WebPageProxy*> WebPageProxyMap;
</span><span class="cx">
</span><del>- static Ref<WebProcessProxy> create(WebContext&);
</del><ins>+ static Ref<WebProcessProxy> create(WebProcessPool&);
</ins><span class="cx"> ~WebProcessProxy();
</span><span class="cx">
</span><span class="cx"> static WebProcessProxy* fromConnection(IPC::Connection* connection)
</span><span class="lines">@@ -78,7 +78,7 @@
</span><span class="cx">
</span><span class="cx"> WebConnection* webConnection() const { return m_webConnection.get(); }
</span><span class="cx">
</span><del>- WebContext& context() { return m_context; }
</del><ins>+ WebProcessPool& processPool() { return m_processPool; }
</ins><span class="cx">
</span><span class="cx"> static WebPageProxy* webPage(uint64_t pageID);
</span><span class="cx"> Ref<WebPageProxy> createWebPage(PageClient&, const WebPageConfiguration&);
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx"> ProcessThrottler& throttler() { return *m_throttler; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit WebProcessProxy(WebContext&);
</del><ins>+ explicit WebProcessProxy(WebProcessPool&);
</ins><span class="cx">
</span><span class="cx"> // From ChildProcessProxy
</span><span class="cx"> virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) override;
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx"> ResponsivenessTimer m_responsivenessTimer;
</span><span class="cx">
</span><span class="cx"> RefPtr<WebConnectionToWebProcess> m_webConnection;
</span><del>- Ref<WebContext> m_context;
</del><ins>+ Ref<WebProcessPool> m_processPool;
</ins><span class="cx">
</span><span class="cx"> bool m_mayHaveUniversalFileReadSandboxExtension; // True if a read extension for "/" was ever granted - we don't track whether WebProcess still has it.
</span><span class="cx"> HashSet<String> m_localPathsWithAssumedReadAccess;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebResourceCacheManagerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #include "APISecurityOrigin.h"
</span><span class="cx"> #include "ImmutableDictionary.h"
</span><span class="cx"> #include "SecurityOriginData.h"
</span><del>-#include "WebContext.h"
</del><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include "WebResourceCacheManagerMessages.h"
</span><span class="cx"> #include "WebResourceCacheManagerProxyMessages.h"
</span><span class="cx">
</span><span class="lines">@@ -46,15 +46,15 @@
</span><span class="cx"> return "WebResourceCacheManagerProxy";
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<WebResourceCacheManagerProxy> WebResourceCacheManagerProxy::create(WebContext* webContext)
</del><ins>+PassRefPtr<WebResourceCacheManagerProxy> WebResourceCacheManagerProxy::create(WebProcessPool* processPool)
</ins><span class="cx"> {
</span><del>- return adoptRef(new WebResourceCacheManagerProxy(webContext));
</del><ins>+ return adoptRef(new WebResourceCacheManagerProxy(processPool));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-WebResourceCacheManagerProxy::WebResourceCacheManagerProxy(WebContext* webContext)
- : WebContextSupplement(webContext)
</del><ins>+WebResourceCacheManagerProxy::WebResourceCacheManagerProxy(WebProcessPool* processPool)
+ : WebContextSupplement(processPool)
</ins><span class="cx"> {
</span><del>- WebContextSupplement::context()->addMessageReceiver(Messages::WebResourceCacheManagerProxy::messageReceiverName(), *this);
</del><ins>+ WebContextSupplement::processPool()->addMessageReceiver(Messages::WebResourceCacheManagerProxy::messageReceiverName(), *this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy()
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><span class="cx">
</span><del>-void WebResourceCacheManagerProxy::contextDestroyed()
</del><ins>+void WebResourceCacheManagerProxy::processPoolDestroyed()
</ins><span class="cx"> {
</span><span class="cx"> invalidateCallbackMap(m_arrayCallbacks, CallbackBase::Error::OwnerWasInvalidated);
</span><span class="cx"> }
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx"> m_arrayCallbacks.set(callbackID, callback.release());
</span><span class="cx">
</span><span class="cx"> // FIXME (Multi-WebProcess): <rdar://problem/12239765> When multi-process is enabled, we need to aggregate the callback data from all processes.
</span><del>- context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebResourceCacheManager::GetCacheOrigins(callbackID));
</del><ins>+ processPool()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebResourceCacheManager::GetCacheOrigins(callbackID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebResourceCacheManagerProxy::didGetCacheOrigins(const Vector<SecurityOriginData>& origins, uint64_t callbackID)
</span><span class="lines">@@ -112,17 +112,17 @@
</span><span class="cx"> securityOrigin.port = origin->securityOrigin().port();
</span><span class="cx">
</span><span class="cx"> // FIXME (Multi-WebProcess): <rdar://problem/12239765> There is no need to relaunch all processes. One process to take care of persistent cache is enough.
</span><del>- context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebResourceCacheManager::ClearCacheForOrigin(securityOrigin, cachesToClear));
</del><ins>+ processPool()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebResourceCacheManager::ClearCacheForOrigin(securityOrigin, cachesToClear));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebResourceCacheManagerProxy::clearCacheForAllOrigins(ResourceCachesToClear cachesToClear)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(NETWORK_PROCESS)
</span><del>- context()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::NetworkProcess::ClearCacheForAllOrigins(cachesToClear));
</del><ins>+ processPool()->sendToNetworkingProcessRelaunchingIfNecessary(Messages::NetworkProcess::ClearCacheForAllOrigins(cachesToClear));
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> // FIXME (Multi-WebProcess): <rdar://problem/12239765> There is no need to relaunch all processes. One process to take care of persistent cache is enough.
</span><del>- context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebResourceCacheManager::ClearCacheForAllOrigins(cachesToClear));
</del><ins>+ processPool()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebResourceCacheManager::ClearCacheForAllOrigins(cachesToClear));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebResourceCacheManagerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebResourceCacheManagerProxy.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> struct SecurityOriginData;
</span><del>-class WebContext;
</del><ins>+class WebProcessPool;
</ins><span class="cx"> class WebProcessProxy;
</span><span class="cx">
</span><span class="cx"> typedef GenericCallback<API::Array*> ArrayCallback;
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> public:
</span><span class="cx"> static const char* supplementName();
</span><span class="cx">
</span><del>- static PassRefPtr<WebResourceCacheManagerProxy> create(WebContext*);
</del><ins>+ static PassRefPtr<WebResourceCacheManagerProxy> create(WebProcessPool*);
</ins><span class="cx"> virtual ~WebResourceCacheManagerProxy();
</span><span class="cx">
</span><span class="cx"> void getCacheOrigins(std::function<void (API::Array*, CallbackBase::Error)>);
</span><span class="lines">@@ -58,10 +58,10 @@
</span><span class="cx"> using API::Object::deref;
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- explicit WebResourceCacheManagerProxy(WebContext*);
</del><ins>+ explicit WebResourceCacheManagerProxy(WebProcessPool*);
</ins><span class="cx">
</span><span class="cx"> // WebContextSupplement
</span><del>- virtual void contextDestroyed() override;
</del><ins>+ virtual void processPoolDestroyed() override;
</ins><span class="cx"> virtual void processDidClose(WebProcessProxy*) override;
</span><span class="cx"> virtual bool shouldTerminate(WebProcessProxy*) const override;
</span><span class="cx"> virtual void refWebContextSupplement() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebsiteDataWebsiteDataStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "WebsiteDataStore.h"
</span><span class="cx">
</span><del>-#include "WebContext.h"
</del><ins>+#include "WebProcessPool.h"
</ins><span class="cx"> #include <wtf/RunLoop.h>
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -145,19 +145,19 @@
</span><span class="cx">
</span><span class="cx"> auto networkProcessAccessType = computeNetworkProcessAccessType(dataTypes, isNonPersistent());
</span><span class="cx"> if (networkProcessAccessType != ProcessAccessType::None) {
</span><del>- HashSet<WebContext*> contexts;
</del><ins>+ HashSet<WebProcessPool*> processPools;
</ins><span class="cx"> for (auto& webPage : m_webPages)
</span><del>- contexts.add(&webPage->process().context());
</del><ins>+ processPools.add(&webPage->process().processPool());
</ins><span class="cx">
</span><del>- for (auto& context : contexts) {
</del><ins>+ for (auto& processPool : processPools) {
</ins><span class="cx"> switch (networkProcessAccessType) {
</span><span class="cx"> case ProcessAccessType::OnlyIfLaunched:
</span><del>- if (!context->networkProcess())
</del><ins>+ if (!processPool->networkProcess())
</ins><span class="cx"> continue;
</span><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case ProcessAccessType::Launch:
</span><del>- context->ensureNetworkProcess();
</del><ins>+ processPool->ensureNetworkProcess();
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case ProcessAccessType::None:
</span><span class="lines">@@ -165,7 +165,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> callbackAggregator->addPendingCallback();
</span><del>- context->networkProcess()->deleteWebsiteData(m_sessionID, dataTypes, modifiedSince, [callbackAggregator] {
</del><ins>+ processPool->networkProcess()->deleteWebsiteData(m_sessionID, dataTypes, modifiedSince, [callbackAggregator] {
</ins><span class="cx"> callbackAggregator->removePendingCallback();
</span><span class="cx"> });
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx">
</span><span class="cx"> bool PageClientImpl::decidePolicyForGeolocationPermissionRequest(WebFrameProxy& frame, API::SecurityOrigin& origin, GeolocationPermissionRequestProxy& request)
</span><span class="cx"> {
</span><del>- [[wrapper(m_webView->_page->process().context()) _geolocationProvider] decidePolicyForGeolocationRequestFromOrigin:origin.securityOrigin() frame:frame request:request view:m_webView];
</del><ins>+ [[wrapper(m_webView->_page->process().processPool()) _geolocationProvider] decidePolicyForGeolocationRequestFromOrigin:origin.securityOrigin() frame:frame request:request view:m_webView];
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -41,9 +41,9 @@
</span><span class="cx"> class DrawingAreaProxy;
</span><span class="cx"> class GeolocationPermissionRequestProxy;
</span><span class="cx"> class RemoteLayerTreeTransaction;
</span><del>-class WebContext;
</del><span class="cx"> class WebFrameProxy;
</span><span class="cx"> class WebPageProxy;
</span><ins>+class WebProcessPool;
</ins><span class="cx"> struct WebPageConfiguration;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> @property (nonatomic, getter=isShowingInspectorIndication) BOOL showingInspectorIndication;
</span><span class="cx"> @property (nonatomic, readonly) BOOL isBackground;
</span><span class="cx">
</span><del>-- (instancetype)initWithFrame:(CGRect)frame context:(WebKit::WebContext&)context configuration:(WebKit::WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView;
</del><ins>+- (instancetype)initWithFrame:(CGRect)frame processPool:(WebProcessPool&)processPool configuration:(WebKit::WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView;
</ins><span class="cx">
</span><span class="cx"> - (void)didUpdateVisibleRect:(CGRect)visibleRect unobscuredRect:(CGRect)unobscuredRect
</span><span class="cx"> unobscuredRectInScrollViewCoordinates:(CGRect)unobscuredRectInScrollViewCoordinates
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -39,11 +39,11 @@
</span><span class="cx"> #import "WKProcessGroupPrivate.h"
</span><span class="cx"> #import "WKWebViewConfiguration.h"
</span><span class="cx"> #import "WKWebViewInternal.h"
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebFrameProxy.h"
</span><span class="cx"> #import "WebKit2Initialize.h"
</span><span class="cx"> #import "WebKitSystemInterfaceIOS.h"
</span><span class="cx"> #import "WebPageGroup.h"
</span><ins>+#import "WebProcessPool.h"
</ins><span class="cx"> #import "WebSystemInterface.h"
</span><span class="cx"> #import <CoreGraphics/CoreGraphics.h>
</span><span class="cx"> #import <UIKit/UIWindow_Private.h>
</span><span class="lines">@@ -182,7 +182,7 @@
</span><span class="cx"> RetainPtr<NSUndoManager> _undoManager;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (instancetype)initWithFrame:(CGRect)frame context:(WebKit::WebContext&)context configuration:(WebKit::WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView
</del><ins>+- (instancetype)initWithFrame:(CGRect)frame processPool:(WebKit::WebProcessPool&)processPool configuration:(WebKit::WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView
</ins><span class="cx"> {
</span><span class="cx"> if (!(self = [super initWithFrame:frame]))
</span><span class="cx"> return nil;
</span><span class="lines">@@ -191,7 +191,7 @@
</span><span class="cx">
</span><span class="cx"> _pageClient = std::make_unique<PageClientImpl>(self, webView);
</span><span class="cx">
</span><del>- _page = context.createWebPage(*_pageClient, WTF::move(webPageConfiguration));
</del><ins>+ _page = processPool.createWebPage(*_pageClient, WTF::move(webPageConfiguration));
</ins><span class="cx"> _page->initializeWebPage();
</span><span class="cx"> _page->setIntrinsicDeviceScaleFactor(WKGetScaleFactorForScreen([UIScreen mainScreen]));
</span><span class="cx"> _page->setUseFixedLayout(true);
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx">
</span><span class="cx"> _isBackground = [UIApplication sharedApplication].applicationState == UIApplicationStateBackground;
</span><span class="cx">
</span><del>- WebContext::statistics().wkViewCount++;
</del><ins>+ WebProcessPool::statistics().wkViewCount++;
</ins><span class="cx">
</span><span class="cx"> _rootContentView = adoptNS([[UIView alloc] init]);
</span><span class="cx"> [_rootContentView layer].masksToBounds = NO;
</span><span class="lines">@@ -238,7 +238,7 @@
</span><span class="cx">
</span><span class="cx"> _page->close();
</span><span class="cx">
</span><del>- WebContext::statistics().wkViewCount--;
</del><ins>+ WebProcessPool::statistics().wkViewCount--;
</ins><span class="cx">
</span><span class="cx"> [super dealloc];
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKGeolocationProviderIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -30,8 +30,8 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> class GeolocationPermissionRequestProxy;
</span><del>-class WebContext;
</del><span class="cx"> class WebFrameProxy;
</span><ins>+class WebProcessPool;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> @class WKWebView;
</span><span class="cx">
</span><span class="cx"> @interface WKGeolocationProviderIOS : NSObject
</span><del>--(id)initWithContext:(WebKit::WebContext*)context;
</del><ins>+-(id)initWithProcessPool:(WebKit::WebProcessPool&)processPool;
</ins><span class="cx"> -(void)decidePolicyForGeolocationRequestFromOrigin:(WebCore::SecurityOrigin&)origin frame:(WebKit::WebFrameProxy&)frame request:(WebKit::GeolocationPermissionRequestProxy&)permissionRequest view:(WKWebView*)view;
</span><span class="cx"> @end
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKGeolocationProviderIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -32,16 +32,16 @@
</span><span class="cx"> #import "GeolocationPermissionRequestProxy.h"
</span><span class="cx"> #import "WKUIDelegatePrivate.h"
</span><span class="cx"> #import "WKWebView.h"
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebGeolocationManagerProxy.h"
</span><del>-#import <WebGeolocationPosition.h>
</del><ins>+#import "WebProcessPool.h"
</ins><span class="cx"> #import <WebCore/GeolocationPosition.h>
</span><span class="cx"> #import <WebCore/URL.h>
</span><ins>+#import <WebGeolocationPosition.h>
</ins><span class="cx"> #import <wtf/Assertions.h>
</span><ins>+#import <wtf/HashSet.h>
</ins><span class="cx"> #import <wtf/PassRefPtr.h>
</span><span class="cx"> #import <wtf/RefPtr.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><del>-#import <wtf/HashSet.h>
</del><span class="cx">
</span><span class="cx"> // FIXME: Remove use of WebKit1 from WebKit2
</span><span class="cx"> #import <WebKit/WebGeolocationCoreLocationProvider.h>
</span><span class="lines">@@ -135,12 +135,12 @@
</span><span class="cx"> return nil;
</span><span class="cx"> }
</span><span class="cx">
</span><del>--(id)initWithContext:(WebContext*)context
</del><ins>+-(id)initWithProcessPool:(WebProcessPool&)processPool
</ins><span class="cx"> {
</span><span class="cx"> self = [super init];
</span><span class="cx"> if (!self)
</span><span class="cx"> return nil;
</span><del>- _geolocationManager = context->supplement<WebGeolocationManagerProxy>();
</del><ins>+ _geolocationManager = processPool.supplement<WebGeolocationManagerProxy>();
</ins><span class="cx"> WKGeolocationProvider providerCallback = {
</span><span class="cx"> kWKGeolocationProviderCurrentVersion,
</span><span class="cx"> self,
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebProcessProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx">
</span><span class="cx"> #import <WebCore/NotImplemented.h>
</span><span class="cx">
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebProcessMessages.h"
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacServicesControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/ServicesController.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/ServicesController.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/mac/ServicesController.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -34,8 +34,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-class WebContext;
-
</del><span class="cx"> class ServicesController {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(ServicesController);
</span><span class="cx"> friend class NeverDestroyed<ServicesController>;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacServicesControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/ServicesController.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/ServicesController.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/mac/ServicesController.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -28,8 +28,8 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(SERVICE_CONTROLS)
</span><span class="cx">
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebProcessMessages.h"
</span><ins>+#import "WebProcessPool.h"
</ins><span class="cx"> #import <WebCore/NSExtensionSPI.h>
</span><span class="cx"> #import <WebCore/NSSharingServicePickerSPI.h>
</span><span class="cx"> #import <WebCore/NSSharingServiceSPI.h>
</span><span class="lines">@@ -105,8 +105,8 @@
</span><span class="cx"> m_hasRichContentServices = hasRichContentServices;
</span><span class="cx">
</span><span class="cx"> if (availableServicesChanged) {
</span><del>- for (auto& context : WebContext::allContexts())
- context->sendToAllProcesses(Messages::WebProcess::SetEnabledServices(m_hasImageServices, m_hasSelectionServices, m_hasRichContentServices));
</del><ins>+ for (auto& processPool : WebProcessPool::allProcessPools())
+ processPool->sendToAllProcesses(Messages::WebProcess::SetEnabledServices(m_hasImageServices, m_hasSelectionServices, m_hasRichContentServices));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> m_hasPendingRefresh = false;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWKActionMenuControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -30,11 +30,11 @@
</span><span class="cx">
</span><span class="cx"> #import "WKNSURLExtras.h"
</span><span class="cx"> #import "WKViewInternal.h"
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebKitSystemInterface.h"
</span><span class="cx"> #import "WebPageMessages.h"
</span><span class="cx"> #import "WebPageProxy.h"
</span><span class="cx"> #import "WebPageProxyMessages.h"
</span><ins>+#import "WebProcessPool.h"
</ins><span class="cx"> #import "WebProcessProxy.h"
</span><span class="cx"> #import <Foundation/Foundation.h>
</span><span class="cx"> #import <ImageIO/ImageIO.h>
</span><span class="lines">@@ -240,7 +240,7 @@
</span><span class="cx"> - (void)_saveVideoToDownloads:(id)sender
</span><span class="cx"> {
</span><span class="cx"> RefPtr<WebHitTestResult> hitTestResult = [self _webHitTestResult];
</span><del>- _page->process().context().download(_page, hitTestResult->absoluteMediaURL());
</del><ins>+ _page->process().processPool().download(_page, hitTestResult->absoluteMediaURL());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #pragma mark Image actions
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx"> - (void)_saveImageToDownloads:(id)sender
</span><span class="cx"> {
</span><span class="cx"> RefPtr<WebHitTestResult> hitTestResult = [self _webHitTestResult];
</span><del>- _page->process().context().download(_page, hitTestResult->absoluteImageURL());
</del><ins>+ _page->process().processPool().download(_page, hitTestResult->absoluteImageURL());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // FIXME: We should try to share this with WebPageProxyMac's similar PDF functions.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWKFullKeyboardAccessWatchermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WKFullKeyboardAccessWatcher.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WKFullKeyboardAccessWatcher.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/mac/WKFullKeyboardAccessWatcher.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">
</span><del>-#import "WebContext.h"
</del><ins>+#import "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> NSString * const KeyboardUIModeDidChangeNotification = @"com.apple.KeyboardUIModeDidChange";
</span><span class="cx"> const CFStringRef AppleKeyboardUIMode = CFSTR("AppleKeyboardUIMode");
</span><span class="lines">@@ -37,11 +37,10 @@
</span><span class="cx">
</span><span class="cx"> @implementation WKFullKeyboardAccessWatcher
</span><span class="cx">
</span><del>-- (void)notifyAllWebContexts
</del><ins>+- (void)notifyAllProcessPools
</ins><span class="cx"> {
</span><del>- const Vector<WebContext*>& contexts = WebContext::allContexts();
- for (size_t i = 0; i < contexts.size(); ++i)
- contexts[i]->fullKeyboardAccessModeChanged(fullKeyboardAccessEnabled);
</del><ins>+ for (auto* processPool : WebProcessPool::allProcessPools())
+ processPool->fullKeyboardAccessModeChanged(fullKeyboardAccessEnabled);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)retrieveKeyboardUIModeFromPreferences:(NSNotification *)notification
</span><span class="lines">@@ -60,7 +59,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (fullKeyboardAccessEnabled != oldValue)
</span><del>- [self notifyAllWebContexts];
</del><ins>+ [self notifyAllProcessPools];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (id)init
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebContextMacmm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -1,623 +0,0 @@
</span><del>-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "WebContext.h"
-
-#import "PluginProcessManager.h"
-#import "SandboxUtilities.h"
-#import "TextChecker.h"
-#import "WKBrowsingContextControllerInternal.h"
-#import "WKBrowsingContextControllerInternal.h"
-#import "WebKitSystemInterface.h"
-#import "WebMemoryPressureHandlerIOS.h"
-#import "WebPageGroup.h"
-#import "WebPreferencesKeys.h"
-#import "WebProcessCreationParameters.h"
-#import "WebProcessMessages.h"
-#import "WindowServerConnection.h"
-#import <WebCore/CFNetworkSPI.h>
-#import <WebCore/Color.h>
-#import <WebCore/FileSystem.h>
-#import <WebCore/NotImplemented.h>
-#import <WebCore/PlatformPasteboard.h>
-#import <WebCore/SharedBuffer.h>
-#import <sys/param.h>
-
-#if ENABLE(NETWORK_PROCESS)
-#import "NetworkProcessCreationParameters.h"
-#import "NetworkProcessProxy.h"
-#endif
-
-#if PLATFORM(IOS)
-#import <WebCore/RuntimeApplicationChecksIOS.h>
-#else
-#import <QuartzCore/CARemoteLayerServer.h>
-#endif
-
-using namespace WebCore;
-
-NSString *WebDatabaseDirectoryDefaultsKey = @"WebDatabaseDirectory";
-NSString *WebKitLocalCacheDefaultsKey = @"WebKitLocalCache";
-NSString *WebStorageDirectoryDefaultsKey = @"WebKitLocalStorageDatabasePathPreferenceKey";
-NSString *WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey = @"WebKitKerningAndLigaturesEnabledByDefault";
-NSString *WebKitJSCJITEnabledDefaultsKey = @"WebKitJSCJITEnabledDefaultsKey";
-NSString *WebKitJSCFTLJITEnabledDefaultsKey = @"WebKitJSCFTLJITEnabledDefaultsKey";
-NSString *WebKitMediaKeysStorageDirectoryDefaultsKey = @"WebKitMediaKeysStorageDirectory";
-
-#if !PLATFORM(IOS)
-static NSString *WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification = @"NSApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification";
-#endif
-
-// FIXME: <rdar://problem/9138817> - After this "backwards compatibility" radar is removed, this code should be removed to only return an empty String.
-NSString *WebIconDatabaseDirectoryDefaultsKey = @"WebIconDatabaseDirectoryDefaultsKey";
-
-#if ENABLE(NETWORK_PROCESS)
-static NSString * const WebKit2HTTPProxyDefaultsKey = @"WebKit2HTTPProxy";
-static NSString * const WebKit2HTTPSProxyDefaultsKey = @"WebKit2HTTPSProxy";
-#endif
-
-namespace WebKit {
-
-NSString *SchemeForCustomProtocolRegisteredNotificationName = @"WebKitSchemeForCustomProtocolRegisteredNotification";
-NSString *SchemeForCustomProtocolUnregisteredNotificationName = @"WebKitSchemeForCustomProtocolUnregisteredNotification";
-
-static void registerUserDefaultsIfNeeded()
-{
- static bool didRegister;
- if (didRegister)
- return;
-
- didRegister = true;
- NSMutableDictionary *registrationDictionary = [NSMutableDictionary dictionary];
-
- [registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitJSCJITEnabledDefaultsKey];
- [registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitJSCFTLJITEnabledDefaultsKey];
-
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
- [registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
-#endif
-
- [[NSUserDefaults standardUserDefaults] registerDefaults:registrationDictionary];
-}
-
-void WebContext::updateProcessSuppressionState()
-{
-#if ENABLE(NETWORK_PROCESS)
- if (m_usesNetworkProcess && m_networkProcess)
- m_networkProcess->setProcessSuppressionEnabled(processSuppressionEnabled());
-#endif
-
-#if ENABLE(NETSCAPE_PLUGIN_API)
- if (!m_processSuppressionDisabledForPageCounter.value())
- m_pluginProcessManagerProcessSuppressionDisabledToken = nullptr;
- else if (!m_pluginProcessManagerProcessSuppressionDisabledToken)
- m_pluginProcessManagerProcessSuppressionDisabledToken = PluginProcessManager::shared().processSuppressionDisabledToken();
-#endif
-}
-
-NSMutableDictionary *WebContext::ensureBundleParameters()
-{
- if (!m_bundleParameters)
- m_bundleParameters = adoptNS([[NSMutableDictionary alloc] init]);
-
- return m_bundleParameters.get();
-}
-
-void WebContext::platformInitialize()
-{
- registerUserDefaultsIfNeeded();
- registerNotificationObservers();
-
-#if PLATFORM(IOS)
- WebKit::WebMemoryPressureHandler::shared();
-#endif
-}
-
-String WebContext::platformDefaultApplicationCacheDirectory() const
-{
- NSString *appName = [[NSBundle mainBundle] bundleIdentifier];
- if (!appName)
- appName = [[NSProcessInfo processInfo] processName];
-#if PLATFORM(IOS)
- // This quirk used to make these apps share application cache storage, but doesn't accomplish that any more.
- // Preserving it avoids the need to migrate data when upgrading.
- if (applicationIsMobileSafari() || applicationIsWebApp())
- appName = @"com.apple.WebAppCache";
-#endif
-
- ASSERT(appName);
-
-#if PLATFORM(IOS)
- NSString *cacheDir = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"];
-#else
- char cacheDirectory[MAXPATHLEN];
- size_t cacheDirectoryLen = confstr(_CS_DARWIN_USER_CACHE_DIR, cacheDirectory, MAXPATHLEN);
- if (!cacheDirectoryLen)
- return String();
-
- NSString *cacheDir = [[NSFileManager defaultManager] stringWithFileSystemRepresentation:cacheDirectory length:cacheDirectoryLen - 1];
-#endif
- NSString* cachePath = [cacheDir stringByAppendingPathComponent:appName];
- return stringByResolvingSymlinksInPath([cachePath stringByStandardizingPath]);
-}
-
-void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
-{
- parameters.presenterApplicationPid = getpid();
-
-#if PLATFORM(MAC)
- parameters.accessibilityEnhancedUserInterfaceEnabled = [[NSApp accessibilityAttributeValue:@"AXEnhancedUserInterface"] boolValue];
-#else
- parameters.accessibilityEnhancedUserInterfaceEnabled = false;
-#endif
-
- NSURLCache *urlCache = [NSURLCache sharedURLCache];
- parameters.nsURLCacheMemoryCapacity = [urlCache memoryCapacity];
- parameters.nsURLCacheDiskCapacity = [urlCache diskCapacity];
-
-#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
- parameters.shouldForceScreenFontSubstitution = [[NSUserDefaults standardUserDefaults] boolForKey:@"NSFontDefaultScreenFontSubstitutionEnabled"];
-#endif
- parameters.shouldEnableKerningAndLigaturesByDefault = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
- parameters.shouldEnableJIT = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJSCJITEnabledDefaultsKey];
- parameters.shouldEnableFTLJIT = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJSCFTLJITEnabledDefaultsKey];
- parameters.shouldEnableMemoryPressureReliefLogging = [[NSUserDefaults standardUserDefaults] boolForKey:@"LogMemoryJetsamDetails"];
-
-#if HAVE(HOSTED_CORE_ANIMATION)
-#if !PLATFORM(IOS)
- parameters.acceleratedCompositingPort = MachSendRight::create([CARemoteLayerServer sharedServer].serverPort);
-#endif
-#endif
-
- // FIXME: This should really be configurable; we shouldn't just blindly allow read access to the UI process bundle.
- parameters.uiProcessBundleResourcePath = [[NSBundle mainBundle] resourcePath];
- SandboxExtension::createHandle(parameters.uiProcessBundleResourcePath, SandboxExtension::ReadOnly, parameters.uiProcessBundleResourcePathExtensionHandle);
-
- parameters.uiProcessBundleIdentifier = String([[NSBundle mainBundle] bundleIdentifier]);
-
-#if ENABLE(NETWORK_PROCESS)
- if (!m_usesNetworkProcess) {
-#endif
- for (const auto& scheme : globalURLSchemesWithCustomProtocolHandlers())
- parameters.urlSchemesRegisteredForCustomProtocols.append(scheme);
-#if ENABLE(NETWORK_PROCESS)
- }
-#endif
-
- if (m_bundleParameters) {
- auto data = adoptNS([[NSMutableData alloc] init]);
- auto keyedArchiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]);
-
- [keyedArchiver setRequiresSecureCoding:YES];
-
- @try {
- [keyedArchiver encodeObject:m_bundleParameters.get() forKey:@"parameters"];
- [keyedArchiver finishEncoding];
- } @catch (NSException *exception) {
- LOG_ERROR("Failed to encode bundle parameters: %@", exception);
- }
-
- parameters.bundleParameterData = API::Data::createWithoutCopying((const unsigned char*)[data bytes], [data length], [] (unsigned char*, const void* data) {
- [(NSData *)data release];
- }, data.leakRef());
- }
-}
-
-#if ENABLE(NETWORK_PROCESS)
-void WebContext::platformInitializeNetworkProcess(NetworkProcessCreationParameters& parameters)
-{
- NSURLCache *urlCache = [NSURLCache sharedURLCache];
- parameters.nsURLCacheMemoryCapacity = [urlCache memoryCapacity];
- parameters.nsURLCacheDiskCapacity = [urlCache diskCapacity];
-
- parameters.parentProcessName = [[NSProcessInfo processInfo] processName];
- parameters.uiProcessBundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
-
- for (const auto& scheme : globalURLSchemesWithCustomProtocolHandlers())
- parameters.urlSchemesRegisteredForCustomProtocols.append(scheme);
-
- parameters.httpProxy = [[NSUserDefaults standardUserDefaults] stringForKey:WebKit2HTTPProxyDefaultsKey];
- parameters.httpsProxy = [[NSUserDefaults standardUserDefaults] stringForKey:WebKit2HTTPSProxyDefaultsKey];
-}
-#endif
-
-void WebContext::platformInvalidateContext()
-{
- unregisterNotificationObservers();
-}
-
-String WebContext::platformDefaultDiskCacheDirectory() const
-{
- RetainPtr<NSString> cachePath = adoptNS((NSString *)WKCopyFoundationCacheDirectory());
- if (!cachePath)
- cachePath = @"~/Library/Caches/com.apple.WebKit.WebProcess";
- return stringByResolvingSymlinksInPath([cachePath stringByStandardizingPath]);
-}
-
-String WebContext::platformDefaultCookieStorageDirectory() const
-{
-#if PLATFORM(IOS)
- String path = pathForProcessContainer();
- if (path.isEmpty())
- path = NSHomeDirectory();
-
- path = path + "/Library/Cookies";
- path = stringByResolvingSymlinksInPath(path);
- return path;
-#else
- notImplemented();
- return [@"" stringByStandardizingPath];
-#endif
-}
-
-#if PLATFORM(IOS)
-String WebContext::openGLCacheDirectory() const
-{
- String path = pathForProcessContainer();
- if (path.isEmpty())
- path = NSHomeDirectory();
-
- path = path + "/Library/Caches/com.apple.WebKit.WebContent/com.apple.opengl/";
- return stringByResolvingSymlinksInPath(path);
-}
-
-String WebContext::parentBundleDirectory() const
-{
- return [[[NSBundle mainBundle] bundlePath] stringByStandardizingPath];
-}
-
-String WebContext::networkingHSTSDatabasePath() const
-{
- String path = pathForProcessContainer();
- if (path.isEmpty())
- path = NSHomeDirectory();
-
- path = path + "/Library/Caches/com.apple.WebKit.Networking/";
- path = stringByResolvingSymlinksInPath(path);
-
- NSError *error = nil;
- NSString* nsPath = path;
- if (![[NSFileManager defaultManager] createDirectoryAtPath:nsPath withIntermediateDirectories:YES attributes:nil error:&error]) {
- NSLog(@"could not create \"%@\", error %@", nsPath, error);
- return String();
- }
-
- return path + "/HSTS.plist";
-}
-
-String WebContext::webContentHSTSDatabasePath() const
-{
- String path = pathForProcessContainer();
- if (path.isEmpty())
- path = NSHomeDirectory();
-
- path = path + "/Library/Caches/com.apple.WebKit.WebContent/";
- path = stringByResolvingSymlinksInPath(path);
-
- NSError *error = nil;
- NSString* nsPath = path;
- if (![[NSFileManager defaultManager] createDirectoryAtPath:nsPath withIntermediateDirectories:YES attributes:nil error:&error]) {
- NSLog(@"could not create \"%@\", error %@", nsPath, error);
- return String();
- }
-
- return path + "/HSTS.plist";
-}
-
-String WebContext::containerTemporaryDirectory() const
-{
- String path = NSTemporaryDirectory();
- return stringByResolvingSymlinksInPath(path);
-}
-#endif
-
-String WebContext::platformDefaultWebSQLDatabaseDirectory()
-{
- NSString *databasesDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebDatabaseDirectoryDefaultsKey];
- if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString class]])
- databasesDirectory = @"~/Library/WebKit/Databases";
- return stringByResolvingSymlinksInPath([databasesDirectory stringByStandardizingPath]);
-}
-
-String WebContext::platformDefaultIndexedDBDatabaseDirectory()
-{
- // Indexed databases exist in a subdirectory of the "database directory path."
- // Currently, the top level of that directory contains entities related to WebSQL databases.
- // We should fix this, and move WebSQL into a subdirectory (https://bugs.webkit.org/show_bug.cgi?id=124807)
- // In the meantime, an entity name prefixed with three underscores will not conflict with any WebSQL entities.
- return pathByAppendingComponent(platformDefaultWebSQLDatabaseDirectory(), "___IndexedDB");
-}
-
-String WebContext::platformDefaultIconDatabasePath() const
-{
- // FIXME: <rdar://problem/9138817> - After this "backwards compatibility" radar is removed, this code should be removed to only return an empty String.
- NSString *databasesDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebIconDatabaseDirectoryDefaultsKey];
- if (!databasesDirectory || ![databasesDirectory isKindOfClass:[NSString class]])
- databasesDirectory = @"~/Library/Icons/WebpageIcons.db";
- return stringByResolvingSymlinksInPath([databasesDirectory stringByStandardizingPath]);
-}
-
-String WebContext::platformDefaultLocalStorageDirectory()
-{
- NSString *localStorageDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebStorageDirectoryDefaultsKey];
- if (!localStorageDirectory || ![localStorageDirectory isKindOfClass:[NSString class]])
- localStorageDirectory = @"~/Library/WebKit/LocalStorage";
- return stringByResolvingSymlinksInPath([localStorageDirectory stringByStandardizingPath]);
-}
-
-String WebContext::platformDefaultMediaKeysStorageDirectory()
-{
- NSString *mediaKeysStorageDirectory = [[NSUserDefaults standardUserDefaults] objectForKey:WebKitMediaKeysStorageDirectoryDefaultsKey];
- if (!mediaKeysStorageDirectory || ![mediaKeysStorageDirectory isKindOfClass:[NSString class]])
- mediaKeysStorageDirectory = @"~/Library/WebKit/MediaKeys";
- return stringByResolvingSymlinksInPath([mediaKeysStorageDirectory stringByStandardizingPath]);
-}
-
-bool WebContext::omitPDFSupport()
-{
- // Since this is a "secret default" we don't bother registering it.
- return [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitOmitPDFSupport"];
-}
-
-void WebContext::getPasteboardTypes(const String& pasteboardName, Vector<String>& pasteboardTypes)
-{
- PlatformPasteboard(pasteboardName).getTypes(pasteboardTypes);
-}
-
-void WebContext::getPasteboardPathnamesForType(const String& pasteboardName, const String& pasteboardType, Vector<String>& pathnames)
-{
- PlatformPasteboard(pasteboardName).getPathnamesForType(pathnames, pasteboardType);
-}
-
-void WebContext::getPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, String& string)
-{
- string = PlatformPasteboard(pasteboardName).stringForType(pasteboardType);
-}
-
-void WebContext::getPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, SharedMemory::Handle& handle, uint64_t& size)
-{
- RefPtr<SharedBuffer> buffer = PlatformPasteboard(pasteboardName).bufferForType(pasteboardType);
- if (!buffer)
- return;
- size = buffer->size();
- RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::create(size);
- if (!sharedMemoryBuffer)
- return;
- memcpy(sharedMemoryBuffer->data(), buffer->data(), size);
- sharedMemoryBuffer->createHandle(handle, SharedMemory::ReadOnly);
-}
-
-void WebContext::pasteboardCopy(const String& fromPasteboard, const String& toPasteboard, uint64_t& newChangeCount)
-{
- newChangeCount = PlatformPasteboard(toPasteboard).copy(fromPasteboard);
-}
-
-void WebContext::getPasteboardChangeCount(const String& pasteboardName, uint64_t& changeCount)
-{
- changeCount = PlatformPasteboard(pasteboardName).changeCount();
-}
-
-void WebContext::getPasteboardUniqueName(String& pasteboardName)
-{
- pasteboardName = PlatformPasteboard::uniqueName();
-}
-
-void WebContext::getPasteboardColor(const String& pasteboardName, WebCore::Color& color)
-{
- color = PlatformPasteboard(pasteboardName).color();
-}
-
-void WebContext::getPasteboardURL(const String& pasteboardName, WTF::String& urlString)
-{
- urlString = PlatformPasteboard(pasteboardName).url().string();
-}
-
-void WebContext::addPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, uint64_t& newChangeCount)
-{
- newChangeCount = PlatformPasteboard(pasteboardName).addTypes(pasteboardTypes);
-}
-
-void WebContext::setPasteboardTypes(const String& pasteboardName, const Vector<String>& pasteboardTypes, uint64_t& newChangeCount)
-{
- newChangeCount = PlatformPasteboard(pasteboardName).setTypes(pasteboardTypes);
-}
-
-void WebContext::setPasteboardPathnamesForType(const String& pasteboardName, const String& pasteboardType, const Vector<String>& pathnames, uint64_t& newChangeCount)
-{
- newChangeCount = PlatformPasteboard(pasteboardName).setPathnamesForType(pathnames, pasteboardType);
-}
-
-void WebContext::setPasteboardStringForType(const String& pasteboardName, const String& pasteboardType, const String& string, uint64_t& newChangeCount)
-{
- newChangeCount = PlatformPasteboard(pasteboardName).setStringForType(string, pasteboardType);
-}
-
-void WebContext::setPasteboardBufferForType(const String& pasteboardName, const String& pasteboardType, const SharedMemory::Handle& handle, uint64_t size, uint64_t& newChangeCount)
-{
- if (handle.isNull()) {
- newChangeCount = PlatformPasteboard(pasteboardName).setBufferForType(0, pasteboardType);
- return;
- }
- RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::create(handle, SharedMemory::ReadOnly);
- RefPtr<SharedBuffer> buffer = SharedBuffer::create(static_cast<unsigned char *>(sharedMemoryBuffer->data()), size);
- newChangeCount = PlatformPasteboard(pasteboardName).setBufferForType(buffer, pasteboardType);
-}
-
-#if PLATFORM(IOS)
-void WebContext::writeWebContentToPasteboard(const WebCore::PasteboardWebContent& content)
-{
- PlatformPasteboard().write(content);
-}
-
-void WebContext::writeImageToPasteboard(const WebCore::PasteboardImage& pasteboardImage)
-{
- PlatformPasteboard().write(pasteboardImage);
-}
-
-void WebContext::writeStringToPasteboard(const String& pasteboardType, const String& text)
-{
- PlatformPasteboard().write(pasteboardType, text);
-}
-
-void WebContext::readStringFromPasteboard(uint64_t index, const String& pasteboardType, WTF::String& value)
-{
- value = PlatformPasteboard().readString(index, pasteboardType);
-}
-
-void WebContext::readURLFromPasteboard(uint64_t index, const String& pasteboardType, String& url)
-{
- url = PlatformPasteboard().readURL(index, pasteboardType);
-}
-
-void WebContext::readBufferFromPasteboard(uint64_t index, const String& pasteboardType, SharedMemory::Handle& handle, uint64_t& size)
-{
- RefPtr<SharedBuffer> buffer = PlatformPasteboard().readBuffer(index, pasteboardType);
- if (!buffer)
- return;
- size = buffer->size();
- RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::create(size);
- if (!sharedMemoryBuffer)
- return;
- memcpy(sharedMemoryBuffer->data(), buffer->data(), size);
- sharedMemoryBuffer->createHandle(handle, SharedMemory::ReadOnly);
-}
-
-void WebContext::getPasteboardItemsCount(uint64_t& itemsCount)
-{
- itemsCount = PlatformPasteboard().count();
-}
-
-#endif
-
-bool WebContext::processSuppressionEnabled() const
-{
- return !m_userObservablePageCounter.value() && !m_processSuppressionDisabledForPageCounter.value();
-}
-
-void WebContext::registerNotificationObservers()
-{
-#if !PLATFORM(IOS)
- // Listen for enhanced accessibility changes and propagate them to the WebProcess.
- m_enhancedAccessibilityObserver = [[NSNotificationCenter defaultCenter] addObserverForName:WebKitApplicationDidChangeAccessibilityEnhancedUserInterfaceNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *note) {
- setEnhancedAccessibility([[[note userInfo] objectForKey:@"AXEnhancedUserInterface"] boolValue]);
- }];
-
- m_automaticTextReplacementNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSSpellCheckerDidChangeAutomaticTextReplacementNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
- TextChecker::didChangeAutomaticTextReplacementEnabled();
- textCheckerStateChanged();
- }];
-
- m_automaticSpellingCorrectionNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSSpellCheckerDidChangeAutomaticSpellingCorrectionNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
- TextChecker::didChangeAutomaticSpellingCorrectionEnabled();
- textCheckerStateChanged();
- }];
-
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
- m_automaticQuoteSubstitutionNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSSpellCheckerDidChangeAutomaticQuoteSubstitutionNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
- TextChecker::didChangeAutomaticQuoteSubstitutionEnabled();
- textCheckerStateChanged();
- }];
-
- m_automaticDashSubstitutionNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:NSSpellCheckerDidChangeAutomaticDashSubstitutionNotification object:nil queue:[NSOperationQueue currentQueue] usingBlock:^(NSNotification *notification) {
- TextChecker::didChangeAutomaticDashSubstitutionEnabled();
- textCheckerStateChanged();
- }];
-#endif
-#endif // !PLATFORM(IOS)
-}
-
-void WebContext::unregisterNotificationObservers()
-{
-#if !PLATFORM(IOS)
- [[NSNotificationCenter defaultCenter] removeObserver:m_enhancedAccessibilityObserver.get()];
- [[NSNotificationCenter defaultCenter] removeObserver:m_automaticTextReplacementNotificationObserver.get()];
- [[NSNotificationCenter defaultCenter] removeObserver:m_automaticSpellingCorrectionNotificationObserver.get()];
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
- [[NSNotificationCenter defaultCenter] removeObserver:m_automaticQuoteSubstitutionNotificationObserver.get()];
- [[NSNotificationCenter defaultCenter] removeObserver:m_automaticDashSubstitutionNotificationObserver.get()];
-#endif
-#endif // !PLATFORM(IOS)
-}
-
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
-static CFURLStorageSessionRef privateBrowsingSession()
-{
- static CFURLStorageSessionRef session;
- static dispatch_once_t once;
- dispatch_once(&once, ^{
- NSString *identifier = [NSString stringWithFormat:@"%@.PrivateBrowsing", [[NSBundle mainBundle] bundleIdentifier]];
-
- session = WKCreatePrivateStorageSession((CFStringRef)identifier);
- });
-
- return session;
-}
-#endif
-
-bool WebContext::isURLKnownHSTSHost(const String& urlString, bool privateBrowsingEnabled) const
-{
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
- RetainPtr<CFURLRef> url = URL(URL(), urlString).createCFURL();
-
- return _CFNetworkIsKnownHSTSHostWithSession(url.get(), privateBrowsingEnabled ? privateBrowsingSession() : nullptr);
-#else
- return false;
-#endif
-}
-
-void WebContext::resetHSTSHosts()
-{
-#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
- _CFNetworkResetHSTSHostsWithSession(nullptr);
- _CFNetworkResetHSTSHostsWithSession(privateBrowsingSession());
-#endif
-}
-
-int networkProcessLatencyQOS()
-{
- static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitNetworkProcessLatencyQOS"];
- return qos;
-}
-
-int networkProcessThroughputQOS()
-{
- static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitNetworkProcessThroughputQOS"];
- return qos;
-}
-
-int webProcessLatencyQOS()
-{
- static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitWebProcessLatencyQOS"];
- return qos;
-}
-
-int webProcessThroughputQOS()
-{
- static int qos = [[NSUserDefaults standardUserDefaults] integerForKey:@"WebKitWebProcessThroughputQOS"];
- return qos;
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebContextMenuProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/mac/WebContextMenuProxyMac.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> #import "ServicesController.h"
</span><span class="cx"> #import "ShareableBitmap.h"
</span><span class="cx"> #import "StringUtilities.h"
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebContextMenuItemData.h"
</span><span class="cx"> #import "WebProcessProxy.h"
</span><span class="cx"> #import "WKView.h"
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebInspectorProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -36,12 +36,12 @@
</span><span class="cx"> #import "WKRetainPtr.h"
</span><span class="cx"> #import "WKURLCF.h"
</span><span class="cx"> #import "WKViewInternal.h"
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebInspectorMessages.h"
</span><span class="cx"> #import "WebInspectorUIMessages.h"
</span><span class="cx"> #import "WebPageGroup.h"
</span><span class="cx"> #import "WebPageProxy.h"
</span><span class="cx"> #import "WebPreferences.h"
</span><ins>+#import "WebProcessPool.h"
</ins><span class="cx"> #import "WebProcessProxy.h"
</span><span class="cx"> #import <QuartzCore/CoreAnimation.h>
</span><span class="cx"> #import <WebCore/InspectorFrontendClientLocal.h>
</span><span class="lines">@@ -480,7 +480,7 @@
</span><span class="cx"> initialRect = [NSWindow contentRectForFrameRect:windowFrame styleMask:windowStyleMask];
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_inspectorView = adoptNS([[WKWebInspectorWKView alloc] initWithFrame:initialRect contextRef:toAPI(&inspectorContext()) pageGroupRef:toAPI(inspectorPageGroup()) relatedToPage:nullptr]);
</del><ins>+ m_inspectorView = adoptNS([[WKWebInspectorWKView alloc] initWithFrame:initialRect contextRef:toAPI(&inspectorProcessPool()) pageGroupRef:toAPI(inspectorPageGroup()) relatedToPage:nullptr]);
</ins><span class="cx"> ASSERT(m_inspectorView);
</span><span class="cx">
</span><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -43,7 +43,6 @@
</span><span class="cx"> #import "StringUtilities.h"
</span><span class="cx"> #import "TextChecker.h"
</span><span class="cx"> #import "WKBrowsingContextControllerInternal.h"
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebPageMessages.h"
</span><span class="cx"> #import "WebProcessProxy.h"
</span><span class="cx"> #import <WebCore/DictationAlternative.h>
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWebProcessProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -28,9 +28,6 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">
</span><del>-#import "WebContext.h"
-#import "WebPageGroup.h"
-#import "WebProcessMessages.h"
</del><span class="cx"> #import "WKFullKeyboardAccessWatcher.h"
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacWindowServerConnectionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/UIProcess/mac/WindowServerConnection.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -26,8 +26,8 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "WindowServerConnection.h"
</span><span class="cx">
</span><del>-#import "WebContext.h"
</del><span class="cx"> #import "WebKitSystemInterface.h"
</span><ins>+#import "WebProcessPool.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="lines">@@ -53,8 +53,8 @@
</span><span class="cx">
</span><span class="cx"> void WindowServerConnection::windowServerConnectionStateChanged()
</span><span class="cx"> {
</span><del>- for (auto* context : WebContext::allContexts())
- context->windowServerConnectionStateChanged();
</del><ins>+ for (auto* processPool : WebProcessPool::allProcessPools())
+ processPool->windowServerConnectionStateChanged();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -160,7 +160,6 @@
</span><span class="cx">                 1A1B0EB518A424950038481A /* WKNavigationResponse.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A1B0EB318A424950038481A /* WKNavigationResponse.mm */; };
</span><span class="cx">                 1A1B0EB618A424950038481A /* WKNavigationResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A1B0EB418A424950038481A /* WKNavigationResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
</span><span class="cx">                 1A1B0EB818A424CD0038481A /* WKNavigationResponseInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A1B0EB718A424CD0038481A /* WKNavigationResponseInternal.h */; };
</span><del>-                1A1C649B11F4174200553C19 /* WebContextMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A1C648611F415B700553C19 /* WebContextMac.mm */; };
</del><span class="cx">                 1A1D8BA11731A36300141DA4 /* LocalStorageDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A1D8B9F1731A36300141DA4 /* LocalStorageDatabase.cpp */; };
</span><span class="cx">                 1A1D8BA21731A36300141DA4 /* LocalStorageDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A1D8BA01731A36300141DA4 /* LocalStorageDatabase.h */; };
</span><span class="cx">                 1A1DC340196346D700FF7059 /* LegacySessionStateCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = 31607F3819627002009B87DA /* LegacySessionStateCoding.h */; };
</span><span class="lines">@@ -462,8 +461,6 @@
</span><span class="cx">                 1AE4987911FF7FAA0048B464 /* JSNPObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE4987711FF7FAA0048B464 /* JSNPObject.cpp */; };
</span><span class="cx">                 1AE49A4911FFA8CE0048B464 /* JSNPMethod.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE49A4711FFA8CE0048B464 /* JSNPMethod.h */; };
</span><span class="cx">                 1AE49A4A11FFA8CE0048B464 /* JSNPMethod.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE49A4811FFA8CE0048B464 /* JSNPMethod.cpp */; };
</span><del>-                1AE52F9119201DA700A1FA37 /* APIContextConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE52F8F19201DA700A1FA37 /* APIContextConfiguration.cpp */; };
-                1AE52F9219201DA700A1FA37 /* APIContextConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE52F9019201DA700A1FA37 /* APIContextConfiguration.h */; };
</del><span class="cx">                 1AE52F971920263300A1FA37 /* WKContextConfigurationRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE52F9319201F6B00A1FA37 /* WKContextConfigurationRef.cpp */; };
</span><span class="cx">                 1AE52F981920267200A1FA37 /* WKContextConfigurationRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AE52F9419201F6B00A1FA37 /* WKContextConfigurationRef.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1AE5B7FB11E7AED200BA6767 /* NetscapePluginMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AE5B7F911E7AED200BA6767 /* NetscapePluginMac.mm */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
</span><span class="lines">@@ -1081,6 +1078,13 @@
</span><span class="cx">                 7CD622771739D863005BD7FF /* PluginSandboxProfile.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CD622751739D863005BD7FF /* PluginSandboxProfile.mm */; };
</span><span class="cx">                 7CD622781739D863005BD7FF /* PluginSandboxProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CD622761739D863005BD7FF /* PluginSandboxProfile.h */; };
</span><span class="cx">                 7CE4D2071A46776100C7F152 /* APILegacyContextHistoryClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE4D2061A46775700C7F152 /* APILegacyContextHistoryClient.h */; };
</span><ins>+                7CE4D2161A49148400C7F152 /* WebProcessPoolCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7CE4D2151A49148400C7F152 /* WebProcessPoolCocoa.mm */; };
+                7CE4D21A1A4914A300C7F152 /* WebProcessPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CE4D2171A4914A300C7F152 /* WebProcessPool.cpp */; };
+                7CE4D21B1A4914A300C7F152 /* WebProcessPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE4D2181A4914A300C7F152 /* WebProcessPool.h */; };
+                7CE4D21F1A4914CA00C7F152 /* APIProcessPoolConfiguration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CE4D21D1A4914CA00C7F152 /* APIProcessPoolConfiguration.cpp */; };
+                7CE4D2201A4914CA00C7F152 /* APIProcessPoolConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE4D21E1A4914CA00C7F152 /* APIProcessPoolConfiguration.h */; };
+                7CE4D2271A4916C200C7F152 /* WebProcessPoolMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CE4D2251A4916C200C7F152 /* WebProcessPoolMessageReceiver.cpp */; };
+                7CE4D2281A4916C200C7F152 /* WebProcessPoolMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CE4D2261A4916C200C7F152 /* WebProcessPoolMessages.h */; };
</ins><span class="cx">                 7CF47FF617275B71008ACB91 /* WKBundlePageBanner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CF47FF417275B71008ACB91 /* WKBundlePageBanner.cpp */; };
</span><span class="cx">                 7CF47FF717275B71008ACB91 /* WKBundlePageBanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CF47FF517275B71008ACB91 /* WKBundlePageBanner.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 7CF47FFB17275C57008ACB91 /* PageBanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CF47FF917275C57008ACB91 /* PageBanner.h */; };
</span><span class="lines">@@ -1446,8 +1450,6 @@
</span><span class="cx">                 BCB0B0DE12305A8C00B1341E /* InjectedBundleUserMessageCoders.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB0B0DD12305A8C00B1341E /* InjectedBundleUserMessageCoders.h */; };
</span><span class="cx">                 BCB0B0E012305AB100B1341E /* UserMessageCoders.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB0B0DF12305AB100B1341E /* UserMessageCoders.h */; };
</span><span class="cx">                 BCB63478116BF10600603215 /* WebKit2_C.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB63477116BF10600603215 /* WebKit2_C.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><del>-                BCB9E2431120DACA00A137E0 /* WebContext.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB9E2411120DACA00A137E0 /* WebContext.h */; };
-                BCB9E2441120DACA00A137E0 /* WebContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB9E2421120DACA00A137E0 /* WebContext.cpp */; };
</del><span class="cx">                 BCB9E24B1120E15C00A137E0 /* WKContext.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB9E2491120E15C00A137E0 /* WKContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 BCB9E24C1120E15C00A137E0 /* WKContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB9E24A1120E15C00A137E0 /* WKContext.cpp */; };
</span><span class="cx">                 BCB9F6A01123A84B00A137E0 /* WebFramePolicyListenerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = BCB9F69E1123A84B00A137E0 /* WebFramePolicyListenerProxy.h */; };
</span><span class="lines">@@ -1531,8 +1533,6 @@
</span><span class="cx">                 BCE81D99131AE02100241910 /* DictionaryPopupInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCE81D97131AE02100241910 /* DictionaryPopupInfo.h */; };
</span><span class="cx">                 BCEE7AD012817988009827DA /* WebProcessProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEE7ACC12817988009827DA /* WebProcessProxyMessageReceiver.cpp */; };
</span><span class="cx">                 BCEE7AD112817988009827DA /* WebProcessProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEE7ACD12817988009827DA /* WebProcessProxyMessages.h */; };
</span><del>-                BCEE7D0D12846F69009827DA /* WebContextMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEE7D0B12846F69009827DA /* WebContextMessageReceiver.cpp */; };
-                BCEE7D0E12846F69009827DA /* WebContextMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEE7D0C12846F69009827DA /* WebContextMessages.h */; };
</del><span class="cx">                 BCEE7DC5128B645D009827DA /* InjectedBundleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEE7DC3128B645D009827DA /* InjectedBundleClient.h */; };
</span><span class="cx">                 BCEE7DC6128B645D009827DA /* InjectedBundleClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEE7DC4128B645D009827DA /* InjectedBundleClient.cpp */; };
</span><span class="cx">                 BCEE966C112FAF57006BCC24 /* Attachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEE966A112FAF57006BCC24 /* Attachment.cpp */; };
</span><span class="lines">@@ -2146,7 +2146,6 @@
</span><span class="cx">                 1A1B0EB318A424950038481A /* WKNavigationResponse.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNavigationResponse.mm; sourceTree = "<group>"; };
</span><span class="cx">                 1A1B0EB418A424950038481A /* WKNavigationResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationResponse.h; sourceTree = "<group>"; };
</span><span class="cx">                 1A1B0EB718A424CD0038481A /* WKNavigationResponseInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNavigationResponseInternal.h; sourceTree = "<group>"; };
</span><del>-                1A1C648611F415B700553C19 /* WebContextMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContextMac.mm; sourceTree = "<group>"; };
</del><span class="cx">                 1A1D2116191D995C0001619F /* rewrite-availability-macros.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; name = "rewrite-availability-macros.sh"; path = "mac/rewrite-availability-macros.sh"; sourceTree = "<group>"; };
</span><span class="cx">                 1A1D2117191D996C0001619F /* MigrateHeadersFromWebKitLegacy.make */ = {isa = PBXFileReference; lastKnownFileType = text; name = MigrateHeadersFromWebKitLegacy.make; path = mac/MigrateHeadersFromWebKitLegacy.make; sourceTree = "<group>"; };
</span><span class="cx">                 1A1D8B9F1731A36300141DA4 /* LocalStorageDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorageDatabase.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -2486,8 +2485,6 @@
</span><span class="cx">                 1AE4987711FF7FAA0048B464 /* JSNPObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNPObject.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 1AE49A4711FFA8CE0048B464 /* JSNPMethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNPMethod.h; sourceTree = "<group>"; };
</span><span class="cx">                 1AE49A4811FFA8CE0048B464 /* JSNPMethod.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNPMethod.cpp; sourceTree = "<group>"; };
</span><del>-                1AE52F8F19201DA700A1FA37 /* APIContextConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIContextConfiguration.cpp; sourceTree = "<group>"; };
-                1AE52F9019201DA700A1FA37 /* APIContextConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIContextConfiguration.h; sourceTree = "<group>"; };
</del><span class="cx">                 1AE52F9319201F6B00A1FA37 /* WKContextConfigurationRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKContextConfigurationRef.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 1AE52F9419201F6B00A1FA37 /* WKContextConfigurationRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextConfigurationRef.h; sourceTree = "<group>"; };
</span><span class="cx">                 1AE5B7F911E7AED200BA6767 /* NetscapePluginMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetscapePluginMac.mm; sourceTree = "<group>"; };
</span><span class="lines">@@ -3176,6 +3173,14 @@
</span><span class="cx">                 7CD622751739D863005BD7FF /* PluginSandboxProfile.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginSandboxProfile.mm; sourceTree = "<group>"; };
</span><span class="cx">                 7CD622761739D863005BD7FF /* PluginSandboxProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginSandboxProfile.h; sourceTree = "<group>"; };
</span><span class="cx">                 7CE4D2061A46775700C7F152 /* APILegacyContextHistoryClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = APILegacyContextHistoryClient.h; sourceTree = "<group>"; };
</span><ins>+                7CE4D2151A49148400C7F152 /* WebProcessPoolCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebProcessPoolCocoa.mm; sourceTree = "<group>"; };
+                7CE4D2171A4914A300C7F152 /* WebProcessPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebProcessPool.cpp; sourceTree = "<group>"; };
+                7CE4D2181A4914A300C7F152 /* WebProcessPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebProcessPool.h; sourceTree = "<group>"; };
+                7CE4D2191A4914A300C7F152 /* WebProcessPool.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebProcessPool.messages.in; sourceTree = "<group>"; };
+                7CE4D21D1A4914CA00C7F152 /* APIProcessPoolConfiguration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIProcessPoolConfiguration.cpp; sourceTree = "<group>"; };
+                7CE4D21E1A4914CA00C7F152 /* APIProcessPoolConfiguration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIProcessPoolConfiguration.h; sourceTree = "<group>"; };
+                7CE4D2251A4916C200C7F152 /* WebProcessPoolMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebProcessPoolMessageReceiver.cpp; sourceTree = "<group>"; };
+                7CE4D2261A4916C200C7F152 /* WebProcessPoolMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebProcessPoolMessages.h; sourceTree = "<group>"; };
</ins><span class="cx">                 7CF47FF417275B71008ACB91 /* WKBundlePageBanner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundlePageBanner.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 7CF47FF517275B71008ACB91 /* WKBundlePageBanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundlePageBanner.h; sourceTree = "<group>"; };
</span><span class="cx">                 7CF47FF917275C57008ACB91 /* PageBanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageBanner.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -3566,8 +3571,6 @@
</span><span class="cx">                 BCB0B0DF12305AB100B1341E /* UserMessageCoders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserMessageCoders.h; sourceTree = "<group>"; };
</span><span class="cx">                 BCB63477116BF10600603215 /* WebKit2_C.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKit2_C.h; sourceTree = "<group>"; };
</span><span class="cx">                 BCB86F4B116AAACD00CE20B7 /* WebKit.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebKit.xcconfig; sourceTree = "<group>"; };
</span><del>-                BCB9E2411120DACA00A137E0 /* WebContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContext.h; sourceTree = "<group>"; };
-                BCB9E2421120DACA00A137E0 /* WebContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebContext.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 BCB9E2491120E15C00A137E0 /* WKContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContext.h; sourceTree = "<group>"; };
</span><span class="cx">                 BCB9E24A1120E15C00A137E0 /* WKContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKContext.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BCB9F69E1123A84B00A137E0 /* WebFramePolicyListenerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebFramePolicyListenerProxy.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -3656,9 +3659,6 @@
</span><span class="cx">                 BCEE7AB312817095009827DA /* WebProcessProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebProcessProxy.messages.in; sourceTree = "<group>"; };
</span><span class="cx">                 BCEE7ACC12817988009827DA /* WebProcessProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebProcessProxyMessageReceiver.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BCEE7ACD12817988009827DA /* WebProcessProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebProcessProxyMessages.h; sourceTree = "<group>"; };
</span><del>-                BCEE7D0912846AED009827DA /* WebContext.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebContext.messages.in; sourceTree = "<group>"; };
-                BCEE7D0B12846F69009827DA /* WebContextMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebContextMessageReceiver.cpp; sourceTree = "<group>"; };
-                BCEE7D0C12846F69009827DA /* WebContextMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextMessages.h; sourceTree = "<group>"; };
</del><span class="cx">                 BCEE7DC3128B645D009827DA /* InjectedBundleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleClient.h; sourceTree = "<group>"; };
</span><span class="cx">                 BCEE7DC4128B645D009827DA /* InjectedBundleClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleClient.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BCEE966A112FAF57006BCC24 /* Attachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Attachment.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -4696,6 +4696,7 @@
</span><span class="cx">                                 1AFE436418B6C081009C7A48 /* UIDelegate.h */,
</span><span class="cx">                                 1AFE436318B6C081009C7A48 /* UIDelegate.mm */,
</span><span class="cx">                                 1AC0273E196622D600C12B75 /* WebPageProxyCocoa.mm */,
</span><ins>+                                7CE4D2151A49148400C7F152 /* WebProcessPoolCocoa.mm */,
</ins><span class="cx">                                 1AD01BCB1905D54900C9C45F /* WKReloadFrameErrorRecoveryAttempter.h */,
</span><span class="cx">                                 1AD01BCA1905D54900C9C45F /* WKReloadFrameErrorRecoveryAttempter.mm */,
</span><span class="cx">                                 2D7AAFD218C8640600A7ACD4 /* WKWebViewContentProvider.h */,
</span><span class="lines">@@ -5871,10 +5872,10 @@
</span><span class="cx">                                 1A44B95816B73F8C00B7BBD8 /* Storage */,
</span><span class="cx">                                 1AAF089E192681AC00B6390C /* UserContent */,
</span><span class="cx">                                 1A53C2A31A325691004E8C70 /* WebsiteData */,
</span><del>-                                1AE52F8F19201DA700A1FA37 /* APIContextConfiguration.cpp */,
-                                1AE52F9019201DA700A1FA37 /* APIContextConfiguration.h */,
</del><span class="cx">                                 BCF69FA11176D01400471A52 /* APINavigationData.cpp */,
</span><span class="cx">                                 BCF69FA01176D01400471A52 /* APINavigationData.h */,
</span><ins>+                                7CE4D21D1A4914CA00C7F152 /* APIProcessPoolConfiguration.cpp */,
+                                7CE4D21E1A4914CA00C7F152 /* APIProcessPoolConfiguration.h */,
</ins><span class="cx">                                 75A8D2DD187DE87400C39C9E /* APISession.cpp */,
</span><span class="cx">                                 75A8D2DE187DE87400C39C9E /* APISession.h */,
</span><span class="cx">                                 7CD102D91866770600ED429D /* AutoCorrectionCallback.h */,
</span><span class="lines">@@ -5921,9 +5922,6 @@
</span><span class="cx">                                 3F87B9BF158940D80090FF62 /* WebColorPicker.h */,
</span><span class="cx">                                 BC4A62A514744EC6006C681A /* WebConnectionToWebProcess.cpp */,
</span><span class="cx">                                 BC4A62A614744EC6006C681A /* WebConnectionToWebProcess.h */,
</span><del>-                                BCB9E2421120DACA00A137E0 /* WebContext.cpp */,
-                                BCB9E2411120DACA00A137E0 /* WebContext.h */,
-                                BCEE7D0912846AED009827DA /* WebContext.messages.in */,
</del><span class="cx">                                 31A505F71680025500A930EB /* WebContextClient.cpp */,
</span><span class="cx">                                 31A505F81680025500A930EB /* WebContextClient.h */,
</span><span class="cx">                                 BC09B8F6147460F7005F5625 /* WebContextConnectionClient.cpp */,
</span><span class="lines">@@ -5994,6 +5992,9 @@
</span><span class="cx">                                 BC574E611267D080006F0F12 /* WebPopupMenuProxy.h */,
</span><span class="cx">                                 BCD597FE112B57BE00EC8C23 /* WebPreferences.cpp */,
</span><span class="cx">                                 BCD597FD112B57BE00EC8C23 /* WebPreferences.h */,
</span><ins>+                                7CE4D2171A4914A300C7F152 /* WebProcessPool.cpp */,
+                                7CE4D2181A4914A300C7F152 /* WebProcessPool.h */,
+                                7CE4D2191A4914A300C7F152 /* WebProcessPool.messages.in */,
</ins><span class="cx">                                 BC111B0D112F5E4F00337BAB /* WebProcessProxy.cpp */,
</span><span class="cx">                                 BC032DCF10F4389F0058C15A /* WebProcessProxy.h */,
</span><span class="cx">                                 BCEE7AB312817095009827DA /* WebProcessProxy.messages.in */,
</span><span class="lines">@@ -6718,7 +6719,6 @@
</span><span class="cx">                                 2D6CD118189058A500E5A4A0 /* ViewSnapshotStore.mm */,
</span><span class="cx">                                 728E86EF1795188C0087879E /* WebColorPickerMac.h */,
</span><span class="cx">                                 728E86F01795188C0087879E /* WebColorPickerMac.mm */,
</span><del>-                                1A1C648611F415B700553C19 /* WebContextMac.mm */,
</del><span class="cx">                                 51ACBB9E127A8F2C00D203B9 /* WebContextMenuProxyMac.h */,
</span><span class="cx">                                 51ACBB9F127A8F2C00D203B9 /* WebContextMenuProxyMac.mm */,
</span><span class="cx">                                 F6D632BA133D181B00743D77 /* WebCookieManagerProxyMac.mm */,
</span><span class="lines">@@ -6961,8 +6961,6 @@
</span><span class="cx">                                 512E35F7130B642E00ABD19A /* WebApplicationCacheManagerProxyMessages.h */,
</span><span class="cx">                                 1A1FEC1A1627B45600700F6D /* WebConnectionMessageReceiver.cpp */,
</span><span class="cx">                                 1A1FEC1B1627B45700700F6D /* WebConnectionMessages.h */,
</span><del>-                                BCEE7D0B12846F69009827DA /* WebContextMessageReceiver.cpp */,
-                                BCEE7D0C12846F69009827DA /* WebContextMessages.h */,
</del><span class="cx">                                 330934431315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp */,
</span><span class="cx">                                 330934441315B9220097A7BC /* WebCookieManagerMessages.h */,
</span><span class="cx">                                 330934451315B9220097A7BC /* WebCookieManagerProxyMessageReceiver.cpp */,
</span><span class="lines">@@ -7011,6 +7009,8 @@
</span><span class="cx">                                 1A043F6812514D8B00FFBFB5 /* WebProcessConnectionMessages.h */,
</span><span class="cx">                                 BC3066BC125A442100E71278 /* WebProcessMessageReceiver.cpp */,
</span><span class="cx">                                 BC3066BD125A442100E71278 /* WebProcessMessages.h */,
</span><ins>+                                7CE4D2251A4916C200C7F152 /* WebProcessPoolMessageReceiver.cpp */,
+                                7CE4D2261A4916C200C7F152 /* WebProcessPoolMessages.h */,
</ins><span class="cx">                                 BCEE7ACC12817988009827DA /* WebProcessProxyMessageReceiver.cpp */,
</span><span class="cx">                                 BCEE7ACD12817988009827DA /* WebProcessProxyMessages.h */,
</span><span class="cx">                                 33367651130C9ECA006C9DE2 /* WebResourceCacheManagerMessageReceiver.cpp */,
</span><span class="lines">@@ -7242,7 +7242,6 @@
</span><span class="cx">                                 A7D792D81767CCA300881CBE /* ActivityAssertion.h in Headers */,
</span><span class="cx">                                 BC64697011DBE603006455B0 /* APIArray.h in Headers */,
</span><span class="cx">                                 1A3DD206125E5A2F004515E6 /* APIClient.h in Headers */,
</span><del>-                                1AE52F9219201DA700A1FA37 /* APIContextConfiguration.h in Headers */,
</del><span class="cx">                                 51578B831209ECEF00A37C4A /* APIData.h in Headers */,
</span><span class="cx">                                 1F7D36C118DA513F00D9D659 /* APIDownloadClient.h in Headers */,
</span><span class="cx">                                 516A4A5D120A2CCD00C05B7F /* APIError.h in Headers */,
</span><span class="lines">@@ -7282,6 +7281,7 @@
</span><span class="cx">                                 BCEE966D112FAF57006BCC24 /* Attachment.h in Headers */,
</span><span class="cx">                                 E1A31732134CEA6C007C9A4F /* AttributedString.h in Headers */,
</span><span class="cx">                                 512F589712A8838800629530 /* AuthenticationChallengeProxy.h in Headers */,
</span><ins>+                                7CE4D2201A4914CA00C7F152 /* APIProcessPoolConfiguration.h in Headers */,
</ins><span class="cx">                                 512F589912A8838800629530 /* AuthenticationDecisionListener.h in Headers */,
</span><span class="cx">                                 518E8EF916B2091C00E91429 /* AuthenticationManager.h in Headers */,
</span><span class="cx">                                 512F58A312A883AD00629530 /* AuthenticationManagerMessages.h in Headers */,
</span><span class="lines">@@ -7453,6 +7453,7 @@
</span><span class="cx">                                 2D8949F1182044F600E898AA /* PlatformCALayerRemoteTiledBacking.h in Headers */,
</span><span class="cx">                                 BCC43ABB127B95DC00317F16 /* PlatformPopupMenuData.h in Headers */,
</span><span class="cx">                                 BC8780FC1161C2B800CC2768 /* PlatformProcessIdentifier.h in Headers */,
</span><ins>+                                7CE4D21B1A4914A300C7F152 /* WebProcessPool.h in Headers */,
</ins><span class="cx">                                 1A6FB7D311E651E200DB1371 /* Plugin.h in Headers */,
</span><span class="cx">                                 31A67E0D165B2A99006CBA66 /* PlugInAutoStartProvider.h in Headers */,
</span><span class="cx">                                 1A9FBA8D13FF04E600DEED67 /* PluginComplexTextInputState.h in Headers */,
</span><span class="lines">@@ -7580,7 +7581,6 @@
</span><span class="cx">                                 BC4A6292147312BE006C681A /* WebConnectionClient.h in Headers */,
</span><span class="cx">                                 1A1FEC1D1627B45700700F6D /* WebConnectionMessages.h in Headers */,
</span><span class="cx">                                 BC4A62A814744EC7006C681A /* WebConnectionToWebProcess.h in Headers */,
</span><del>-                                BCB9E2431120DACA00A137E0 /* WebContext.h in Headers */,
</del><span class="cx">                                 31A505FA1680025500A930EB /* WebContextClient.h in Headers */,
</span><span class="cx">                                 BC09B8F9147460F7005F5625 /* WebContextConnectionClient.h in Headers */,
</span><span class="cx">                                 BCDE059B11CDA8AE00E41AF1 /* WebContextInjectedBundleClient.h in Headers */,
</span><span class="lines">@@ -7591,7 +7591,6 @@
</span><span class="cx">                                 51ACBB82127A8BAD00D203B9 /* WebContextMenuProxy.h in Headers */,
</span><span class="cx">                                 51ACBBA0127A8F2C00D203B9 /* WebContextMenuProxyMac.h in Headers */,
</span><span class="cx">                                 BCCB75C61203A1CE00222D1B /* WebContextMessageKinds.h in Headers */,
</span><del>-                                BCEE7D0E12846F69009827DA /* WebContextMessages.h in Headers */,
</del><span class="cx">                                 BCF4DE25168FA44800C94AFC /* WebContextSupplement.h in Headers */,
</span><span class="cx">                                 BCB0B0DC12305A2500B1341E /* WebContextUserMessageCoders.h in Headers */,
</span><span class="cx">                                 330934501315B94D0097A7BC /* WebCookieManager.h in Headers */,
</span><span class="lines">@@ -7684,6 +7683,7 @@
</span><span class="cx">                                 BC7B625212A43C9600D174A4 /* WebPageGroupData.h in Headers */,
</span><span class="cx">                                 BC7B621512A4219A00D174A4 /* WebPageGroupProxy.h in Headers */,
</span><span class="cx">                                 29D55DF2161BF9F10031A2E3 /* WebPageGroupProxyMessages.h in Headers */,
</span><ins>+                                7CE4D2281A4916C200C7F152 /* WebProcessPoolMessages.h in Headers */,
</ins><span class="cx">                                 C0CE72A11247E71D00BC0EC4 /* WebPageMessages.h in Headers */,
</span><span class="cx">                                 2D5C9D0619C81D8F00B3C5C1 /* WebPageOverlay.h in Headers */,
</span><span class="cx">                                 BC032DD110F4389F0058C15A /* WebPageProxy.h in Headers */,
</span><span class="lines">@@ -8935,7 +8935,6 @@
</span><span class="cx">                                 2D353B1219F8305D000EEACD /* ActionMenuHitTestResult.mm in Sources */,
</span><span class="cx">                                 A7D792D61767CB6E00881CBE /* ActivityAssertion.cpp in Sources */,
</span><span class="cx">                                 BC64696F11DBE603006455B0 /* APIArray.cpp in Sources */,
</span><del>-                                1AE52F9119201DA700A1FA37 /* APIContextConfiguration.cpp in Sources */,
</del><span class="cx">                                 1AAB037C185F99D800EDF501 /* APIData.cpp in Sources */,
</span><span class="cx">                                 1A1EF1991A1D5B420023200A /* APIDataCocoa.mm in Sources */,
</span><span class="cx">                                 BC575613126E0138006F0F12 /* APIError.cpp in Sources */,
</span><span class="lines">@@ -9076,6 +9075,7 @@
</span><span class="cx">                                 1A232902162C867300D82F7A /* MessageDecoder.cpp in Sources */,
</span><span class="cx">                                 1A2328FE162C866A00D82F7A /* MessageEncoder.cpp in Sources */,
</span><span class="cx">                                 1A3EED0E161A535400AEB4F5 /* MessageReceiverMap.cpp in Sources */,
</span><ins>+                                7CE4D2271A4916C200C7F152 /* WebProcessPoolMessageReceiver.cpp in Sources */,
</ins><span class="cx">                                 1AAB0379185A7C6A00EDF501 /* MessageSender.cpp in Sources */,
</span><span class="cx">                                 C0E3AA7B1209E83500A49D01 /* Module.cpp in Sources */,
</span><span class="cx">                                 C0E3AA7A1209E83000A49D01 /* ModuleCF.cpp in Sources */,
</span><span class="lines">@@ -9297,11 +9297,11 @@
</span><span class="cx">                                 BC4A62A714744EC7006C681A /* WebConnectionToWebProcess.cpp in Sources */,
</span><span class="cx">                                 BC82836516B354F600A278FE /* WebContentProcessMain.mm in Sources */,
</span><span class="cx">                                 BC82839916B48DC000A278FE /* WebContentServiceEntryPoint.mm in Sources */,
</span><del>-                                BCB9E2441120DACA00A137E0 /* WebContext.cpp in Sources */,
</del><ins>+                                7CE4D21F1A4914CA00C7F152 /* APIProcessPoolConfiguration.cpp in Sources */,
</ins><span class="cx">                                 31A505F91680025500A930EB /* WebContextClient.cpp in Sources */,
</span><span class="cx">                                 BC09B8F8147460F7005F5625 /* WebContextConnectionClient.cpp in Sources */,
</span><span class="cx">                                 BCDE059C11CDA8AE00E41AF1 /* WebContextInjectedBundleClient.cpp in Sources */,
</span><del>-                                1A1C649B11F4174200553C19 /* WebContextMac.mm in Sources */,
</del><ins>+                                7CE4D21A1A4914A300C7F152 /* WebProcessPool.cpp in Sources */,
</ins><span class="cx">                                 51871B5B127CB89D00F76232 /* WebContextMenu.cpp in Sources */,
</span><span class="cx">                                 BC111A5B112F4FBB00337BAB /* WebContextMenuClient.cpp in Sources */,
</span><span class="cx">                                 51021E9C12B16788005C033C /* WebContextMenuClientMac.mm in Sources */,
</span><span class="lines">@@ -9309,7 +9309,6 @@
</span><span class="cx">                                 510FBB9A1288C95E00AFFDF4 /* WebContextMenuItemData.cpp in Sources */,
</span><span class="cx">                                 51A84CE3127F386B00CA6EA4 /* WebContextMenuProxy.cpp in Sources */,
</span><span class="cx">                                 51ACBBA1127A8F2C00D203B9 /* WebContextMenuProxyMac.mm in Sources */,
</span><del>-                                BCEE7D0D12846F69009827DA /* WebContextMessageReceiver.cpp in Sources */,
</del><span class="cx">                                 3309344F1315B94D0097A7BC /* WebCookieManager.cpp in Sources */,
</span><span class="cx">                                 F6A90813133C20510082C3F4 /* WebCookieManagerMac.mm in Sources */,
</span><span class="cx">                                 330934471315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp in Sources */,
</span><span class="lines">@@ -9446,6 +9445,7 @@
</span><span class="cx">                                 BC111B11112F5E4F00337BAB /* WebProcessProxy.cpp in Sources */,
</span><span class="cx">                                 2DA944B01884E9BA00ED86DB /* WebProcessProxyIOS.mm in Sources */,
</span><span class="cx">                                 51D130581382F10500351EDD /* WebProcessProxyMac.mm in Sources */,
</span><ins>+                                7CE4D2161A49148400C7F152 /* WebProcessPoolCocoa.mm in Sources */,
</ins><span class="cx">                                 BCEE7AD012817988009827DA /* WebProcessProxyMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 1A1E093318861D3800D2DC49 /* WebProgressTrackerClient.cpp in Sources */,
</span><span class="cx">                                 512F589C12A8838800629530 /* WebProtectionSpace.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsPDFPDFPluginmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -40,13 +40,13 @@
</span><span class="cx"> #import "PluginView.h"
</span><span class="cx"> #import "WKAccessibilityWebPageObjectMac.h"
</span><span class="cx"> #import "WKPageFindMatchesClient.h"
</span><del>-#import "WebContextMessages.h"
</del><span class="cx"> #import "WebCoreArgumentCoders.h"
</span><span class="cx"> #import "WebEvent.h"
</span><span class="cx"> #import "WebEventConversion.h"
</span><span class="cx"> #import "WebPage.h"
</span><span class="cx"> #import "WebPageProxyMessages.h"
</span><span class="cx"> #import "WebProcess.h"
</span><ins>+#import "WebProcessPoolMessages.h"
</ins><span class="cx"> #import <JavaScriptCore/JSContextRef.h>
</span><span class="cx"> #import <JavaScriptCore/JSObjectRef.h>
</span><span class="cx"> #import <JavaScriptCore/JSStringRef.h>
</span><span class="lines">@@ -1662,8 +1662,8 @@
</span><span class="cx"> pasteboardTypes.append(type);
</span><span class="cx">
</span><span class="cx"> uint64_t newChangeCount;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::SetPasteboardTypes(pasteboardName, pasteboardTypes),
- Messages::WebContext::SetPasteboardTypes::Reply(newChangeCount), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::SetPasteboardTypes(pasteboardName, pasteboardTypes),
+ Messages::WebProcessPool::SetPasteboardTypes::Reply(newChangeCount), 0);
</ins><span class="cx">
</span><span class="cx"> for (NSUInteger i = 0, count = items.count; i < count; ++i) {
</span><span class="cx"> NSString *type = [types objectAtIndex:i];
</span><span class="lines">@@ -1677,8 +1677,8 @@
</span><span class="cx">
</span><span class="cx"> if ([type isEqualToString:NSStringPboardType] || [type isEqualToString:NSPasteboardTypeString]) {
</span><span class="cx"> RetainPtr<NSString> plainTextString = adoptNS([[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]);
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::SetPasteboardStringForType(pasteboardName, type, plainTextString.get()),
- Messages::WebContext::SetPasteboardStringForType::Reply(newChangeCount), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::SetPasteboardStringForType(pasteboardName, type, plainTextString.get()),
+ Messages::WebProcessPool::SetPasteboardStringForType::Reply(newChangeCount), 0);
</ins><span class="cx"> } else {
</span><span class="cx"> RefPtr<SharedBuffer> buffer = SharedBuffer::wrapNSData(data);
</span><span class="cx">
</span><span class="lines">@@ -1689,8 +1689,8 @@
</span><span class="cx"> RefPtr<SharedMemory> sharedMemory = SharedMemory::create(buffer->size());
</span><span class="cx"> memcpy(sharedMemory->data(), buffer->data(), buffer->size());
</span><span class="cx"> sharedMemory->createHandle(handle, SharedMemory::ReadOnly);
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::SetPasteboardBufferForType(pasteboardName, type, handle, buffer->size()),
- Messages::WebContext::SetPasteboardBufferForType::Reply(newChangeCount), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::SetPasteboardBufferForType(pasteboardName, type, handle, buffer->size()),
+ Messages::WebProcessPool::SetPasteboardBufferForType::Reply(newChangeCount), 0);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -38,7 +38,6 @@
</span><span class="cx"> #include "PluginView.h"
</span><span class="cx"> #include "WKBundleAPICast.h"
</span><span class="cx"> #include "WebBackForwardListProxy.h"
</span><del>-#include "WebContextMessages.h"
</del><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><span class="cx"> #include "WebDocumentLoader.h"
</span><span class="cx"> #include "WebErrors.h"
</span><span class="lines">@@ -51,6 +50,7 @@
</span><span class="cx"> #include "WebPage.h"
</span><span class="cx"> #include "WebPageProxyMessages.h"
</span><span class="cx"> #include "WebProcess.h"
</span><ins>+#include "WebProcessPoolMessages.h"
</ins><span class="cx"> #include <JavaScriptCore/APICast.h>
</span><span class="cx"> #include <JavaScriptCore/JSObject.h>
</span><span class="cx"> #include <WebCore/CertificateInfo.h>
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include "NetworkResourceLoadParameters.h"
</span><span class="cx"> #include "PluginInfoStore.h"
</span><span class="cx"> #include "SessionTracker.h"
</span><del>-#include "WebContextMessages.h"
</del><span class="cx"> #include "WebCookieManager.h"
</span><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><span class="cx"> #include "WebErrors.h"
</span><span class="lines">@@ -42,6 +41,7 @@
</span><span class="cx"> #include "WebPage.h"
</span><span class="cx"> #include "WebPasteboardOverrides.h"
</span><span class="cx"> #include "WebProcess.h"
</span><ins>+#include "WebProcessPoolMessages.h"
</ins><span class="cx"> #include "WebProcessProxyMessages.h"
</span><span class="cx"> #include <WebCore/Color.h>
</span><span class="cx"> #include <WebCore/IDBFactoryBackendInterface.h>
</span><span class="lines">@@ -339,8 +339,7 @@
</span><span class="cx"> if (!types.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardTypes(pasteboardName),
- Messages::WebContext::GetPasteboardTypes::Reply(types), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::GetPasteboardTypes(pasteboardName), Messages::WebProcessPool::GetPasteboardTypes::Reply(types), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<WebCore::SharedBuffer> WebPlatformStrategies::bufferForType(const String& pasteboardType, const String& pasteboardName)
</span><span class="lines">@@ -353,8 +352,7 @@
</span><span class="cx"> // Fallback to messaging the UI process for native pasteboard content.
</span><span class="cx"> SharedMemory::Handle handle;
</span><span class="cx"> uint64_t size = 0;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardBufferForType(pasteboardName, pasteboardType),
- Messages::WebContext::GetPasteboardBufferForType::Reply(handle, size), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::GetPasteboardBufferForType(pasteboardName, pasteboardType), Messages::WebProcessPool::GetPasteboardBufferForType::Reply(handle, size), 0);
</ins><span class="cx"> if (handle.isNull())
</span><span class="cx"> return 0;
</span><span class="cx"> RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::create(handle, SharedMemory::ReadOnly);
</span><span class="lines">@@ -363,71 +361,62 @@
</span><span class="cx">
</span><span class="cx"> void WebPlatformStrategies::getPathnamesForType(Vector<String>& pathnames, const String& pasteboardType, const String& pasteboardName)
</span><span class="cx"> {
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardPathnamesForType(pasteboardName, pasteboardType),
- Messages::WebContext::GetPasteboardPathnamesForType::Reply(pathnames), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::GetPasteboardPathnamesForType(pasteboardName, pasteboardType), Messages::WebProcessPool::GetPasteboardPathnamesForType::Reply(pathnames), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String WebPlatformStrategies::stringForType(const String& pasteboardType, const String& pasteboardName)
</span><span class="cx"> {
</span><span class="cx"> String value;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardStringForType(pasteboardName, pasteboardType),
- Messages::WebContext::GetPasteboardStringForType::Reply(value), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::GetPasteboardStringForType(pasteboardName, pasteboardType), Messages::WebProcessPool::GetPasteboardStringForType::Reply(value), 0);
</ins><span class="cx"> return value;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> long WebPlatformStrategies::copy(const String& fromPasteboard, const String& toPasteboard)
</span><span class="cx"> {
</span><span class="cx"> uint64_t newChangeCount;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::PasteboardCopy(fromPasteboard, toPasteboard),
- Messages::WebContext::PasteboardCopy::Reply(newChangeCount), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::PasteboardCopy(fromPasteboard, toPasteboard), Messages::WebProcessPool::PasteboardCopy::Reply(newChangeCount), 0);
</ins><span class="cx"> return newChangeCount;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> long WebPlatformStrategies::changeCount(const WTF::String &pasteboardName)
</span><span class="cx"> {
</span><span class="cx"> uint64_t changeCount;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardChangeCount(pasteboardName),
- Messages::WebContext::GetPasteboardChangeCount::Reply(changeCount), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::GetPasteboardChangeCount(pasteboardName), Messages::WebProcessPool::GetPasteboardChangeCount::Reply(changeCount), 0);
</ins><span class="cx"> return changeCount;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String WebPlatformStrategies::uniqueName()
</span><span class="cx"> {
</span><span class="cx"> String pasteboardName;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardUniqueName(),
- Messages::WebContext::GetPasteboardUniqueName::Reply(pasteboardName), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::GetPasteboardUniqueName(), Messages::WebProcessPool::GetPasteboardUniqueName::Reply(pasteboardName), 0);
</ins><span class="cx"> return pasteboardName;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> Color WebPlatformStrategies::color(const String& pasteboardName)
</span><span class="cx"> {
</span><span class="cx"> Color color;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardColor(pasteboardName),
- Messages::WebContext::GetPasteboardColor::Reply(color), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::GetPasteboardColor(pasteboardName), Messages::WebProcessPool::GetPasteboardColor::Reply(color), 0);
</ins><span class="cx"> return color;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> URL WebPlatformStrategies::url(const String& pasteboardName)
</span><span class="cx"> {
</span><span class="cx"> String urlString;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardURL(pasteboardName),
- Messages::WebContext::GetPasteboardURL::Reply(urlString), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::GetPasteboardURL(pasteboardName), Messages::WebProcessPool::GetPasteboardURL::Reply(urlString), 0);
</ins><span class="cx"> return URL(ParsedURLString, urlString);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> long WebPlatformStrategies::addTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName)
</span><span class="cx"> {
</span><span class="cx"> uint64_t newChangeCount;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::AddPasteboardTypes(pasteboardName, pasteboardTypes),
- Messages::WebContext::AddPasteboardTypes::Reply(newChangeCount), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::AddPasteboardTypes(pasteboardName, pasteboardTypes), Messages::WebProcessPool::AddPasteboardTypes::Reply(newChangeCount), 0);
</ins><span class="cx"> return newChangeCount;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> long WebPlatformStrategies::setTypes(const Vector<String>& pasteboardTypes, const String& pasteboardName)
</span><span class="cx"> {
</span><span class="cx"> uint64_t newChangeCount;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::SetPasteboardTypes(pasteboardName, pasteboardTypes),
- Messages::WebContext::SetPasteboardTypes::Reply(newChangeCount), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::SetPasteboardTypes(pasteboardName, pasteboardTypes), Messages::WebProcessPool::SetPasteboardTypes::Reply(newChangeCount), 0);
</ins><span class="cx"> return newChangeCount;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -444,48 +433,44 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> uint64_t newChangeCount;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::SetPasteboardBufferForType(pasteboardName, pasteboardType, handle, buffer ? buffer->size() : 0),
- Messages::WebContext::SetPasteboardBufferForType::Reply(newChangeCount), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::SetPasteboardBufferForType(pasteboardName, pasteboardType, handle, buffer ? buffer->size() : 0), Messages::WebProcessPool::SetPasteboardBufferForType::Reply(newChangeCount), 0);
</ins><span class="cx"> return newChangeCount;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> long WebPlatformStrategies::setPathnamesForType(const Vector<String>& pathnames, const String& pasteboardType, const String& pasteboardName)
</span><span class="cx"> {
</span><span class="cx"> uint64_t newChangeCount;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::SetPasteboardPathnamesForType(pasteboardName, pasteboardType, pathnames),
- Messages::WebContext::SetPasteboardPathnamesForType::Reply(newChangeCount), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::SetPasteboardPathnamesForType(pasteboardName, pasteboardType, pathnames), Messages::WebProcessPool::SetPasteboardPathnamesForType::Reply(newChangeCount), 0);
</ins><span class="cx"> return newChangeCount;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> long WebPlatformStrategies::setStringForType(const String& string, const String& pasteboardType, const String& pasteboardName)
</span><span class="cx"> {
</span><span class="cx"> uint64_t newChangeCount;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::SetPasteboardStringForType(pasteboardName, pasteboardType, string),
- Messages::WebContext::SetPasteboardStringForType::Reply(newChangeCount), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::SetPasteboardStringForType(pasteboardName, pasteboardType, string), Messages::WebProcessPool::SetPasteboardStringForType::Reply(newChangeCount), 0);
</ins><span class="cx"> return newChangeCount;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> void WebPlatformStrategies::writeToPasteboard(const WebCore::PasteboardWebContent& content)
</span><span class="cx"> {
</span><del>- WebProcess::shared().parentProcessConnection()->send(Messages::WebContext::WriteWebContentToPasteboard(content), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessPool::WriteWebContentToPasteboard(content), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPlatformStrategies::writeToPasteboard(const WebCore::PasteboardImage& image)
</span><span class="cx"> {
</span><del>- WebProcess::shared().parentProcessConnection()->send(Messages::WebContext::WriteImageToPasteboard(image), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessPool::WriteImageToPasteboard(image), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPlatformStrategies::writeToPasteboard(const String& pasteboardType, const String& text)
</span><span class="cx"> {
</span><del>- WebProcess::shared().parentProcessConnection()->send(Messages::WebContext::WriteStringToPasteboard(pasteboardType, text), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->send(Messages::WebProcessPool::WriteStringToPasteboard(pasteboardType, text), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int WebPlatformStrategies::getPasteboardItemsCount()
</span><span class="cx"> {
</span><span class="cx"> uint64_t itemsCount;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardItemsCount(),
- Messages::WebContext::GetPasteboardItemsCount::Reply(itemsCount), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::GetPasteboardItemsCount(), Messages::WebProcessPool::GetPasteboardItemsCount::Reply(itemsCount), 0);
</ins><span class="cx"> return itemsCount;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -493,8 +478,7 @@
</span><span class="cx"> {
</span><span class="cx"> SharedMemory::Handle handle;
</span><span class="cx"> uint64_t size = 0;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::ReadBufferFromPasteboard(index, pasteboardType),
- Messages::WebContext::ReadBufferFromPasteboard::Reply(handle, size), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::ReadBufferFromPasteboard(index, pasteboardType), Messages::WebProcessPool::ReadBufferFromPasteboard::Reply(handle, size), 0);
</ins><span class="cx"> if (handle.isNull())
</span><span class="cx"> return 0;
</span><span class="cx"> RefPtr<SharedMemory> sharedMemoryBuffer = SharedMemory::create(handle, SharedMemory::ReadOnly);
</span><span class="lines">@@ -504,24 +488,21 @@
</span><span class="cx"> WebCore::URL WebPlatformStrategies::readURLFromPasteboard(int index, const String& pasteboardType)
</span><span class="cx"> {
</span><span class="cx"> String urlString;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::ReadURLFromPasteboard(index, pasteboardType),
- Messages::WebContext::ReadURLFromPasteboard::Reply(urlString), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::ReadURLFromPasteboard(index, pasteboardType), Messages::WebProcessPool::ReadURLFromPasteboard::Reply(urlString), 0);
</ins><span class="cx"> return URL(ParsedURLString, urlString);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String WebPlatformStrategies::readStringFromPasteboard(int index, const String& pasteboardType)
</span><span class="cx"> {
</span><span class="cx"> String value;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::ReadStringFromPasteboard(index, pasteboardType),
- Messages::WebContext::ReadStringFromPasteboard::Reply(value), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::ReadStringFromPasteboard(index, pasteboardType), Messages::WebProcessPool::ReadStringFromPasteboard::Reply(value), 0);
</ins><span class="cx"> return value;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> long WebPlatformStrategies::changeCount()
</span><span class="cx"> {
</span><span class="cx"> uint64_t changeCount;
</span><del>- WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebContext::GetPasteboardChangeCount(String()),
- Messages::WebContext::GetPasteboardChangeCount::Reply(changeCount), 0);
</del><ins>+ WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessPool::GetPasteboardChangeCount(String()), Messages::WebProcessPool::GetPasteboardChangeCount::Reply(changeCount), 0);
</ins><span class="cx"> return changeCount;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -63,7 +63,6 @@
</span><span class="cx"> #include "WebColorChooser.h"
</span><span class="cx"> #include "WebContextMenu.h"
</span><span class="cx"> #include "WebContextMenuClient.h"
</span><del>-#include "WebContextMessages.h"
</del><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><span class="cx"> #include "WebDiagnosticLoggingClient.h"
</span><span class="cx"> #include "WebDocumentLoader.h"
</span><span class="lines">@@ -96,6 +95,7 @@
</span><span class="cx"> #include "WebPreferencesKeys.h"
</span><span class="cx"> #include "WebPreferencesStore.h"
</span><span class="cx"> #include "WebProcess.h"
</span><ins>+#include "WebProcessPoolMessages.h"
</ins><span class="cx"> #include "WebProcessProxyMessages.h"
</span><span class="cx"> #include "WebProgressTrackerClient.h"
</span><span class="cx"> #include "WebStorageNamespaceProvider.h"
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -42,7 +42,6 @@
</span><span class="cx"> #include "UserData.h"
</span><span class="cx"> #include "WebApplicationCacheManager.h"
</span><span class="cx"> #include "WebConnectionToUIProcess.h"
</span><del>-#include "WebContextMessages.h"
</del><span class="cx"> #include "WebCookieManager.h"
</span><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><span class="cx"> #include "WebFrame.h"
</span><span class="lines">@@ -59,6 +58,7 @@
</span><span class="cx"> #include "WebPlatformStrategies.h"
</span><span class="cx"> #include "WebProcessCreationParameters.h"
</span><span class="cx"> #include "WebProcessMessages.h"
</span><ins>+#include "WebProcessPoolMessages.h"
</ins><span class="cx"> #include "WebProcessProxyMessages.h"
</span><span class="cx"> #include "WebResourceCacheManager.h"
</span><span class="cx"> #include <JavaScriptCore/JSLock.h>
</span><span class="lines">@@ -799,7 +799,7 @@
</span><span class="cx"> // incorrect for a little while.
</span><span class="cx"> m_plugInAutoStartOriginHashes.add(sessionID, HashMap<unsigned, double>()).iterator->value.set(plugInOriginHash, currentTime() + 30 * 1000);
</span><span class="cx">
</span><del>- parentProcessConnection()->send(Messages::WebContext::AddPlugInAutoStartOriginHash(pageOrigin, plugInOriginHash, sessionID), 0);
</del><ins>+ parentProcessConnection()->send(Messages::WebProcessPool::AddPlugInAutoStartOriginHash(pageOrigin, plugInOriginHash, sessionID), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcess::didAddPlugInAutoStartOriginHash(unsigned plugInOriginHash, double expirationTime, SessionID sessionID)
</span><span class="lines">@@ -847,7 +847,7 @@
</span><span class="cx"> if (it->value - currentTime() > plugInAutoStartExpirationTimeUpdateThreshold)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- parentProcessConnection()->send(Messages::WebContext::PlugInDidReceiveUserInteraction(plugInOriginHash, sessionID), 0);
</del><ins>+ parentProcessConnection()->send(Messages::WebProcessPool::PlugInDidReceiveUserInteraction(plugInOriginHash, sessionID), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void fromCountedSetToHashMap(TypeCountSet* countedSet, HashMap<String, uint64_t>& map)
</span><span class="lines">@@ -939,7 +939,7 @@
</span><span class="cx"> // Get WebCore memory cache statistics
</span><span class="cx"> getWebCoreMemoryCacheStatistics(data.webCoreCacheStatistics);
</span><span class="cx">
</span><del>- parentProcessConnection()->send(Messages::WebContext::DidGetStatistics(data, callbackID), 0);
</del><ins>+ parentProcessConnection()->send(Messages::WebProcessPool::DidGetStatistics(data, callbackID), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebProcess::garbageCollectJavaScriptObjects()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.h (177691 => 177692)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.h        2014-12-23 20:15:48 UTC (rev 177691)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.h        2014-12-23 20:29:26 UTC (rev 177692)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> #include "ViewUpdateDispatcher.h"
</span><span class="cx"> #include "VisitedLinkTable.h"
</span><span class="cx"> #include "WebOriginDataManagerSupplement.h"
</span><del>-#include <WebCore/SessionIDHash.h>
</del><ins>+#include <WebCore/SessionID.h>
</ins><span class="cx"> #include <WebCore/Timer.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/HashMap.h>
</span></span></pre>
</div>
</div>
</body>
</html>