<!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>[208959] trunk/Source/WebKit2</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/208959">208959</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2016-11-21 23:49:55 -0800 (Mon, 21 Nov 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[SOUP] Simplify custom protocols handler implementation
https://bugs.webkit.org/show_bug.cgi?id=164922

Reviewed by Michael Catanzaro.

We are using too many classes for this and also the C API that is not needed, because both GTK+ and EFL have
their own APIs and this is not used by WTR at all.

* PlatformEfl.cmake: Remove files from compilation.
* PlatformGTK.cmake: Ditto.
* Shared/API/c/WKBase.h:
* Shared/API/c/soup/WKBaseSoup.h: Removed.
* UIProcess/API/APICustomProtocolManagerClient.h: Added.
(API::CustomProtocolManagerClient::~CustomProtocolManagerClient):
(API::CustomProtocolManagerClient::startLoading):
(API::CustomProtocolManagerClient::stopLoading):
(API::CustomProtocolManagerClient::invalidate):
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/soup/WKAPICastSoup.h: Removed.
* UIProcess/API/C/soup/WKContextSoup.h: Removed.
* UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp: Removed.
* UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: Removed.
* UIProcess/API/C/soup/WKSoupRequestManager.h: Removed.
* UIProcess/API/efl/ewk_context.cpp: Remove unneeded include.
* UIProcess/API/efl/ewk_url_scheme_request.cpp: Use CustomProtocolManagerProxy instead of WKSoupCustomProtocolRequestManagerRef.
(EwkUrlSchemeRequest::EwkUrlSchemeRequest):
(EwkUrlSchemeRequest::finish):
(EwkUrlSchemeRequest::invalidate):
* UIProcess/API/efl/ewk_url_scheme_request_private.h:
(EwkUrlSchemeRequest::create):
(EwkUrlSchemeRequest::manager):
* UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp: Added.
(attachCustomProtocolManagerClientToContext):
* UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.h.
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Removed.
* UIProcess/API/gtk/WebKitRequestManagerClient.h: Removed.
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Use CustomProtocolManagerProxy instead of WebSoupCustomProtocolRequestManager.
(webkitURISchemeRequestCreate):
(webkitURISchemeRequestCancel):
(webkitURISchemeRequestGetManager):
(webkitURISchemeRequestInvalidate):
(webkitURISchemeRequestReadCallback):
(webkit_uri_scheme_request_finish_error):
* UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed):
(webkitWebContextDispose):
(webkit_web_context_register_uri_scheme):
(webkitWebContextStartLoadingCustomProtocol):
(webkitWebContextInvalidateCustomProtocolRequests):
* UIProcess/API/gtk/WebKitWebContextPrivate.h:
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
* UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
(WebKit::CustomProtocolManagerProxy::processDidClose):
* UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
(WebKit::CustomProtocolManagerProxy::processDidClose): Invalidate the client.
(WebKit::CustomProtocolManagerProxy::startLoading): Notify the client.
(WebKit::CustomProtocolManagerProxy::stopLoading): Ditto.
(WebKit::CustomProtocolManagerProxy::didReceiveResponse): Notify the network process.
(WebKit::CustomProtocolManagerProxy::didLoadData): Ditto.
(WebKit::CustomProtocolManagerProxy::didFailWithError): Ditto.
(WebKit::CustomProtocolManagerProxy::didFinishLoading): Ditto.
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp: Removed.
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h: Removed.
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp: Removed.
* UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h: Removed.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didClose): Notify the CustomProtocolManagerProxy.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool): Initialize the CustomProtocolManagerClient and remove the all supplement.
(WebKit::WebProcessPool::setCustomProtocolManagerClient):
(WebKit::WebProcessPool::registerSchemeForCustomProtocol): In case of soup cache the given protocol.
(WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): In case of soup delete the given protocol from the cache.
* UIProcess/WebProcessPool.h:
* UIProcess/efl/RequestManagerClientEfl.cpp: Do not use the C API, but API::CustomProtocolManagerClient.
(WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
(WebKit::RequestManagerClientEfl::registerURLSchemeHandler):
* UIProcess/efl/RequestManagerClientEfl.h:
* UIProcess/efl/WebProcessPoolEfl.cpp:
* UIProcess/gtk/WebProcessPoolGtk.cpp:
* UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::WebProcessPool::platformInitializeNetworkProcess): Use m_urlSchemesRegisteredForCustomProtocols to
build the list of custom protocols to send to the network process.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformEflcmake">trunk/Source/WebKit2/PlatformEfl.cmake</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIcWKBaseh">trunk/Source/WebKit2/Shared/API/c/WKBase.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKAPICasth">trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIeflewk_contextcpp">trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIeflewk_url_scheme_requestcpp">trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIeflewk_url_scheme_request_privateh">trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request_private.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitPrivateh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitURISchemeRequestcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitURISchemeRequestPrivateh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextPrivateh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.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="#trunkSourceWebKit2UIProcessNetworkCustomProtocolssoupCustomProtocolManagerProxySoupcpp">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkNetworkProcessProxycpp">trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp</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="#trunkSourceWebKit2UIProcesseflRequestManagerClientEflcpp">trunk/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcesseflRequestManagerClientEflh">trunk/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcesseflWebProcessPoolEflcpp">trunk/Source/WebKit2/UIProcess/efl/WebProcessPoolEfl.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebProcessPoolGtkcpp">trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcesssoupWebProcessPoolSoupcpp">trunk/Source/WebKit2/UIProcess/soup/WebProcessPoolSoup.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPICustomProtocolManagerClienth">trunk/Source/WebKit2/UIProcess/API/APICustomProtocolManagerClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitCustomProtocolManagerClientcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitCustomProtocolManagerClienth">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li>trunk/Source/WebKit2/Shared/API/c/soup/</li>
<li><a href="#trunkSourceWebKit2UIProcessAPICsoupWKAPICastSouph">trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICsoupWKContextSouph">trunk/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICsoupWKSoupCustomProtocolRequestManagercpp">trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICsoupWKSoupCustomProtocolRequestManagerh">trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICsoupWKSoupRequestManagerh">trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitRequestManagerClientcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitRequestManagerClienth">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkCustomProtocolssoupWebSoupCustomProtocolRequestManagercpp">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkCustomProtocolssoupWebSoupCustomProtocolRequestManagerh">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkCustomProtocolssoupWebSoupCustomProtocolRequestManagerClientcpp">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessNetworkCustomProtocolssoupWebSoupCustomProtocolRequestManagerClienth">trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/ChangeLog        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -1,3 +1,90 @@
</span><ins>+2016-11-21  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
+
+        [SOUP] Simplify custom protocols handler implementation
+        https://bugs.webkit.org/show_bug.cgi?id=164922
+
+        Reviewed by Michael Catanzaro.
+
+        We are using too many classes for this and also the C API that is not needed, because both GTK+ and EFL have
+        their own APIs and this is not used by WTR at all.
+
+        * PlatformEfl.cmake: Remove files from compilation.
+        * PlatformGTK.cmake: Ditto.
+        * Shared/API/c/WKBase.h:
+        * Shared/API/c/soup/WKBaseSoup.h: Removed.
+        * UIProcess/API/APICustomProtocolManagerClient.h: Added.
+        (API::CustomProtocolManagerClient::~CustomProtocolManagerClient):
+        (API::CustomProtocolManagerClient::startLoading):
+        (API::CustomProtocolManagerClient::stopLoading):
+        (API::CustomProtocolManagerClient::invalidate):
+        * UIProcess/API/C/WKAPICast.h:
+        * UIProcess/API/C/soup/WKAPICastSoup.h: Removed.
+        * UIProcess/API/C/soup/WKContextSoup.h: Removed.
+        * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp: Removed.
+        * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h: Removed.
+        * UIProcess/API/C/soup/WKSoupRequestManager.h: Removed.
+        * UIProcess/API/efl/ewk_context.cpp: Remove unneeded include.
+        * UIProcess/API/efl/ewk_url_scheme_request.cpp: Use CustomProtocolManagerProxy instead of WKSoupCustomProtocolRequestManagerRef.
+        (EwkUrlSchemeRequest::EwkUrlSchemeRequest):
+        (EwkUrlSchemeRequest::finish):
+        (EwkUrlSchemeRequest::invalidate):
+        * UIProcess/API/efl/ewk_url_scheme_request_private.h:
+        (EwkUrlSchemeRequest::create):
+        (EwkUrlSchemeRequest::manager):
+        * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp: Added.
+        (attachCustomProtocolManagerClientToContext):
+        * UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.h.
+        * UIProcess/API/gtk/WebKitPrivate.h:
+        * UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Removed.
+        * UIProcess/API/gtk/WebKitRequestManagerClient.h: Removed.
+        * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Use CustomProtocolManagerProxy instead of WebSoupCustomProtocolRequestManager.
+        (webkitURISchemeRequestCreate):
+        (webkitURISchemeRequestCancel):
+        (webkitURISchemeRequestGetManager):
+        (webkitURISchemeRequestInvalidate):
+        (webkitURISchemeRequestReadCallback):
+        (webkit_uri_scheme_request_finish_error):
+        * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h:
+        * UIProcess/API/gtk/WebKitWebContext.cpp:
+        (webkitWebContextConstructed):
+        (webkitWebContextDispose):
+        (webkit_web_context_register_uri_scheme):
+        (webkitWebContextStartLoadingCustomProtocol):
+        (webkitWebContextInvalidateCustomProtocolRequests):
+        * UIProcess/API/gtk/WebKitWebContextPrivate.h:
+        * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
+        * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
+        (WebKit::CustomProtocolManagerProxy::processDidClose):
+        * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
+        (WebKit::CustomProtocolManagerProxy::processDidClose): Invalidate the client.
+        (WebKit::CustomProtocolManagerProxy::startLoading): Notify the client.
+        (WebKit::CustomProtocolManagerProxy::stopLoading): Ditto.
+        (WebKit::CustomProtocolManagerProxy::didReceiveResponse): Notify the network process.
+        (WebKit::CustomProtocolManagerProxy::didLoadData): Ditto.
+        (WebKit::CustomProtocolManagerProxy::didFailWithError): Ditto.
+        (WebKit::CustomProtocolManagerProxy::didFinishLoading): Ditto.
+        * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp: Removed.
+        * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h: Removed.
+        * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp: Removed.
+        * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h: Removed.
+        * UIProcess/Network/NetworkProcessProxy.cpp:
+        (WebKit::NetworkProcessProxy::didClose): Notify the CustomProtocolManagerProxy.
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::WebProcessPool): Initialize the CustomProtocolManagerClient and remove the all supplement.
+        (WebKit::WebProcessPool::setCustomProtocolManagerClient):
+        (WebKit::WebProcessPool::registerSchemeForCustomProtocol): In case of soup cache the given protocol.
+        (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): In case of soup delete the given protocol from the cache.
+        * UIProcess/WebProcessPool.h:
+        * UIProcess/efl/RequestManagerClientEfl.cpp: Do not use the C API, but API::CustomProtocolManagerClient.
+        (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
+        (WebKit::RequestManagerClientEfl::registerURLSchemeHandler):
+        * UIProcess/efl/RequestManagerClientEfl.h:
+        * UIProcess/efl/WebProcessPoolEfl.cpp:
+        * UIProcess/gtk/WebProcessPoolGtk.cpp:
+        * UIProcess/soup/WebProcessPoolSoup.cpp:
+        (WebKit::WebProcessPool::platformInitializeNetworkProcess): Use m_urlSchemesRegisteredForCustomProtocols to
+        build the list of custom protocols to send to the network process.
+
</ins><span class="cx"> 2016-11-21  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix Sierra CMake build after r208452
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformEfl.cmake (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformEfl.cmake        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/PlatformEfl.cmake        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -76,7 +76,6 @@
</span><span class="cx">     UIProcess/API/C/efl/WKViewEfl.cpp
</span><span class="cx"> 
</span><span class="cx">     UIProcess/API/C/soup/WKCookieManagerSoup.cpp
</span><del>-    UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp
</del><span class="cx"> 
</span><span class="cx">     UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp
</span><span class="cx"> 
</span><span class="lines">@@ -131,8 +130,6 @@
</span><span class="cx">     UIProcess/Launcher/efl/ProcessLauncherEfl.cpp
</span><span class="cx"> 
</span><span class="cx">     UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp
</span><del>-    UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp
-    UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp
</del><span class="cx"> 
</span><span class="cx">     UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
</span><span class="cx">     UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
</span><span class="lines">@@ -256,6 +253,7 @@
</span><span class="cx">     &quot;${WEBKIT2_DIR}/Shared/efl&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/Shared/soup&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/Shared/unix&quot;
</span><ins>+    &quot;${WEBKIT2_DIR}/UIProcess/API&quot;
</ins><span class="cx">     &quot;${WEBKIT2_DIR}/UIProcess/API/C/cairo&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/UIProcess/API/C/CoordinatedGraphics&quot;
</span><span class="cx">     &quot;${WEBKIT2_DIR}/UIProcess/API/C/efl&quot;
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -101,7 +101,6 @@
</span><span class="cx">     UIProcess/API/C/gtk/WKView.cpp
</span><span class="cx"> 
</span><span class="cx">     UIProcess/API/C/soup/WKCookieManagerSoup.cpp
</span><del>-    UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp
</del><span class="cx"> 
</span><span class="cx">     UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp
</span><span class="cx">     UIProcess/API/gtk/PageClientImpl.cpp
</span><span class="lines">@@ -134,6 +133,8 @@
</span><span class="cx">     UIProcess/API/gtk/WebKitCookieManagerPrivate.h
</span><span class="cx">     UIProcess/API/gtk/WebKitCredential.cpp
</span><span class="cx">     UIProcess/API/gtk/WebKitCredential.h
</span><ins>+    UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp
+    UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h
</ins><span class="cx">     UIProcess/API/gtk/WebKitDefines.h
</span><span class="cx">     UIProcess/API/gtk/WebKitDownload.cpp
</span><span class="cx">     UIProcess/API/gtk/WebKitDownload.h
</span><span class="lines">@@ -210,8 +211,6 @@
</span><span class="cx">     UIProcess/API/gtk/WebKitPrintOperationPrivate.h
</span><span class="cx">     UIProcess/API/gtk/WebKitPrivate.cpp
</span><span class="cx">     UIProcess/API/gtk/WebKitPrivate.h
</span><del>-    UIProcess/API/gtk/WebKitRequestManagerClient.cpp
-    UIProcess/API/gtk/WebKitRequestManagerClient.h
</del><span class="cx">     UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp
</span><span class="cx">     UIProcess/API/gtk/WebKitResponsePolicyDecision.h
</span><span class="cx">     UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h
</span><span class="lines">@@ -283,8 +282,6 @@
</span><span class="cx">     UIProcess/linux/MemoryPressureMonitor.cpp
</span><span class="cx"> 
</span><span class="cx">     UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp
</span><del>-    UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp
-    UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp
</del><span class="cx"> 
</span><span class="cx">     UIProcess/Plugins/gtk/PluginInfoCache.cpp
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIcWKBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/c/WKBase.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/c/WKBase.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/Shared/API/c/WKBase.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -34,10 +34,6 @@
</span><span class="cx"> #include &lt;WebKit/WKBaseGtk.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if defined(USE_SOUP)
-#include &lt;WebKit/WKBaseSoup.h&gt;
-#endif
-
</del><span class="cx"> #if defined(BUILDING_EFL__)
</span><span class="cx"> #include &lt;WebKit/WKBaseEfl.h&gt;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPICustomProtocolManagerClienthfromrev208958trunkSourceWebKit2UIProcessAPICsoupWKAPICastSouph"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/APICustomProtocolManagerClient.h (from rev 208958, trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h) (0 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APICustomProtocolManagerClient.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/APICustomProtocolManagerClient.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include &lt;wtf/Forward.h&gt;
+
+namespace WebKit {
+class CustomProtocolManagerProxy;
+}
+
+namespace WebCore {
+class ResourceRequest;
+}
+
+namespace API {
+
+class CustomProtocolManagerClient {
+public:
+    virtual ~CustomProtocolManagerClient() { }
+
+    virtual bool startLoading(WebKit::CustomProtocolManagerProxy&amp;, uint64_t /* customProtocolID */, const WebCore::ResourceRequest&amp;) { return false; }
+    virtual void stopLoading(WebKit::CustomProtocolManagerProxy&amp;, uint64_t /* customProtocolID */) { }
+
+    virtual void invalidate(WebKit::CustomProtocolManagerProxy&amp;) { }
+};
+
+} // namespace API
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKAPICasth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -552,10 +552,6 @@
</span><span class="cx"> #include &quot;WKAPICastGtk.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if USE(SOUP)
-#include &quot;WKAPICastSoup.h&quot;
-#endif
-
</del><span class="cx"> #if defined(BUILDING_EFL__)
</span><span class="cx"> #include &quot;WKAPICastEfl.h&quot;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICsoupWKAPICastSouph"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -1,41 +0,0 @@
</span><del>-/*
- * Portions Copyright (c) 2012 Igalia S.L.
- *
- * 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 WKAPICastSoup_h
-#define WKAPICastSoup_h
-
-#ifndef WKAPICast_h
-#error &quot;Please #include \&quot;WKAPICast.h\&quot; instead of this file directly.&quot;
-#endif
-
-namespace WebKit {
-
-class WebSoupCustomProtocolRequestManager;
-
-WK_ADD_API_MAPPING(WKSoupCustomProtocolRequestManagerRef, WebSoupCustomProtocolRequestManager)
-
-}
-
-#endif // WKAPICastSoup_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICsoupWKContextSouph"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -1,42 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * 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 WKContextSoup_h
-#define WKContextSoup_h
-
-#include &lt;WebKit/WKBase.h&gt;
-#include &lt;WebKit/WKSoupRequestManager.h&gt;
-
-#ifdef __cplusplus
-extern &quot;C&quot; {
-#endif
-
-WK_EXPORT WKSoupRequestManagerRef WKContextGetSoupRequestManager(WKContextRef context);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKContextSoup_h */
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICsoupWKSoupCustomProtocolRequestManagercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -1,42 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * 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 &quot;config.h&quot;
-#include &quot;WKSoupCustomProtocolRequestManager.h&quot;
-
-#include &quot;WKAPICast.h&quot;
-#include &quot;WebSoupCustomProtocolRequestManager.h&quot;
-
-using namespace WebKit;
-
-WKTypeID WKSoupCustomProtocolRequestManagerGetTypeID()
-{
-    return toAPI(WebSoupCustomProtocolRequestManager::APIType);
-}
-
-void WKSoupCustomProtocolRequestManagerSetClient(WKSoupCustomProtocolRequestManagerRef soupRequestManagerRef, const WKSoupCustomProtocolRequestManagerClientBase* wkClient)
-{
-    toImpl(soupRequestManagerRef)-&gt;initializeClient(wkClient);
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICsoupWKSoupCustomProtocolRequestManagerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -1,58 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * 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 WKSoupCustomProtocolRequestManager_h
-#define WKSoupCustomProtocolRequestManager_h
-
-#include &lt;WebKit/WKBase.h&gt;
-
-#ifdef __cplusplus
-extern &quot;C&quot; {
-#endif
-
-typedef void (*WKSoupCustomProtocolRequestManagerStartLoadingCallback)(WKSoupCustomProtocolRequestManagerRef soupManagerRef, uint64_t customProtocolID, WKURLRequestRef requestRef, const void* clientInfo);
-typedef void (*WKSoupCustomProtocolRequestManagerStopLoadingCallback)(WKSoupCustomProtocolRequestManagerRef soupManagerRef, uint64_t customProtocolID, const void* clientInfo);
-
-typedef struct WKSoupCustomProtocolRequestManagerClientBase {
-    int                                                    version;
-    const void*                                            clientInfo;
-} WKSoupCustomProtocolRequestManagerClientBase;
-
-typedef struct WKSoupCustomProtocolRequestManagerClientV0 {
-    WKSoupCustomProtocolRequestManagerClientBase           base;
-
-    WKSoupCustomProtocolRequestManagerStartLoadingCallback startLoading;
-    WKSoupCustomProtocolRequestManagerStopLoadingCallback  stopLoading;
-} WKSoupCustomProtocolRequestManagerClientV0;
-
-WK_EXPORT WKTypeID WKSoupCustomProtocolRequestManagerGetTypeID();
-
-WK_EXPORT void WKSoupCustomProtocolRequestManagerSetClient(WKSoupCustomProtocolRequestManagerRef, const WKSoupCustomProtocolRequestManagerClientBase*);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKSoupCustomProtocolRequestManager_h */
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICsoupWKSoupRequestManagerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -1,61 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * 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 WKSoupRequestManager_h
-#define WKSoupRequestManager_h
-
-#include &lt;WebKit/WKBase.h&gt;
-
-#ifdef __cplusplus
-extern &quot;C&quot; {
-#endif
-
-typedef void (*WKSoupRequestManagerDidReceiveURIRequestCallback)(WKSoupRequestManagerRef soupRequestManagerRef, WKURLRef urlRef, WKPageRef pageRef, uint64_t requestID, const void* clientInfo);
-typedef void (*WKSoupRequestManagerDidFailToLoadURIRequestCallback)(WKSoupRequestManagerRef soupRequestManagerRef, uint64_t requestID, const void* clientInfo);
-
-typedef struct WKSoupRequestManagerClientBase {
-    int                                                 version;
-    const void*                                         clientInfo;
-} WKSoupRequestManagerClientBase;
-
-typedef struct WKSoupRequestManagerClientV0 {
-    WKSoupRequestManagerClientBase                      base;
-
-    WKSoupRequestManagerDidReceiveURIRequestCallback    didReceiveURIRequest;
-    WKSoupRequestManagerDidFailToLoadURIRequestCallback didFailToLoadURIRequest;
-} WKSoupRequestManagerClientV0;
-
-WK_EXPORT WKTypeID WKSoupRequestManagerGetTypeID();
-
-WK_EXPORT void WKSoupRequestManagerSetClient(WKSoupRequestManagerRef, const WKSoupRequestManagerClientBase* client);
-WK_EXPORT void WKSoupRequestManagerRegisterURIScheme(WKSoupRequestManagerRef, WKStringRef schemeRef);
-WK_EXPORT void WKSoupRequestManagerDidHandleURIRequest(WKSoupRequestManagerRef, WKDataRef, uint64_t contentLength, WKStringRef mimeTypeRef, uint64_t requestID);
-WK_EXPORT void WKSoupRequestManagerDidReceiveURIRequestData(WKSoupRequestManagerRef, WKDataRef, uint64_t requestID);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKSoupRequestManager_h */
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIeflewk_contextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #include &quot;RequestManagerClientEfl.h&quot;
</span><span class="cx"> #include &quot;WKAPICast.h&quot;
</span><span class="cx"> #include &quot;WKContextPrivate.h&quot;
</span><del>-#include &quot;WKContextSoup.h&quot;
</del><span class="cx"> #include &quot;WKNumber.h&quot;
</span><span class="cx"> #include &quot;WKString.h&quot;
</span><span class="cx"> #include &quot;WebIconDatabase.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIeflewk_url_scheme_requestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -31,14 +31,13 @@
</span><span class="cx"> #include &quot;WKString.h&quot;
</span><span class="cx"> #include &quot;WKURL.h&quot;
</span><span class="cx"> #include &quot;WebPageProxy.h&quot;
</span><del>-#include &quot;WebSoupCustomProtocolRequestManager.h&quot;
</del><span class="cx"> 
</span><span class="cx"> #include &quot;ewk_url_scheme_request_private.h&quot;
</span><span class="cx"> 
</span><span class="cx"> using namespace WebKit;
</span><span class="cx"> 
</span><del>-EwkUrlSchemeRequest::EwkUrlSchemeRequest(WKSoupCustomProtocolRequestManagerRef manager, API::URLRequest* urlRequest, uint64_t requestID)
-    : m_wkRequestManager(manager)
</del><ins>+EwkUrlSchemeRequest::EwkUrlSchemeRequest(CustomProtocolManagerProxy&amp; manager, API::URLRequest* urlRequest, uint64_t requestID)
+    : m_wkRequestManager(&amp;manager)
</ins><span class="cx">     , m_requestID(requestID)
</span><span class="cx"> {
</span><span class="cx">     WKURLRef url = toCopiedURLAPI(urlRequest-&gt;resourceRequest().url());
</span><span class="lines">@@ -69,6 +68,9 @@
</span><span class="cx"> 
</span><span class="cx"> void EwkUrlSchemeRequest::finish(const void* contentData, uint64_t contentLength, const char* mimeType)
</span><span class="cx"> {
</span><ins>+    if (!m_wkRequestManager)
+        return;
+
</ins><span class="cx">     WKRetainPtr&lt;WKDataRef&gt; wkData(AdoptWK, WKDataCreate(contentLength ? reinterpret_cast&lt;const unsigned char*&gt;(contentData) : 0, contentLength));
</span><span class="cx">     WKRetainPtr&lt;WKStringRef&gt; wkMimeType = mimeType ? adoptWK(WKStringCreateWithUTF8CString(mimeType)) : 0;
</span><span class="cx"> 
</span><span class="lines">@@ -76,12 +78,17 @@
</span><span class="cx">     WebCore::ResourceResponse response(WebCore::URL(WebCore::URL(), String::fromUTF8(m_url)),
</span><span class="cx">         String::fromUTF8(mimeType), contentLength, emptyString());
</span><span class="cx"> 
</span><del>-    toImpl(m_wkRequestManager.get())-&gt;didReceiveResponse(m_requestID, response);
-    toImpl(m_wkRequestManager.get())-&gt;didLoadData(m_requestID, toImpl(wkData.get()));
-    toImpl(m_wkRequestManager.get())-&gt;didFinishLoading(m_requestID);
-    toImpl(m_wkRequestManager.get())-&gt;stopLoading(m_requestID);
</del><ins>+    m_wkRequestManager-&gt;didReceiveResponse(m_requestID, response);
+    m_wkRequestManager-&gt;didLoadData(m_requestID, toImpl(wkData.get())-&gt;dataReference());
+    m_wkRequestManager-&gt;didFinishLoading(m_requestID);
+    m_wkRequestManager-&gt;stopLoading(m_requestID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void EwkUrlSchemeRequest::invalidate()
+{
+    m_wkRequestManager = nullptr;
+}
+
</ins><span class="cx"> const char* ewk_url_scheme_request_scheme_get(const Ewk_Url_Scheme_Request* request)
</span><span class="cx"> {
</span><span class="cx">     EWK_OBJ_GET_IMPL_OR_RETURN(const EwkUrlSchemeRequest, request, impl, nullptr);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIeflewk_url_scheme_request_privateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request_private.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request_private.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request_private.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -26,11 +26,11 @@
</span><span class="cx"> #ifndef ewk_url_scheme_request_private_h
</span><span class="cx"> #define ewk_url_scheme_request_private_h
</span><span class="cx"> 
</span><ins>+#include &quot;CustomProtocolManagerProxy.h&quot;
</ins><span class="cx"> #include &quot;WKAPICast.h&quot;
</span><span class="cx"> #include &quot;WKBase.h&quot;
</span><span class="cx"> #include &quot;WKEinaSharedString.h&quot;
</span><span class="cx"> #include &quot;WKRetainPtr.h&quot;
</span><del>-#include &quot;WKSoupCustomProtocolRequestManager.h&quot;
</del><span class="cx"> #include &quot;ewk_object_private.h&quot;
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -41,9 +41,9 @@
</span><span class="cx"> public:
</span><span class="cx">     EWK_OBJECT_DECLARE(EwkUrlSchemeRequest)
</span><span class="cx"> 
</span><del>-    static RefPtr&lt;EwkUrlSchemeRequest&gt; create(WKSoupCustomProtocolRequestManagerRef manager, API::URLRequest* urlRequest, uint64_t requestID)
</del><ins>+    static RefPtr&lt;EwkUrlSchemeRequest&gt; create(WebKit::CustomProtocolManagerProxy&amp; manager, API::URLRequest* urlRequest, uint64_t requestID)
</ins><span class="cx">     {
</span><del>-        if (!manager || !urlRequest)
</del><ins>+        if (!urlRequest)
</ins><span class="cx">             return nullptr;
</span><span class="cx"> 
</span><span class="cx">         return adoptRef(new EwkUrlSchemeRequest(manager, urlRequest, requestID));
</span><span class="lines">@@ -56,10 +56,13 @@
</span><span class="cx"> 
</span><span class="cx">     void finish(const void* contentData, uint64_t contentLength, const char* mimeType);
</span><span class="cx"> 
</span><ins>+    WebKit::CustomProtocolManagerProxy* manager() const { return m_wkRequestManager; }
+    void invalidate();
+
</ins><span class="cx"> private:
</span><del>-    EwkUrlSchemeRequest(WKSoupCustomProtocolRequestManagerRef manager, API::URLRequest* urlRequest, uint64_t requestID);
</del><ins>+    EwkUrlSchemeRequest(WebKit::CustomProtocolManagerProxy&amp; manager, API::URLRequest* urlRequest, uint64_t requestID);
</ins><span class="cx"> 
</span><del>-    WKRetainPtr&lt;WKSoupCustomProtocolRequestManagerRef&gt; m_wkRequestManager;
</del><ins>+    WebKit::CustomProtocolManagerProxy* m_wkRequestManager;
</ins><span class="cx">     WKEinaSharedString m_url;
</span><span class="cx">     uint64_t m_requestID;
</span><span class="cx">     WKEinaSharedString m_scheme;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitCustomProtocolManagerClientcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp (0 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+/*
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebKitCustomProtocolManagerClient.h&quot;
+
+#include &quot;APICustomProtocolManagerClient.h&quot;
+#include &quot;CustomProtocolManagerProxy.h&quot;
+#include &quot;WebKitWebContextPrivate.h&quot;
+#include &quot;WebProcessPool.h&quot;
+
+using namespace WebCore;
+using namespace WebKit;
+
+class CustomProtocolManagerClient final : public API::CustomProtocolManagerClient {
+public:
+    explicit CustomProtocolManagerClient(WebKitWebContext* webContext)
+        : m_webContext(webContext)
+    {
+    }
+
+private:
+    bool startLoading(CustomProtocolManagerProxy&amp; manager, uint64_t customProtocolID, const ResourceRequest&amp; request) override
+    {
+        webkitWebContextStartLoadingCustomProtocol(m_webContext, customProtocolID, request, manager);
+        return true;
+    }
+
+    void stopLoading(CustomProtocolManagerProxy&amp;, uint64_t customProtocolID) override
+    {
+        webkitWebContextStopLoadingCustomProtocol(m_webContext, customProtocolID);
+    }
+
+    void invalidate(CustomProtocolManagerProxy&amp; manager) override
+    {
+        webkitWebContextInvalidateCustomProtocolRequests(m_webContext, manager);
+    }
+
+    WebKitWebContext* m_webContext;
+};
+
+void attachCustomProtocolManagerClientToContext(WebKitWebContext* webContext)
+{
+    auto* processPool = webkitWebContextGetProcessPool(webContext);
+    processPool-&gt;setCustomProtocolManagerClient(std::make_unique&lt;CustomProtocolManagerClient&gt;(webContext));
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitCustomProtocolManagerClienthfromrev208958trunkSourceWebKit2UIProcessAPIgtkWebKitRequestManagerClienth"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h (from rev 208958, trunk/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.h) (0 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitCustomProtocolManagerClient.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+/*
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#pragma once
+
+#include &quot;WebKitWebContext.h&quot;
+
+void attachCustomProtocolManagerClientToContext(WebKitWebContext*);
+
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -39,7 +39,6 @@
</span><span class="cx"> #include &lt;WebKit/WKInspectorClientGtk.h&gt;
</span><span class="cx"> #include &lt;WebKit/WKRetainPtr.h&gt;
</span><span class="cx"> #include &lt;WebKit/WKSerializedScriptValue.h&gt;
</span><del>-#include &lt;WebKit/WKSoupCustomProtocolRequestManager.h&gt;
</del><span class="cx"> #include &lt;WebKit/WKString.h&gt;
</span><span class="cx"> #include &lt;WebKit/WKUserMediaPermissionRequest.h&gt;
</span><span class="cx"> #include &lt;WebKit/WebKit2_C.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitRequestManagerClientcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -1,49 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebKitRequestManagerClient.h&quot;
-
-#include &quot;WebKitWebContextPrivate.h&quot;
-
-using namespace WebKit;
-
-static void startLoading(WKSoupCustomProtocolRequestManagerRef, uint64_t customProtocolID, WKURLRequestRef requestRef, const void* clientInfo)
-{
-    webkitWebContextStartLoadingCustomProtocol(WEBKIT_WEB_CONTEXT(clientInfo), customProtocolID, toImpl(requestRef));
-}
-
-static void stopLoading(WKSoupCustomProtocolRequestManagerRef, uint64_t customProtocolID, const void* clientInfo)
-{
-    webkitWebContextStopLoadingCustomProtocol(WEBKIT_WEB_CONTEXT(clientInfo), customProtocolID);
-}
-
-void attachRequestManagerClientToContext(WebKitWebContext* webContext)
-{
-    WKSoupCustomProtocolRequestManagerClientV0 wkRequestManagerClient = {
-        {
-            0, // version
-            webContext // clientInfo
-        },
-        startLoading,
-        stopLoading
-    };
-    WKSoupCustomProtocolRequestManagerSetClient(toAPI(webkitWebContextGetRequestManager(webContext)), &amp;wkRequestManagerClient.base);
-}
-
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitRequestManagerClienth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitRequestManagerClient.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -1,27 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WebKitRequestManagerClient_h
-#define WebKitRequestManagerClient_h
-
-#include &quot;WebKitWebContext.h&quot;
-
-void attachRequestManagerClientToContext(WebKitWebContext*);
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitURISchemeRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequest.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include &lt;wtf/text/CString.h&gt;
</span><span class="cx"> 
</span><span class="cx"> using namespace WebKit;
</span><ins>+using namespace WebCore;
</ins><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * SECTION: WebKitURISchemeRequest
</span><span class="lines">@@ -54,7 +55,7 @@
</span><span class="cx"> 
</span><span class="cx"> struct _WebKitURISchemeRequestPrivate {
</span><span class="cx">     WebKitWebContext* webContext;
</span><del>-    RefPtr&lt;WebSoupCustomProtocolRequestManager&gt; webRequestManager;
</del><ins>+    CustomProtocolManagerProxy* manager;
</ins><span class="cx">     RefPtr&lt;WebPageProxy&gt; initiatingPage;
</span><span class="cx">     uint64_t requestID;
</span><span class="cx">     CString uri;
</span><span class="lines">@@ -74,13 +75,13 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebKitURISchemeRequest* webkitURISchemeRequestCreate(uint64_t requestID, WebKitWebContext* webContext, API::URLRequest* urlRequest)
</del><ins>+WebKitURISchemeRequest* webkitURISchemeRequestCreate(uint64_t requestID, WebKitWebContext* webContext, const ResourceRequest&amp; resourceRequest, CustomProtocolManagerProxy&amp; manager)
</ins><span class="cx"> {
</span><del>-    WebKitURISchemeRequest* request = WEBKIT_URI_SCHEME_REQUEST(g_object_new(WEBKIT_TYPE_URI_SCHEME_REQUEST, NULL));
</del><ins>+    WebKitURISchemeRequest* request = WEBKIT_URI_SCHEME_REQUEST(g_object_new(WEBKIT_TYPE_URI_SCHEME_REQUEST, nullptr));
</ins><span class="cx">     request-&gt;priv-&gt;webContext = webContext;
</span><del>-    request-&gt;priv-&gt;webRequestManager = webkitWebContextGetRequestManager(webContext);
-    request-&gt;priv-&gt;uri = urlRequest-&gt;resourceRequest().url().string().utf8();
-    request-&gt;priv-&gt;initiatingPage = WebProcessProxy::webPage(urlRequest-&gt;resourceRequest().initiatingPageID());
</del><ins>+    request-&gt;priv-&gt;manager = &amp;manager;
+    request-&gt;priv-&gt;uri = resourceRequest.url().string().utf8();
+    request-&gt;priv-&gt;initiatingPage = WebProcessProxy::webPage(resourceRequest.initiatingPageID());
</ins><span class="cx">     request-&gt;priv-&gt;requestID = requestID;
</span><span class="cx">     return request;
</span><span class="cx"> }
</span><span class="lines">@@ -87,10 +88,20 @@
</span><span class="cx"> 
</span><span class="cx"> void webkitURISchemeRequestCancel(WebKitURISchemeRequest* request)
</span><span class="cx"> {
</span><del>-    if (request-&gt;priv-&gt;cancellable.get())
-        g_cancellable_cancel(request-&gt;priv-&gt;cancellable.get());
</del><ins>+    g_cancellable_cancel(request-&gt;priv-&gt;cancellable.get());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+CustomProtocolManagerProxy* webkitURISchemeRequestGetManager(WebKitURISchemeRequest* request)
+{
+    return request-&gt;priv-&gt;manager;
+}
+
+void webkitURISchemeRequestInvalidate(WebKitURISchemeRequest* request)
+{
+    request-&gt;priv-&gt;manager = nullptr;
+    webkitURISchemeRequestCancel(request);
+}
+
</ins><span class="cx"> /**
</span><span class="cx">  * webkit_uri_scheme_request_get_scheme:
</span><span class="cx">  * @request: a #WebKitURISchemeRequest
</span><span class="lines">@@ -159,8 +170,14 @@
</span><span class="cx"> static void webkitURISchemeRequestReadCallback(GInputStream* inputStream, GAsyncResult* result, WebKitURISchemeRequest* schemeRequest)
</span><span class="cx"> {
</span><span class="cx">     GRefPtr&lt;WebKitURISchemeRequest&gt; request = adoptGRef(schemeRequest);
</span><ins>+    WebKitURISchemeRequestPrivate* priv = request-&gt;priv;
</ins><span class="cx">     GUniqueOutPtr&lt;GError&gt; error;
</span><span class="cx">     gssize bytesRead = g_input_stream_read_finish(inputStream, result, &amp;error.outPtr());
</span><ins>+    if (!priv-&gt;manager) {
+        webkitWebContextDidFinishLoadingCustomProtocol(priv-&gt;webContext, priv-&gt;requestID);
+        return;
+    }
+
</ins><span class="cx">     if (bytesRead == -1) {
</span><span class="cx">         webkit_uri_scheme_request_finish_error(request.get(), error.get());
</span><span class="cx">         return;
</span><span class="lines">@@ -171,22 +188,21 @@
</span><span class="cx">     if (!request-&gt;priv-&gt;stream)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    WebKitURISchemeRequestPrivate* priv = request-&gt;priv;
-    Ref&lt;API::Data&gt; webData = API::Data::create(reinterpret_cast&lt;const unsigned char*&gt;(priv-&gt;readBuffer), bytesRead);
</del><ins>+    auto webData = IPC::DataReference(reinterpret_cast&lt;const uint8_t*&gt;(priv-&gt;readBuffer), bytesRead);
</ins><span class="cx">     if (!priv-&gt;bytesRead) {
</span><span class="cx">         // First chunk read. In case of empty reply an empty API::Data is sent to the networking process.
</span><del>-        WebCore::ResourceResponse response(WebCore::URL(WebCore::URL(), String::fromUTF8(priv-&gt;uri)), String::fromUTF8(priv-&gt;mimeType.data()),
</del><ins>+        ResourceResponse response(URL(URL(), String::fromUTF8(priv-&gt;uri)), String::fromUTF8(priv-&gt;mimeType.data()),
</ins><span class="cx">             priv-&gt;streamLength, emptyString());
</span><del>-        priv-&gt;webRequestManager-&gt;didReceiveResponse(priv-&gt;requestID, response);
-        priv-&gt;webRequestManager-&gt;didLoadData(priv-&gt;requestID, webData.ptr());
</del><ins>+        priv-&gt;manager-&gt;didReceiveResponse(priv-&gt;requestID, response);
+        priv-&gt;manager-&gt;didLoadData(priv-&gt;requestID, webData);
</ins><span class="cx">     } else if (bytesRead || (!bytesRead &amp;&amp; !priv-&gt;streamLength)) {
</span><span class="cx">         // Subsequent chunk read. We only send an empty API::Data to the networking process when stream length is unknown.
</span><del>-        priv-&gt;webRequestManager-&gt;didLoadData(priv-&gt;requestID, webData.ptr());
</del><ins>+        priv-&gt;manager-&gt;didLoadData(priv-&gt;requestID, webData);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!bytesRead) {
</span><del>-        priv-&gt;webRequestManager-&gt;didFinishLoading(request-&gt;priv-&gt;requestID);
-        webkitWebContextDidFinishLoadingCustomProtocol(request-&gt;priv-&gt;webContext, request-&gt;priv-&gt;requestID);
</del><ins>+        priv-&gt;manager-&gt;didFinishLoading(priv-&gt;requestID);
+        webkitWebContextDidFinishLoadingCustomProtocol(priv-&gt;webContext, priv-&gt;requestID);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -239,7 +255,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     priv-&gt;stream = nullptr;
</span><del>-    WebCore::ResourceError resourceError(g_quark_to_string(error-&gt;domain), toWebCoreError(error-&gt;code), WebCore::URL(priv-&gt;soupURI.get()), String::fromUTF8(error-&gt;message));
-    priv-&gt;webRequestManager-&gt;didFailWithError(priv-&gt;requestID, resourceError);
</del><ins>+    ResourceError resourceError(g_quark_to_string(error-&gt;domain), toWebCoreError(error-&gt;code), URL(priv-&gt;soupURI.get()), String::fromUTF8(error-&gt;message));
+    priv-&gt;manager-&gt;didFailWithError(priv-&gt;requestID, resourceError);
</ins><span class="cx">     webkitWebContextDidFinishLoadingCustomProtocol(priv-&gt;webContext, priv-&gt;requestID);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitURISchemeRequestPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -20,11 +20,15 @@
</span><span class="cx"> #ifndef WebKitURISchemeRequestPrivate_h
</span><span class="cx"> #define WebKitURISchemeRequestPrivate_h
</span><span class="cx"> 
</span><ins>+#include &quot;CustomProtocolManagerProxy.h&quot;
</ins><span class="cx"> #include &quot;WebKitPrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitURISchemeRequest.h&quot;
</span><span class="cx"> #include &quot;WebKitWebContext.h&quot;
</span><ins>+#include &lt;WebCore/ResourceRequest.h&gt;
</ins><span class="cx"> 
</span><del>-WebKitURISchemeRequest* webkitURISchemeRequestCreate(uint64_t requestID, WebKitWebContext*, API::URLRequest*);
</del><ins>+WebKitURISchemeRequest* webkitURISchemeRequestCreate(uint64_t requestID, WebKitWebContext*, const WebCore::ResourceRequest&amp;, WebKit::CustomProtocolManagerProxy&amp;);
</ins><span class="cx"> void webkitURISchemeRequestCancel(WebKitURISchemeRequest*);
</span><ins>+WebKit::CustomProtocolManagerProxy* webkitURISchemeRequestGetManager(WebKitURISchemeRequest*);
+void webkitURISchemeRequestInvalidate(WebKitURISchemeRequest*);
</ins><span class="cx"> 
</span><span class="cx"> #endif // WebKitURISchemeRequestPrivate_h
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -20,6 +20,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;WebKitWebContext.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;APICustomProtocolManagerClient.h&quot;
</ins><span class="cx"> #include &quot;APIDownloadClient.h&quot;
</span><span class="cx"> #include &quot;APIPageConfiguration.h&quot;
</span><span class="cx"> #include &quot;APIProcessPoolConfiguration.h&quot;
</span><span class="lines">@@ -30,6 +31,7 @@
</span><span class="cx"> #include &quot;WebCookieManagerProxy.h&quot;
</span><span class="cx"> #include &quot;WebGeolocationManagerProxy.h&quot;
</span><span class="cx"> #include &quot;WebKitCookieManagerPrivate.h&quot;
</span><ins>+#include &quot;WebKitCustomProtocolManagerClient.h&quot;
</ins><span class="cx"> #include &quot;WebKitDownloadClient.h&quot;
</span><span class="cx"> #include &quot;WebKitDownloadPrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitFaviconDatabasePrivate.h&quot;
</span><span class="lines">@@ -38,7 +40,6 @@
</span><span class="cx"> #include &quot;WebKitNotificationProvider.h&quot;
</span><span class="cx"> #include &quot;WebKitPluginPrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitPrivate.h&quot;
</span><del>-#include &quot;WebKitRequestManagerClient.h&quot;
</del><span class="cx"> #include &quot;WebKitSecurityManagerPrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitSettingsPrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitURISchemeRequestPrivate.h&quot;
</span><span class="lines">@@ -115,12 +116,6 @@
</span><span class="cx"> 
</span><span class="cx"> class WebKitURISchemeHandler: public RefCounted&lt;WebKitURISchemeHandler&gt; {
</span><span class="cx"> public:
</span><del>-    WebKitURISchemeHandler()
-        : m_callback(0)
-        , m_userData(0)
-        , m_destroyNotify(0)
-    {
-    }
</del><span class="cx">     WebKitURISchemeHandler(WebKitURISchemeRequestCallback callback, void* userData, GDestroyNotify destroyNotify)
</span><span class="cx">         : m_callback(callback)
</span><span class="cx">         , m_userData(userData)
</span><span class="lines">@@ -147,9 +142,9 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    WebKitURISchemeRequestCallback m_callback;
-    void* m_userData;
-    GDestroyNotify m_destroyNotify;
</del><ins>+    WebKitURISchemeRequestCallback m_callback { nullptr };
+    void* m_userData { nullptr };
+    GDestroyNotify m_destroyNotify { nullptr };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> typedef HashMap&lt;String, RefPtr&lt;WebKitURISchemeHandler&gt; &gt; URISchemeHandlerMap;
</span><span class="lines">@@ -162,7 +157,6 @@
</span><span class="cx">     GRefPtr&lt;WebKitCookieManager&gt; cookieManager;
</span><span class="cx">     GRefPtr&lt;WebKitFaviconDatabase&gt; faviconDatabase;
</span><span class="cx">     GRefPtr&lt;WebKitSecurityManager&gt; securityManager;
</span><del>-    RefPtr&lt;WebSoupCustomProtocolRequestManager&gt; requestManager;
</del><span class="cx">     URISchemeHandlerMap uriSchemeHandlers;
</span><span class="cx">     URISchemeRequestMap uriSchemeRequests;
</span><span class="cx"> #if ENABLE(GEOLOCATION)
</span><span class="lines">@@ -275,8 +269,6 @@
</span><span class="cx">     if (!priv-&gt;websiteDataManager)
</span><span class="cx">         priv-&gt;websiteDataManager = adoptGRef(webkitWebsiteDataManagerCreate(websiteDataStoreConfigurationForWebProcessPoolConfiguration(configuration)));
</span><span class="cx"> 
</span><del>-    priv-&gt;requestManager = priv-&gt;processPool-&gt;supplement&lt;WebSoupCustomProtocolRequestManager&gt;();
-
</del><span class="cx">     priv-&gt;tlsErrorsPolicy = WEBKIT_TLS_ERRORS_POLICY_FAIL;
</span><span class="cx">     priv-&gt;processPool-&gt;setIgnoreTLSErrors(false);
</span><span class="cx"> 
</span><span class="lines">@@ -287,7 +279,7 @@
</span><span class="cx"> 
</span><span class="cx">     attachInjectedBundleClientToContext(webContext);
</span><span class="cx">     attachDownloadClientToContext(webContext);
</span><del>-    attachRequestManagerClientToContext(webContext);
</del><ins>+    attachCustomProtocolManagerClientToContext(webContext);
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(GEOLOCATION)
</span><span class="cx">     priv-&gt;geolocationProvider = WebKitGeolocationProvider::create(priv-&gt;processPool-&gt;supplement&lt;WebGeolocationManagerProxy&gt;());
</span><span class="lines">@@ -304,6 +296,7 @@
</span><span class="cx">         priv-&gt;clientsDetached = true;
</span><span class="cx">         priv-&gt;processPool-&gt;initializeInjectedBundleClient(nullptr);
</span><span class="cx">         priv-&gt;processPool-&gt;setDownloadClient(nullptr);
</span><ins>+        priv-&gt;processPool-&gt;setCustomProtocolManagerClient(nullptr);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     G_OBJECT_CLASS(webkit_web_context_parent_class)-&gt;dispose(object);
</span><span class="lines">@@ -849,8 +842,9 @@
</span><span class="cx">     g_return_if_fail(callback);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;WebKitURISchemeHandler&gt; handler = adoptRef(new WebKitURISchemeHandler(callback, userData, destroyNotify));
</span><del>-    context-&gt;priv-&gt;uriSchemeHandlers.set(String::fromUTF8(scheme), handler.get());
-    context-&gt;priv-&gt;requestManager-&gt;registerSchemeForCustomProtocol(String::fromUTF8(scheme));
</del><ins>+    auto addResult = context-&gt;priv-&gt;uriSchemeHandlers.set(String::fromUTF8(scheme), handler.get());
+    if (addResult.isNewEntry)
+        context-&gt;priv-&gt;processPool-&gt;registerSchemeForCustomProtocol(String::fromUTF8(scheme));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -1266,14 +1260,9 @@
</span><span class="cx">     return context-&gt;priv-&gt;processPool.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebSoupCustomProtocolRequestManager* webkitWebContextGetRequestManager(WebKitWebContext* context)
</del><ins>+void webkitWebContextStartLoadingCustomProtocol(WebKitWebContext* context, uint64_t customProtocolID, const WebCore::ResourceRequest&amp; resourceRequest, CustomProtocolManagerProxy&amp; manager)
</ins><span class="cx"> {
</span><del>-    return context-&gt;priv-&gt;requestManager.get();
-}
-
-void webkitWebContextStartLoadingCustomProtocol(WebKitWebContext* context, uint64_t customProtocolID, API::URLRequest* urlRequest)
-{
-    GRefPtr&lt;WebKitURISchemeRequest&gt; request = adoptGRef(webkitURISchemeRequestCreate(customProtocolID, context, urlRequest));
</del><ins>+    GRefPtr&lt;WebKitURISchemeRequest&gt; request = adoptGRef(webkitURISchemeRequestCreate(customProtocolID, context, resourceRequest, manager));
</ins><span class="cx">     String scheme(String::fromUTF8(webkit_uri_scheme_request_get_scheme(request.get())));
</span><span class="cx">     RefPtr&lt;WebKitURISchemeHandler&gt; handler = context-&gt;priv-&gt;uriSchemeHandlers.get(scheme);
</span><span class="cx">     ASSERT(handler.get());
</span><span class="lines">@@ -1292,6 +1281,16 @@
</span><span class="cx">     webkitURISchemeRequestCancel(request.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void webkitWebContextInvalidateCustomProtocolRequests(WebKitWebContext* context, CustomProtocolManagerProxy&amp; manager)
+{
+    Vector&lt;GRefPtr&lt;WebKitURISchemeRequest&gt;&gt; requests;
+    copyValuesToVector(context-&gt;priv-&gt;uriSchemeRequests, requests);
+    for (auto&amp; request : requests) {
+        if (webkitURISchemeRequestGetManager(request.get()) == &amp;manager)
+            webkitURISchemeRequestInvalidate(request.get());
+    }
+}
+
</ins><span class="cx"> void webkitWebContextDidFinishLoadingCustomProtocol(WebKitWebContext* context, uint64_t customProtocolID)
</span><span class="cx"> {
</span><span class="cx">     context-&gt;priv-&gt;uriSchemeRequests.remove(customProtocolID);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContextPrivate.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -26,12 +26,13 @@
</span><span class="cx"> #ifndef WebKitWebContextPrivate_h
</span><span class="cx"> #define WebKitWebContextPrivate_h
</span><span class="cx"> 
</span><ins>+#include &quot;CustomProtocolManagerProxy.h&quot;
</ins><span class="cx"> #include &quot;DownloadProxy.h&quot;
</span><span class="cx"> #include &quot;WebKitPrivate.h&quot;
</span><span class="cx"> #include &quot;WebKitUserContentManager.h&quot;
</span><span class="cx"> #include &quot;WebKitWebContext.h&quot;
</span><span class="cx"> #include &quot;WebProcessPool.h&quot;
</span><del>-#include &quot;WebSoupCustomProtocolRequestManager.h&quot;
</del><ins>+#include &lt;WebCore/ResourceRequest.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> WebKit::WebProcessPool* webkitWebContextGetProcessPool(WebKitWebContext*);
</span><span class="cx"> WebKitDownload* webkitWebContextGetOrCreateDownload(WebKit::DownloadProxy*);
</span><span class="lines">@@ -38,9 +39,9 @@
</span><span class="cx"> WebKitDownload* webkitWebContextStartDownload(WebKitWebContext*, const char* uri, WebKit::WebPageProxy*);
</span><span class="cx"> void webkitWebContextRemoveDownload(WebKit::DownloadProxy*);
</span><span class="cx"> void webkitWebContextDownloadStarted(WebKitWebContext*, WebKitDownload*);
</span><del>-WebKit::WebSoupCustomProtocolRequestManager* webkitWebContextGetRequestManager(WebKitWebContext*);
-void webkitWebContextStartLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID, API::URLRequest*);
</del><ins>+void webkitWebContextStartLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID, const WebCore::ResourceRequest&amp;, WebKit::CustomProtocolManagerProxy&amp;);
</ins><span class="cx"> void webkitWebContextStopLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID);
</span><ins>+void webkitWebContextInvalidateCustomProtocolRequests(WebKitWebContext*, WebKit::CustomProtocolManagerProxy&amp;);
</ins><span class="cx"> void webkitWebContextDidFinishLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID);
</span><span class="cx"> bool webkitWebContextIsLoadingCustomProtocol(WebKitWebContext*, uint64_t customProtocolID);
</span><span class="cx"> void webkitWebContextCreatePageForWebView(WebKitWebContext*, WebKitWebView*, WebKitUserContentManager*, WebKitWebView*);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolsCustomProtocolManagerProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -34,8 +34,14 @@
</span><span class="cx"> OBJC_CLASS WKCustomProtocolLoader;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+namespace IPC {
+class DataReference;
+}
+
</ins><span class="cx"> namespace WebCore {
</span><ins>+class ResourceError;
</ins><span class="cx"> class ResourceRequest;
</span><ins>+class ResourceResponse;
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -51,6 +57,15 @@
</span><span class="cx">     void startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest&amp;);
</span><span class="cx">     void stopLoading(uint64_t customProtocolID);
</span><span class="cx"> 
</span><ins>+    void processDidClose();
+
+#if USE(SOUP)
+    void didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse&amp;);
+    void didLoadData(uint64_t customProtocolID, const IPC::DataReference&amp;);
+    void didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError&amp;);
+    void didFinishLoading(uint64_t customProtocolID);
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx">     // IPC::MessageReceiver
</span><span class="cx">     void didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolsmacCustomProtocolManagerProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -160,4 +160,8 @@
</span><span class="cx">     m_loaderMap.remove(customProtocolID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void CustomProtocolManagerProxy::processDidClose()
+{
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolssoupCustomProtocolManagerProxySoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -20,13 +20,19 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;CustomProtocolManagerProxy.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;APICustomProtocolManagerClient.h&quot;
</ins><span class="cx"> #include &quot;ChildProcessProxy.h&quot;
</span><span class="cx"> #include &quot;CustomProtocolManagerMessages.h&quot;
</span><span class="cx"> #include &quot;CustomProtocolManagerProxyMessages.h&quot;
</span><span class="cx"> #include &quot;WebProcessPool.h&quot;
</span><del>-#include &quot;WebSoupCustomProtocolRequestManager.h&quot;
</del><span class="cx"> #include &lt;WebCore/ResourceRequest.h&gt;
</span><span class="cx"> 
</span><ins>+#if PLATFORM(GTK)
+#include &lt;WebCore/ErrorsGtk.h&gt;
+#elif PLATFORM(EFL)
+#include &lt;WebCore/ErrorsEfl.h&gt;
+#endif
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> CustomProtocolManagerProxy::CustomProtocolManagerProxy(ChildProcessProxy* childProcessProxy, WebProcessPool&amp; processPool)
</span><span class="lines">@@ -42,14 +48,40 @@
</span><span class="cx">     m_childProcessProxy-&gt;removeMessageReceiver(Messages::CustomProtocolManagerProxy::messageReceiverName());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void CustomProtocolManagerProxy::processDidClose()
+{
+    m_processPool.customProtocolManagerClient().invalidate(*this);
+}
+
</ins><span class="cx"> void CustomProtocolManagerProxy::startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest&amp; request)
</span><span class="cx"> {
</span><del>-    m_processPool.supplement&lt;WebSoupCustomProtocolRequestManager&gt;()-&gt;startLoading(customProtocolID, request);
</del><ins>+    if (!m_processPool.customProtocolManagerClient().startLoading(*this, customProtocolID, request))
+        didFailWithError(customProtocolID, WebCore::cannotShowURLError(request));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CustomProtocolManagerProxy::stopLoading(uint64_t customProtocolID)
</span><span class="cx"> {
</span><del>-    m_processPool.supplement&lt;WebSoupCustomProtocolRequestManager&gt;()-&gt;stopLoading(customProtocolID);
</del><ins>+    m_processPool.customProtocolManagerClient().stopLoading(*this, customProtocolID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void CustomProtocolManagerProxy::didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse&amp; response)
+{
+    m_childProcessProxy-&gt;send(Messages::CustomProtocolManager::DidReceiveResponse(customProtocolID, response, 0), 0);
+}
+
+void CustomProtocolManagerProxy::didLoadData(uint64_t customProtocolID, const IPC::DataReference&amp; data)
+{
+    m_childProcessProxy-&gt;send(Messages::CustomProtocolManager::DidLoadData(customProtocolID, data), 0);
+}
+
+void CustomProtocolManagerProxy::didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError&amp; error)
+{
+    m_childProcessProxy-&gt;send(Messages::CustomProtocolManager::DidFailWithError(customProtocolID, error), 0);
+}
+
+void CustomProtocolManagerProxy::didFinishLoading(uint64_t customProtocolID)
+{
+    m_childProcessProxy-&gt;send(Messages::CustomProtocolManager::DidFinishLoading(customProtocolID), 0);
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolssoupWebSoupCustomProtocolRequestManagercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -1,149 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebSoupCustomProtocolRequestManager.h&quot;
-
-#include &quot;APIData.h&quot;
-#include &quot;CustomProtocolManagerMessages.h&quot;
-#include &quot;WebProcessPool.h&quot;
-#include &lt;WebCore/ResourceError.h&gt;
-#include &lt;WebCore/ResourceRequest.h&gt;
-#include &lt;WebCore/ResourceResponse.h&gt;
-
-#if PLATFORM(GTK)
-#include &lt;WebCore/ErrorsGtk.h&gt;
-#elif PLATFORM(EFL)
-#include &lt;WebCore/ErrorsEfl.h&gt;
-#endif
-
-namespace WebKit {
-
-const char* WebSoupCustomProtocolRequestManager::supplementName()
-{
-    return &quot;WebSoupCustomProtocolRequestManager&quot;;
-}
-
-Ref&lt;WebSoupCustomProtocolRequestManager&gt; WebSoupCustomProtocolRequestManager::create(WebProcessPool* processPool)
-{
-    return adoptRef(*new WebSoupCustomProtocolRequestManager(processPool));
-}
-
-WebSoupCustomProtocolRequestManager::WebSoupCustomProtocolRequestManager(WebProcessPool* processPool)
-    : WebContextSupplement(processPool)
-{
-}
-
-WebSoupCustomProtocolRequestManager::~WebSoupCustomProtocolRequestManager()
-{
-}
-
-void WebSoupCustomProtocolRequestManager::initializeClient(const WKSoupCustomProtocolRequestManagerClientBase* client)
-{
-    m_client.initialize(client);
-}
-
-// WebContextSupplement
-void WebSoupCustomProtocolRequestManager::processPoolDestroyed()
-{
-}
-
-void WebSoupCustomProtocolRequestManager::processDidClose(WebProcessProxy*)
-{
-}
-
-void WebSoupCustomProtocolRequestManager::refWebContextSupplement()
-{
-    API::Object::ref();
-}
-
-void WebSoupCustomProtocolRequestManager::derefWebContextSupplement()
-{
-    API::Object::deref();
-}
-
-void WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol(const String&amp; scheme)
-{
-    ASSERT(!scheme.isNull());
-    if (m_registeredSchemes.contains(scheme))
-        return;
-
-    if (!processPool())
-        return;
-
-    processPool()-&gt;registerSchemeForCustomProtocol(scheme);
-
-    m_registeredSchemes.append(scheme);
-}
-
-void WebSoupCustomProtocolRequestManager::unregisterSchemeForCustomProtocol(const String&amp; scheme)
-{
-    if (!processPool())
-        return;
-
-    processPool()-&gt;unregisterSchemeForCustomProtocol(scheme);
-
-    bool removed = m_registeredSchemes.removeFirst(scheme);
-    ASSERT_UNUSED(removed, removed);
-}
-
-void WebSoupCustomProtocolRequestManager::startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest&amp; request)
-{
-    if (!m_client.startLoading(this, customProtocolID, request))
-        didFailWithError(customProtocolID, WebCore::cannotShowURLError(request));
-}
-
-void WebSoupCustomProtocolRequestManager::stopLoading(uint64_t customProtocolID)
-{
-    m_client.stopLoading(this, customProtocolID);
-}
-
-void WebSoupCustomProtocolRequestManager::didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse&amp; response)
-{
-    if (!processPool())
-        return;
-
-    processPool()-&gt;networkingProcessConnection()-&gt;send(Messages::CustomProtocolManager::DidReceiveResponse(customProtocolID, response, 0), 0);
-}
-
-void WebSoupCustomProtocolRequestManager::didLoadData(uint64_t customProtocolID, const API::Data* data)
-{
-    if (!processPool())
-        return;
-
-    processPool()-&gt;networkingProcessConnection()-&gt;send(Messages::CustomProtocolManager::DidLoadData(customProtocolID, data-&gt;dataReference()), 0);
-}
-
-void WebSoupCustomProtocolRequestManager::didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError&amp; error)
-{
-    if (!processPool())
-        return;
-
-    processPool()-&gt;networkingProcessConnection()-&gt;send(Messages::CustomProtocolManager::DidFailWithError(customProtocolID, error), 0);
-}
-
-void WebSoupCustomProtocolRequestManager::didFinishLoading(uint64_t customProtocolID)
-{
-    if (!processPool())
-        return;
-
-    processPool()-&gt;networkingProcessConnection()-&gt;send(Messages::CustomProtocolManager::DidFinishLoading(customProtocolID), 0);
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolssoupWebSoupCustomProtocolRequestManagerh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -1,83 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WebSoupCustomProtocolRequestManager_h
-#define WebSoupCustomProtocolRequestManager_h
-
-#include &quot;APIObject.h&quot;
-#include &quot;WebContextSupplement.h&quot;
-#include &quot;WebSoupCustomProtocolRequestManagerClient.h&quot;
-#include &lt;wtf/RefPtr.h&gt;
-#include &lt;wtf/text/WTFString.h&gt;
-
-namespace API {
-class Data;
-}
-
-namespace WebCore {
-class ResourceError;
-class ResourceRequest;
-class ResourceResponse;
-}
-
-namespace WebKit {
-
-class WebProcessPool;
-
-class WebSoupCustomProtocolRequestManager : public API::ObjectImpl&lt;API::Object::Type::SoupCustomProtocolRequestManager&gt;, public WebContextSupplement {
-public:
-    static const char* supplementName();
-
-    static Ref&lt;WebSoupCustomProtocolRequestManager&gt; create(WebProcessPool*);
-    virtual ~WebSoupCustomProtocolRequestManager();
-
-    void initializeClient(const WKSoupCustomProtocolRequestManagerClientBase*);
-
-    void registerSchemeForCustomProtocol(const String&amp; scheme);
-    void unregisterSchemeForCustomProtocol(const String&amp; scheme);
-
-    void startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest&amp;);
-    void stopLoading(uint64_t customProtocolID);
-
-    void didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse&amp;);
-    void didLoadData(uint64_t customProtocolID, const API::Data*);
-    void didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError&amp;);
-    void didFinishLoading(uint64_t customProtocolID);
-
-    const Vector&lt;String&gt;&amp; registeredSchemesForCustomProtocols() const { return m_registeredSchemes; }
-
-    using API::Object::ref;
-    using API::Object::deref;
-
-private:
-    WebSoupCustomProtocolRequestManager(WebProcessPool*);
-
-    // WebContextSupplement
-    void processPoolDestroyed() override;
-    void processDidClose(WebProcessProxy*) override;
-    void refWebContextSupplement() override;
-    void derefWebContextSupplement() override;
-
-    WebSoupCustomProtocolRequestManagerClient m_client;
-    Vector&lt;String&gt; m_registeredSchemes;
-};
-
-} // namespace WebKit
-
-#endif // WebSoupCustomProtocolRequestManager_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolssoupWebSoupCustomProtocolRequestManagerClientcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -1,43 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include &quot;config.h&quot;
-#include &quot;WebSoupCustomProtocolRequestManagerClient.h&quot;
-
-#include &quot;WebSoupCustomProtocolRequestManager.h&quot;
-
-namespace WebKit {
-
-bool WebSoupCustomProtocolRequestManagerClient::startLoading(WebSoupCustomProtocolRequestManager* soupRequestManager, uint64_t customProtocolID, const WebCore::ResourceRequest&amp; request)
-{
-    if (!m_client.startLoading)
-        return false;
-
-    Ref&lt;API::URLRequest&gt; urlRequest = API::URLRequest::create(request);
-    m_client.startLoading(toAPI(soupRequestManager), customProtocolID, toAPI(urlRequest.ptr()), m_client.base.clientInfo);
-    return true;
-}
-
-void WebSoupCustomProtocolRequestManagerClient::stopLoading(WebSoupCustomProtocolRequestManager* soupRequestManager, uint64_t customProtocolID)
-{
-    if (m_client.stopLoading)
-        m_client.stopLoading(toAPI(soupRequestManager), customProtocolID, m_client.base.clientInfo);
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkCustomProtocolssoupWebSoupCustomProtocolRequestManagerClienth"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -1,50 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WebSoupCustomProtocolRequestManagerClient_h
-#define WebSoupCustomProtocolRequestManagerClient_h
-
-#include &quot;APIClient.h&quot;
-#include &quot;WKAPICast.h&quot;
-#include &quot;WKSoupCustomProtocolRequestManager.h&quot;
-
-namespace API {
-
-template&lt;&gt; struct ClientTraits&lt;WKSoupCustomProtocolRequestManagerClientBase&gt; {
-    typedef std::tuple&lt;WKSoupCustomProtocolRequestManagerClientV0&gt; Versions;
-};
-}
-
-namespace WebCore {
-class ResourceRequest;
-}
-
-namespace WebKit {
-
-class WebSoupCustomProtocolRequestManager;
-
-class WebSoupCustomProtocolRequestManagerClient : public API::Client&lt;WKSoupCustomProtocolRequestManagerClientBase&gt; {
-public:
-    bool startLoading(WebSoupCustomProtocolRequestManager*, uint64_t customProtocolID, const WebCore::ResourceRequest&amp;);
-    void stopLoading(WebSoupCustomProtocolRequestManager*, uint64_t customProtocolID);
-};
-
-} // namespace WebKit
-
-#endif // WebSoupCustomProtocolRequestManagerClient_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessNetworkNetworkProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -219,6 +219,7 @@
</span><span class="cx"> {
</span><span class="cx">     if (m_downloadProxyMap)
</span><span class="cx">         m_downloadProxyMap-&gt;processDidClose();
</span><ins>+    m_customProtocolManagerProxy.processDidClose();
</ins><span class="cx"> 
</span><span class="cx">     m_tokenForHoldingLockedFiles = nullptr;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIArray.h&quot;
</span><span class="cx"> #include &quot;APIAutomationClient.h&quot;
</span><ins>+#include &quot;APICustomProtocolManagerClient.h&quot;
</ins><span class="cx"> #include &quot;APIDownloadClient.h&quot;
</span><span class="cx"> #include &quot;APILegacyContextHistoryClient.h&quot;
</span><span class="cx"> #include &quot;APIPageConfiguration.h&quot;
</span><span class="lines">@@ -90,10 +91,6 @@
</span><span class="cx"> #include &lt;JavaScriptCore/RemoteInspector.h&gt;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if USE(SOUP)
-#include &quot;WebSoupCustomProtocolRequestManager.h&quot;
-#endif
-
</del><span class="cx"> #if OS(LINUX)
</span><span class="cx"> #include &quot;MemoryPressureMonitor.h&quot;
</span><span class="cx"> #endif
</span><span class="lines">@@ -157,6 +154,9 @@
</span><span class="cx">     , m_automationClient(std::make_unique&lt;API::AutomationClient&gt;())
</span><span class="cx">     , m_downloadClient(std::make_unique&lt;API::DownloadClient&gt;())
</span><span class="cx">     , m_historyClient(std::make_unique&lt;API::LegacyContextHistoryClient&gt;())
</span><ins>+#if USE(SOUP)
+    , m_customProtocolManagerClient(std::make_unique&lt;API::CustomProtocolManagerClient&gt;())
+#endif
</ins><span class="cx">     , m_visitedLinkStore(VisitedLinkStore::create())
</span><span class="cx">     , m_visitedLinksPopulated(false)
</span><span class="cx">     , m_plugInAutoStartProvider(this)
</span><span class="lines">@@ -165,9 +165,6 @@
</span><span class="cx">     , m_memorySamplerEnabled(false)
</span><span class="cx">     , m_memorySamplerInterval(1400.0)
</span><span class="cx">     , m_websiteDataStore(m_configuration-&gt;shouldHaveLegacyDataStore() ? API::WebsiteDataStore::create(legacyWebsiteDataStoreConfiguration(m_configuration)).ptr() : nullptr)
</span><del>-#if USE(SOUP)
-    , m_initialHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicyOnlyFromMainDocumentDomain)
-#endif
</del><span class="cx">     , m_shouldUseTestingNetworkSession(false)
</span><span class="cx">     , m_processTerminationEnabled(true)
</span><span class="cx">     , m_canHandleHTTPSServerTrustEvaluation(true)
</span><span class="lines">@@ -197,9 +194,6 @@
</span><span class="cx">     addSupplement&lt;WebCookieManagerProxy&gt;();
</span><span class="cx">     addSupplement&lt;WebGeolocationManagerProxy&gt;();
</span><span class="cx">     addSupplement&lt;WebNotificationManagerProxy&gt;();
</span><del>-#if USE(SOUP)
-    addSupplement&lt;WebSoupCustomProtocolRequestManager&gt;();
-#endif
</del><span class="cx"> #if ENABLE(MEDIA_SESSION)
</span><span class="cx">     addSupplement&lt;WebMediaSessionFocusManager&gt;();
</span><span class="cx"> #endif
</span><span class="lines">@@ -1364,11 +1358,17 @@
</span><span class="cx"> 
</span><span class="cx"> void WebProcessPool::registerSchemeForCustomProtocol(const String&amp; scheme)
</span><span class="cx"> {
</span><ins>+#if USE(SOUP)
+    m_urlSchemesRegisteredForCustomProtocols.add(scheme);
+#endif
</ins><span class="cx">     sendToNetworkingProcess(Messages::CustomProtocolManager::RegisterScheme(scheme));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebProcessPool::unregisterSchemeForCustomProtocol(const String&amp; scheme)
</span><span class="cx"> {
</span><ins>+#if USE(SOUP)
+    m_urlSchemesRegisteredForCustomProtocols.remove(scheme);
+#endif
</ins><span class="cx">     sendToNetworkingProcess(Messages::CustomProtocolManager::UnregisterScheme(scheme));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace API {
</span><span class="cx"> class AutomationClient;
</span><ins>+class CustomProtocolManagerClient;
</ins><span class="cx"> class DownloadClient;
</span><span class="cx"> class LegacyContextHistoryClient;
</span><span class="cx"> class PageConfiguration;
</span><span class="lines">@@ -135,6 +136,9 @@
</span><span class="cx">     void setHistoryClient(std::unique_ptr&lt;API::LegacyContextHistoryClient&gt;);
</span><span class="cx">     void setDownloadClient(std::unique_ptr&lt;API::DownloadClient&gt;);
</span><span class="cx">     void setAutomationClient(std::unique_ptr&lt;API::AutomationClient&gt;);
</span><ins>+#if USE(SOUP)
+    void setCustomProtocolManagerClient(std::unique_ptr&lt;API::CustomProtocolManagerClient&gt;&amp;&amp;);
+#endif
</ins><span class="cx"> 
</span><span class="cx">     void setMaximumNumberOfProcesses(unsigned); // Can only be called when there are no processes running.
</span><span class="cx">     unsigned maximumNumberOfProcesses() const { return !m_configuration-&gt;maximumProcessCount() ? UINT_MAX : m_configuration-&gt;maximumProcessCount(); }
</span><span class="lines">@@ -225,6 +229,10 @@
</span><span class="cx">     API::LegacyContextHistoryClient&amp; historyClient() { return *m_historyClient; }
</span><span class="cx">     WebContextClient&amp; client() { return m_client; }
</span><span class="cx"> 
</span><ins>+#if USE(SOUP)
+    API::CustomProtocolManagerClient&amp; customProtocolManagerClient() const { return *m_customProtocolManagerClient; }
+#endif
+
</ins><span class="cx">     WebIconDatabase* iconDatabase() const { return m_iconDatabase.get(); }
</span><span class="cx"> 
</span><span class="cx">     struct Statistics {
</span><span class="lines">@@ -455,6 +463,9 @@
</span><span class="cx">     std::unique_ptr&lt;API::AutomationClient&gt; m_automationClient;
</span><span class="cx">     std::unique_ptr&lt;API::DownloadClient&gt; m_downloadClient;
</span><span class="cx">     std::unique_ptr&lt;API::LegacyContextHistoryClient&gt; m_historyClient;
</span><ins>+#if USE(SOUP)
+    std::unique_ptr&lt;API::CustomProtocolManagerClient&gt; m_customProtocolManagerClient;
+#endif
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;WebAutomationSession&gt; m_automationSession;
</span><span class="cx"> 
</span><span class="lines">@@ -499,7 +510,7 @@
</span><span class="cx">     WebContextSupplementMap m_supplements;
</span><span class="cx"> 
</span><span class="cx"> #if USE(SOUP)
</span><del>-    HTTPCookieAcceptPolicy m_initialHTTPCookieAcceptPolicy;
</del><ins>+    HTTPCookieAcceptPolicy m_initialHTTPCookieAcceptPolicy { HTTPCookieAcceptPolicyOnlyFromMainDocumentDomain };
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="lines">@@ -530,6 +541,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(SOUP)
</span><span class="cx">     bool m_ignoreTLSErrors { true };
</span><ins>+    HashSet&lt;String, ASCIICaseInsensitiveHash&gt; m_urlSchemesRegisteredForCustomProtocols;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     bool m_memoryCacheDisabled;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflRequestManagerClientEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -26,52 +26,60 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;RequestManagerClientEfl.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;APICustomProtocolManagerClient.h&quot;
+#include &quot;CustomProtocolManagerProxy.h&quot;
</ins><span class="cx"> #include &quot;ewk_context_private.h&quot;
</span><span class="cx"> #include &quot;ewk_url_scheme_request_private.h&quot;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-static inline RequestManagerClientEfl* toRequestManagerClientEfl(const void* clientInfo)
-{
-    return static_cast&lt;RequestManagerClientEfl*&gt;(const_cast&lt;void*&gt;(clientInfo));
-}
</del><ins>+class CustomProtocolManagerClient final : public API::CustomProtocolManagerClient {
+public:
+    explicit CustomProtocolManagerClient(RequestManagerClientEfl* client)
+        : m_client(client)
+    {
+    }
</ins><span class="cx"> 
</span><del>-RequestManagerClientEfl::RequestManagerClientEfl(WKContextRef context)
-{
-    m_requestManager = toAPI(toImpl(context)-&gt;supplement&lt;WebSoupCustomProtocolRequestManager&gt;());
-    ASSERT(m_requestManager);
</del><ins>+private:
+    bool startLoading(CustomProtocolManagerProxy&amp; manager, uint64_t customProtocolID, const WebCore::ResourceRequest&amp; resourceRequest) override
+    {
+        auto urlRequest = API::URLRequest::create(resourceRequest);
+        RefPtr&lt;EwkUrlSchemeRequest&gt; request = EwkUrlSchemeRequest::create(manager, urlRequest.ptr(), customProtocolID);
+        String scheme(String::fromUTF8(request.get()-&gt;scheme()));
+        RefPtr&lt;WebKitURISchemeHandler&gt; handler = (m_client-&gt;m_uriSchemeHandlers).get(scheme);
+        ASSERT(handler.get());
+        if (!handler-&gt;hasCallback())
+            return true;
</ins><span class="cx"> 
</span><del>-    WKSoupCustomProtocolRequestManagerClientV0 wkRequestManagerClient;
-    memset(&amp;wkRequestManagerClient, 0, sizeof(WKSoupCustomProtocolRequestManagerClientV0));
</del><ins>+        (m_client-&gt;m_uriSchemeRequests).set(customProtocolID, request);
+        handler-&gt;performCallback(request.get());
+        return true;
+    }
</ins><span class="cx"> 
</span><del>-    wkRequestManagerClient.base.version = 0;
-    wkRequestManagerClient.base.clientInfo = this;
-    wkRequestManagerClient.startLoading = startLoading;
-    wkRequestManagerClient.stopLoading = stopLoading;
</del><ins>+    void stopLoading(CustomProtocolManagerProxy&amp;, uint64_t customProtocolID) override
+    {
+        (m_client-&gt;m_uriSchemeRequests).remove(customProtocolID);
+    }
</ins><span class="cx"> 
</span><del>-    WKSoupCustomProtocolRequestManagerSetClient(m_requestManager.get(), &amp;wkRequestManagerClient.base);
-}
</del><ins>+    void invalidate(CustomProtocolManagerProxy&amp; manager) override
+    {
+        Vector&lt;RefPtr&lt;EwkUrlSchemeRequest&gt;&gt; requests;
+        copyValuesToVector(m_client-&gt;m_uriSchemeRequests, requests);
+        for (auto&amp; request : requests) {
+            if (request-&gt;manager() == &amp;manager) {
+                request-&gt;invalidate();
+                stopLoading(manager, request-&gt;id());
+            }
+        }
+    }
</ins><span class="cx"> 
</span><del>-void RequestManagerClientEfl::startLoading(WKSoupCustomProtocolRequestManagerRef manager, uint64_t customProtocolID, WKURLRequestRef requestRef, const void* clientInfo)
-{
-    RequestManagerClientEfl* client = toRequestManagerClientEfl(clientInfo);
-    RefPtr&lt;EwkUrlSchemeRequest&gt; request = EwkUrlSchemeRequest::create(manager, toImpl(requestRef), customProtocolID);
-    String scheme(String::fromUTF8(request.get()-&gt;scheme()));
-    RefPtr&lt;WebKitURISchemeHandler&gt; handler = (client-&gt;m_uriSchemeHandlers).get(scheme);
-    ASSERT(handler.get());
-    if (!handler-&gt;hasCallback())
-        return;
</del><ins>+    RequestManagerClientEfl* m_client;
+};
</ins><span class="cx"> 
</span><del>-    (client-&gt;m_uriSchemeRequests).set(customProtocolID, request);
-    handler-&gt;performCallback(request.get());
-}
-
-void RequestManagerClientEfl::stopLoading(WKSoupCustomProtocolRequestManagerRef manager, uint64_t customProtocolID, const void* clientInfo)
</del><ins>+RequestManagerClientEfl::RequestManagerClientEfl(WKContextRef context)
</ins><span class="cx"> {
</span><del>-    UNUSED_PARAM(manager);
-
-    RequestManagerClientEfl* client = toRequestManagerClientEfl(clientInfo);
-    (client-&gt;m_uriSchemeRequests).remove(customProtocolID);
</del><ins>+    m_processPool = toImpl(context);
+    m_processPool-&gt;setCustomProtocolManagerClient(std::make_unique&lt;CustomProtocolManagerClient&gt;(this));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RequestManagerClientEfl::registerURLSchemeHandler(const String&amp; scheme, Ewk_Url_Scheme_Request_Cb callback, void* userData)
</span><span class="lines">@@ -79,8 +87,9 @@
</span><span class="cx">     ASSERT(callback);
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;WebKitURISchemeHandler&gt; handler = adoptRef(new WebKitURISchemeHandler(callback, userData));
</span><del>-    m_uriSchemeHandlers.set(scheme, handler);
-    toImpl(m_requestManager.get())-&gt;registerSchemeForCustomProtocol(scheme);
</del><ins>+    auto addResult = m_uriSchemeHandlers.set(scheme, handler);
+    if (addResult.isNewEntry)
+        m_processPool-&gt;registerSchemeForCustomProtocol(scheme);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflRequestManagerClientEflh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.h (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.h        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/efl/RequestManagerClientEfl.h        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #define RequestManagerClientEfl_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;WebProcessPool.h&quot;
</span><del>-#include &quot;WebSoupCustomProtocolRequestManager.h&quot;
</del><span class="cx"> #include &quot;ewk_context_private.h&quot;
</span><span class="cx"> #include &quot;ewk_url_scheme_request_private.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -38,6 +37,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><ins>+class CustomProtocolManagerClient;
+
</ins><span class="cx"> class WebKitURISchemeHandler: public RefCounted&lt;WebKitURISchemeHandler&gt; {
</span><span class="cx"> public:
</span><span class="cx">     WebKitURISchemeHandler()
</span><span class="lines">@@ -79,10 +80,9 @@
</span><span class="cx">     void registerURLSchemeHandler(const String&amp; scheme, Ewk_Url_Scheme_Request_Cb callback, void* userData);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    static void startLoading(WKSoupCustomProtocolRequestManagerRef, uint64_t customProtocolID, WKURLRequestRef, const void* clientInfo);
-    static void stopLoading(WKSoupCustomProtocolRequestManagerRef, uint64_t customProtocolID, const void* clientInfo);
</del><ins>+    friend class CustomProtocolManagerClient;
</ins><span class="cx"> 
</span><del>-    WKRetainPtr&lt;WKSoupCustomProtocolRequestManagerRef&gt; m_requestManager;
</del><ins>+    WebProcessPool* m_processPool;
</ins><span class="cx">     URISchemeHandlerMap m_uriSchemeHandlers;
</span><span class="cx">     URISchemeRequestMap m_uriSchemeRequests;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflWebProcessPoolEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/WebProcessPoolEfl.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/WebProcessPoolEfl.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/efl/WebProcessPoolEfl.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -32,7 +32,6 @@
</span><span class="cx"> #include &quot;WebInspectorServer.h&quot;
</span><span class="cx"> #include &quot;WebProcessCreationParameters.h&quot;
</span><span class="cx"> #include &quot;WebProcessMessages.h&quot;
</span><del>-#include &quot;WebSoupCustomProtocolRequestManager.h&quot;
</del><span class="cx"> #include &lt;Efreet.h&gt;
</span><span class="cx"> #include &lt;WebCore/ApplicationCacheStorage.h&gt;
</span><span class="cx"> #include &lt;WebCore/IconDatabase.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebProcessPoolGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebProcessPoolGtk.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> #include &quot;WebInspectorServer.h&quot;
</span><span class="cx"> #include &quot;WebProcessCreationParameters.h&quot;
</span><span class="cx"> #include &quot;WebProcessMessages.h&quot;
</span><del>-#include &quot;WebSoupCustomProtocolRequestManager.h&quot;
</del><span class="cx"> #include &lt;WebCore/FileSystem.h&gt;
</span><span class="cx"> #include &lt;WebCore/NotImplemented.h&gt;
</span><span class="cx"> #include &lt;WebCore/SchemeRegistry.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesssoupWebProcessPoolSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/soup/WebProcessPoolSoup.cpp (208958 => 208959)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/soup/WebProcessPoolSoup.cpp        2016-11-22 06:30:33 UTC (rev 208958)
+++ trunk/Source/WebKit2/UIProcess/soup/WebProcessPoolSoup.cpp        2016-11-22 07:49:55 UTC (rev 208959)
</span><span class="lines">@@ -26,10 +26,10 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;WebProcessPool.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;APICustomProtocolManagerClient.h&quot;
</ins><span class="cx"> #include &quot;NetworkProcessCreationParameters.h&quot;
</span><span class="cx"> #include &quot;NetworkProcessMessages.h&quot;
</span><span class="cx"> #include &quot;WebCookieManagerProxy.h&quot;
</span><del>-#include &quot;WebSoupCustomProtocolRequestManager.h&quot;
</del><span class="cx"> #include &lt;WebCore/Language.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -40,7 +40,8 @@
</span><span class="cx">     parameters.cookieAcceptPolicy = m_initialHTTPCookieAcceptPolicy;
</span><span class="cx">     parameters.ignoreTLSErrors = m_ignoreTLSErrors;
</span><span class="cx">     parameters.languages = WebCore::userPreferredLanguages();
</span><del>-    parameters.urlSchemesRegisteredForCustomProtocols = supplement&lt;WebSoupCustomProtocolRequestManager&gt;()-&gt;registeredSchemesForCustomProtocols();
</del><ins>+    for (const auto&amp; scheme : m_urlSchemesRegisteredForCustomProtocols)
+        parameters.urlSchemesRegisteredForCustomProtocols.append(scheme);
</ins><span class="cx">     parameters.shouldEnableNetworkCacheEfficacyLogging = false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -51,4 +52,12 @@
</span><span class="cx">         networkProcess()-&gt;send(Messages::NetworkProcess::SetIgnoreTLSErrors(m_ignoreTLSErrors), 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebProcessPool::setCustomProtocolManagerClient(std::unique_ptr&lt;API::CustomProtocolManagerClient&gt;&amp;&amp; customProtocolManagerClient)
+{
+    if (!customProtocolManagerClient)
+        m_customProtocolManagerClient = std::make_unique&lt;API::CustomProtocolManagerClient&gt;();
+    else
+        m_customProtocolManagerClient = WTFMove(customProtocolManagerClient);
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre>
</div>
</div>

</body>
</html>