<!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>[174584] 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/174584">174584</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-10-10 05:49:57 -0700 (Fri, 10 Oct 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[SOUP] Remove custom URI schemes implementation
https://bugs.webkit.org/show_bug.cgi?id=128169
Patch by Pascal Jacquemart <p.jacquemart@samsung.com> on 2014-10-10
Reviewed by Carlos Garcia Campos.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/C/soup/WKAPICastSoup.h:
* UIProcess/API/C/soup/WKContextSoup.cpp: Removed.
* UIProcess/API/C/soup/WKSoupRequestManager.cpp: Removed.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveURIRequest): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/soup/WebSoupRequestManagerClient.cpp: Removed.
* UIProcess/soup/WebSoupRequestManagerProxy.cpp: Removed.
* UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Removed.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
* WebProcess/soup/WebKitSoupRequestGeneric.cpp:
(webkitSoupRequestGenericSendAsync):
(webkitSoupRequestGenericSendFinish):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess):
* WebProcess/soup/WebSoupRequestManager.cpp: Removed.
* WebProcess/soup/WebSoupRequestManager.messages.in: Removed.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParameterscpp">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebProcessCreationParametersh">trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICsoupWKAPICastSouph">trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebContextcpp">trunk/Source/WebKit2/UIProcess/WebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcesssoupWebKitSoupRequestGenericcpp">trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcesssoupWebProcessSoupcpp">trunk/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPICsoupWKContextSoupcpp">trunk/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICsoupWKSoupRequestManagercpp">trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcesssoupWebSoupRequestManagerClientcpp">trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcesssoupWebSoupRequestManagerProxycpp">trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcesssoupWebSoupRequestManagerProxymessagesin">trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcesssoupWebSoupRequestManagercpp">trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcesssoupWebSoupRequestManagermessagesin">trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.messages.in</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/ChangeLog        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2014-10-10 Pascal Jacquemart <p.jacquemart@samsung.com>
+
+ [SOUP] Remove custom URI schemes implementation
+ https://bugs.webkit.org/show_bug.cgi?id=128169
+
+ Reviewed by Carlos Garcia Campos.
+
+ * Shared/WebProcessCreationParameters.cpp:
+ (WebKit::WebProcessCreationParameters::encode):
+ (WebKit::WebProcessCreationParameters::decode):
+ * Shared/WebProcessCreationParameters.h:
+ * UIProcess/API/C/soup/WKAPICastSoup.h:
+ * UIProcess/API/C/soup/WKContextSoup.cpp: Removed.
+ * UIProcess/API/C/soup/WKSoupRequestManager.cpp: Removed.
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::WebContext):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::didReceiveURIRequest): Deleted.
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * UIProcess/soup/WebSoupRequestManagerClient.cpp: Removed.
+ * UIProcess/soup/WebSoupRequestManagerProxy.cpp: Removed.
+ * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Removed.
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::WebProcess):
+ * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
+ (webkitSoupRequestGenericSendAsync):
+ (webkitSoupRequestGenericSendFinish):
+ * WebProcess/soup/WebProcessSoup.cpp:
+ (WebKit::WebProcess::platformInitializeWebProcess):
+ * WebProcess/soup/WebSoupRequestManager.cpp: Removed.
+ * WebProcess/soup/WebSoupRequestManager.messages.in: Removed.
+
</ins><span class="cx"> 2014-10-09 Dean Jackson <dino@apple.com>
</span><span class="cx">
</span><span class="cx"> Remove ENABLE_CSS3_CONDITIONAL_RULES
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -88,9 +88,6 @@
</span><span class="cx"> encoder << urlSchemesRegisteredForCustomProtocols;
</span><span class="cx"> #endif
</span><span class="cx"> #if USE(SOUP)
</span><del>-#if !ENABLE(CUSTOM_PROTOCOLS)
- encoder << urlSchemesRegistered;
-#endif
</del><span class="cx"> encoder << cookiePersistentStoragePath;
</span><span class="cx"> encoder << cookiePersistentStorageType;
</span><span class="cx"> encoder.encodeEnum(cookieAcceptPolicy);
</span><span class="lines">@@ -200,10 +197,6 @@
</span><span class="cx"> return false;
</span><span class="cx"> #endif
</span><span class="cx"> #if USE(SOUP)
</span><del>-#if !ENABLE(CUSTOM_PROTOCOLS)
- if (!decoder.decode(parameters.urlSchemesRegistered))
- return false;
-#endif
</del><span class="cx"> if (!decoder.decode(parameters.cookiePersistentStoragePath))
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(parameters.cookiePersistentStorageType))
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebProcessCreationParametersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -95,9 +95,6 @@
</span><span class="cx"> Vector<String> urlSchemesRegisteredForCustomProtocols;
</span><span class="cx"> #endif
</span><span class="cx"> #if USE(SOUP)
</span><del>-#if !ENABLE(CUSTOM_PROTOCOLS)
- Vector<String> urlSchemesRegistered;
-#endif
</del><span class="cx"> String cookiePersistentStoragePath;
</span><span class="cx"> uint32_t cookiePersistentStorageType;
</span><span class="cx"> HTTPCookieAcceptPolicy cookieAcceptPolicy;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICsoupWKAPICastSouph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -37,8 +37,6 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CUSTOM_PROTOCOLS)
</span><span class="cx"> WK_ADD_API_MAPPING(WKSoupCustomProtocolRequestManagerRef, WebSoupCustomProtocolRequestManager)
</span><del>-#else
-WK_ADD_API_MAPPING(WKSoupRequestManagerRef, WebSoupRequestManagerProxy)
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICsoupWKContextSoupcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,41 +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.
- */
-
-#include "config.h"
-#include "WKContextSoup.h"
-
-#include "WKAPICast.h"
-#include "WebContext.h"
-
-// Supplements
-#include "WebSoupRequestManagerProxy.h"
-
-using namespace WebKit;
-
-WKSoupRequestManagerRef WKContextGetSoupRequestManager(WKContextRef contextRef)
-{
- return toAPI(toImpl(contextRef)->supplement<WebSoupRequestManagerProxy>());
-}
-
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICsoupWKSoupRequestManagercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,57 +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.
- */
-
-#include "config.h"
-#include "WKSoupRequestManager.h"
-
-#include "WKAPICast.h"
-#include "WebSoupRequestManagerProxy.h"
-
-using namespace WebKit;
-
-WKTypeID WKSoupRequestManagerGetTypeID()
-{
- return toAPI(WebSoupRequestManagerProxy::APIType);
-}
-
-void WKSoupRequestManagerSetClient(WKSoupRequestManagerRef soupRequestManagerRef, const WKSoupRequestManagerClientBase* wkClient)
-{
- toImpl(soupRequestManagerRef)->initializeClient(wkClient);
-}
-
-void WKSoupRequestManagerRegisterURIScheme(WKSoupRequestManagerRef soupRequestManagerRef, WKStringRef schemeRef)
-{
- toImpl(soupRequestManagerRef)->registerURIScheme(toWTFString(schemeRef));
-}
-
-void WKSoupRequestManagerDidHandleURIRequest(WKSoupRequestManagerRef soupRequestManagerRef, WKDataRef data, uint64_t contentLength, WKStringRef mimeTypeRef, uint64_t requestID)
-{
- toImpl(soupRequestManagerRef)->didHandleURIRequest(toImpl(data), contentLength, toWTFString(mimeTypeRef), requestID);
-}
-
-void WKSoupRequestManagerDidReceiveURIRequestData(WKSoupRequestManagerRef soupRequestManagerRef, WKDataRef data, uint64_t requestID)
-{
- toImpl(soupRequestManagerRef)->didReceiveURIRequestData(toImpl(data), requestID);
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -99,13 +99,9 @@
</span><span class="cx"> #include <JavaScriptCore/RemoteInspector.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if USE(SOUP)
-#if ENABLE(CUSTOM_PROTOCOLS)
</del><ins>+#if USE(SOUP) && ENABLE(CUSTOM_PROTOCOLS)
</ins><span class="cx"> #include "WebSoupCustomProtocolRequestManager.h"
</span><del>-#else
-#include "WebSoupRequestManagerProxy.h"
</del><span class="cx"> #endif
</span><del>-#endif
</del><span class="cx">
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> #include <wtf/RefCountedLeakCounter.h>
</span><span class="lines">@@ -209,13 +205,9 @@
</span><span class="cx"> #if ENABLE(SQL_DATABASE)
</span><span class="cx"> addSupplement<WebDatabaseManagerProxy>();
</span><span class="cx"> #endif
</span><del>-#if USE(SOUP)
-#if ENABLE(CUSTOM_PROTOCOLS)
</del><ins>+#if USE(SOUP) && ENABLE(CUSTOM_PROTOCOLS)
</ins><span class="cx"> addSupplement<WebSoupCustomProtocolRequestManager>();
</span><del>-#else
- addSupplement<WebSoupRequestManagerProxy>();
</del><span class="cx"> #endif
</span><del>-#endif
</del><span class="cx"> #if ENABLE(BATTERY_STATUS)
</span><span class="cx"> addSupplement<WebBatteryManagerProxy>();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -113,10 +113,6 @@
</span><span class="cx"> #include "ArgumentCodersGtk.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if USE(SOUP) && !ENABLE(CUSTOM_PROTOCOLS)
-#include "WebSoupRequestManagerProxy.h"
-#endif
-
</del><span class="cx"> #if ENABLE(VIBRATION)
</span><span class="cx"> #include "WebVibrationProxy.h"
</span><span class="cx"> #endif
</span><span class="lines">@@ -5043,13 +5039,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if USE(SOUP) && !ENABLE(CUSTOM_PROTOCOLS)
-void WebPageProxy::didReceiveURIRequest(String uriString, uint64_t requestID)
-{
- m_process->context().supplement<WebSoupRequestManagerProxy>()->didReceiveURIRequest(uriString, this, requestID);
-}
-#endif
-
</del><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx"> void WebPageProxy::setComposition(const String& text, Vector<CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1253,10 +1253,6 @@
</span><span class="cx"> void notifyRevealedSelection();
</span><span class="cx"> #endif // PLATFORM(IOS)
</span><span class="cx">
</span><del>-#if USE(SOUP) && !ENABLE(CUSTOM_PROTOCOLS)
- void didReceiveURIRequest(String uriString, uint64_t requestID);
-#endif
-
</del><span class="cx"> void clearLoadDependentCallbacks();
</span><span class="cx">
</span><span class="cx"> void performDragControllerAction(DragControllerAction, WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -366,13 +366,6 @@
</span><span class="cx"> SaveRecentSearches(String name, Vector<String> searchItems)
</span><span class="cx"> LoadRecentSearches(String name) -> (Vector<String> result)
</span><span class="cx">
</span><del>-#if USE(SOUP)
-#if !ENABLE(CUSTOM_PROTOCOLS)
- # Soup custom URI request messages
- DidReceiveURIRequest(String uriString, uint64_t requestID);
-#endif
-#endif
-
</del><span class="cx"> SavePDFToFileInDownloadsFolder(String suggestedFilename, String originatingURLString, IPC::DataReference data)
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesssoupWebSoupRequestManagerClientcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,42 +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 "config.h"
-#include "WebSoupRequestManagerClient.h"
-
-#include "WKAPICast.h"
-
-namespace WebKit {
-
-bool WebSoupRequestManagerClient::didReceiveURIRequest(WebSoupRequestManagerProxy* soupRequestManager, API::URL* url, WebPageProxy* initiaingPage, uint64_t requestID)
-{
- if (!m_client.didReceiveURIRequest)
- return false;
-
- m_client.didReceiveURIRequest(toAPI(soupRequestManager), toAPI(url), toAPI(initiaingPage), requestID, m_client.base.clientInfo);
- return true;
-}
-
-void WebSoupRequestManagerClient::didFailToLoadURIRequest(WebSoupRequestManagerProxy* soupRequestManager, uint64_t requestID)
-{
- if (m_client.didFailToLoadURIRequest)
- m_client.didFailToLoadURIRequest(toAPI(soupRequestManager), requestID, m_client.base.clientInfo);
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcesssoupWebSoupRequestManagerProxycpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,128 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * 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 "config.h"
-#include "WebSoupRequestManagerProxy.h"
-
-#include "APIData.h"
-#include "WebContext.h"
-#include "WebSoupRequestManagerMessages.h"
-#include "WebSoupRequestManagerProxyMessages.h"
-
-namespace WebKit {
-
-const char* WebSoupRequestManagerProxy::supplementName()
-{
- return "WebSoupRequestManagerProxy";
-}
-
-PassRefPtr<WebSoupRequestManagerProxy> WebSoupRequestManagerProxy::create(WebContext* context)
-{
- return adoptRef(new WebSoupRequestManagerProxy(context));
-}
-
-WebSoupRequestManagerProxy::WebSoupRequestManagerProxy(WebContext* context)
- : WebContextSupplement(context)
- , m_loadFailed(false)
-{
- WebContextSupplement::context()->addMessageReceiver(Messages::WebSoupRequestManagerProxy::messageReceiverName(), *this);
-}
-
-WebSoupRequestManagerProxy::~WebSoupRequestManagerProxy()
-{
-}
-
-void WebSoupRequestManagerProxy::initializeClient(const WKSoupRequestManagerClientBase* client)
-{
- m_client.initialize(client);
-}
-
-// WebContextSupplement
-
-void WebSoupRequestManagerProxy::contextDestroyed()
-{
-}
-
-void WebSoupRequestManagerProxy::processDidClose(WebProcessProxy*)
-{
-}
-
-void WebSoupRequestManagerProxy::refWebContextSupplement()
-{
- API::Object::ref();
-}
-
-void WebSoupRequestManagerProxy::derefWebContextSupplement()
-{
- API::Object::deref();
-}
-
-void WebSoupRequestManagerProxy::registerURIScheme(const String& scheme)
-{
- if (!context())
- return;
-
- context()->sendToAllProcessesRelaunchingThemIfNecessary(Messages::WebSoupRequestManager::RegisterURIScheme(scheme));
-
- ASSERT(!m_registeredURISchemes.contains(scheme));
- m_registeredURISchemes.append(scheme);
-}
-
-void WebSoupRequestManagerProxy::didHandleURIRequest(const API::Data* requestData, uint64_t contentLength, const String& mimeType, uint64_t requestID)
-{
- if (!context())
- return;
-
- context()->sendToAllProcesses(Messages::WebSoupRequestManager::DidHandleURIRequest(requestData->dataReference(), contentLength, mimeType, requestID));
-}
-
-void WebSoupRequestManagerProxy::didReceiveURIRequestData(const API::Data* requestData, uint64_t requestID)
-{
- if (!context())
- return;
-
- if (m_loadFailed)
- return;
-
- context()->sendToAllProcesses(Messages::WebSoupRequestManager::DidReceiveURIRequestData(requestData->dataReference(), requestID));
-}
-
-void WebSoupRequestManagerProxy::didReceiveURIRequest(const String& uriString, WebPageProxy* initiaingPage, uint64_t requestID)
-{
- if (!m_client.didReceiveURIRequest(this, API::URL::create(uriString).get(), initiaingPage, requestID))
- didHandleURIRequest(API::Data::create(0, 0).get(), 0, String(), requestID);
-}
-
-void WebSoupRequestManagerProxy::didFailToLoadURIRequest(uint64_t requestID)
-{
- m_loadFailed = true;
- m_client.didFailToLoadURIRequest(this, requestID);
-}
-
-void WebSoupRequestManagerProxy::didFailURIRequest(const WebCore::ResourceError& error, uint64_t requestID)
-{
- if (!context())
- return;
-
- m_loadFailed = true;
- context()->sendToAllProcesses(Messages::WebSoupRequestManager::DidFailURIRequest(error, requestID));
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcesssoupWebSoupRequestManagerProxymessagesin"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,25 +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.
-
-messages -> WebSoupRequestManagerProxy {
- DidFailToLoadURIRequest(uint64_t requestID);
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -128,10 +128,6 @@
</span><span class="cx"> #include <JavaScriptCore/RemoteInspector.h>
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-#if USE(SOUP) && !ENABLE(CUSTOM_PROTOCOLS)
-#include "WebSoupRequestManager.h"
-#endif
-
</del><span class="cx"> using namespace JSC;
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="lines">@@ -204,9 +200,6 @@
</span><span class="cx"> #if ENABLE(BATTERY_STATUS)
</span><span class="cx"> addSupplement<WebBatteryManager>();
</span><span class="cx"> #endif
</span><del>-#if USE(SOUP) && !ENABLE(CUSTOM_PROTOCOLS)
- addSupplement<WebSoupRequestManager>();
-#endif
</del><span class="cx"> m_plugInAutoStartOriginHashes.add(SessionID::defaultSessionID(), HashMap<unsigned, double>());
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesssoupWebKitSoupRequestGenericcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -22,11 +22,6 @@
</span><span class="cx">
</span><span class="cx"> #include <wtf/text/CString.h>
</span><span class="cx">
</span><del>-#if !ENABLE(CUSTOM_PROTOCOLS)
-#include "WebProcess.h"
-#include "WebSoupRequestManager.h"
-#endif
-
</del><span class="cx"> using namespace WebKit;
</span><span class="cx">
</span><span class="cx"> G_DEFINE_TYPE(WebKitSoupRequestGeneric, webkit_soup_request_generic, SOUP_TYPE_REQUEST)
</span><span class="lines">@@ -55,8 +50,6 @@
</span><span class="cx"> CustomProtocolManagerImpl* customProtocolManager = WEBKIT_SOUP_REQUEST_GENERIC_GET_CLASS(request)->customProtocolManager;
</span><span class="cx"> ASSERT(customProtocolManager);
</span><span class="cx"> customProtocolManager->send(g_task_new(request, cancellable, callback, userData));
</span><del>-#else
- WebProcess::shared().supplement<WebSoupRequestManager>()->send(g_task_new(request, cancellable, callback, userData));
</del><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -68,7 +61,7 @@
</span><span class="cx"> ASSERT(customProtocolManager);
</span><span class="cx"> return customProtocolManager->finish(G_TASK(result), error);
</span><span class="cx"> #else
</span><del>- return WebProcess::shared().supplement<WebSoupRequestManager>()->finish(G_TASK(result), error);
</del><ins>+ return nullptr;
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesssoupWebProcessSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -44,10 +44,6 @@
</span><span class="cx"> #include <wtf/gobject/GRefPtr.h>
</span><span class="cx"> #include <wtf/gobject/GUniquePtr.h>
</span><span class="cx">
</span><del>-#if !ENABLE(CUSTOM_PROTOCOLS)
-#include "WebSoupRequestManager.h"
-#endif
-
</del><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> static uint64_t getCacheDiskFreeSize(SoupCache* cache)
</span><span class="lines">@@ -170,11 +166,6 @@
</span><span class="cx"> if (!parameters.languages.isEmpty())
</span><span class="cx"> setSoupSessionAcceptLanguage(parameters.languages);
</span><span class="cx">
</span><del>-#if !ENABLE(CUSTOM_PROTOCOLS)
- for (size_t i = 0; i < parameters.urlSchemesRegistered.size(); i++)
- supplement<WebSoupRequestManager>()->registerURIScheme(parameters.urlSchemesRegistered[i]);
-#endif
-
</del><span class="cx"> setIgnoreTLSErrors(parameters.ignoreTLSErrors);
</span><span class="cx">
</span><span class="cx"> WebCore::addLanguageChangeObserver(this, languageChanged);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcesssoupWebSoupRequestManagercpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,194 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012, 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 "config.h"
-#include "WebSoupRequestManager.h"
-
-#include "DataReference.h"
-#include "WebErrors.h"
-#include "WebKitSoupRequestGeneric.h"
-#include "WebKitSoupRequestInputStream.h"
-#include "WebPageProxyMessages.h"
-#include "WebProcess.h"
-#include "WebSoupRequestManagerMessages.h"
-#include "WebSoupRequestManagerProxyMessages.h"
-#include <WebCore/ResourceHandle.h>
-#include <WebCore/ResourceRequest.h>
-#include <WebCore/SoupNetworkSession.h>
-#include <wtf/gobject/GUniquePtr.h>
-#include <wtf/text/CString.h>
-
-namespace WebKit {
-
-static uint64_t generateSoupRequestID()
-{
- static uint64_t uniqueSoupRequestID = 1;
- return uniqueSoupRequestID++;
-}
-
-struct WebSoupRequestAsyncData {
- WebSoupRequestAsyncData(GTask* task, WebKitSoupRequestGeneric* requestGeneric)
- : task(task)
- , request(requestGeneric)
- , cancellable(g_task_get_cancellable(task))
- {
- // If the struct contains a null request, it is because the request failed.
- g_object_add_weak_pointer(G_OBJECT(request), reinterpret_cast<void**>(&request));
- }
-
- ~WebSoupRequestAsyncData()
- {
- if (request)
- g_object_remove_weak_pointer(G_OBJECT(request), reinterpret_cast<void**>(&request));
- }
-
- bool requestFailed()
- {
- return g_cancellable_is_cancelled(cancellable.get()) || !request;
- }
-
- GRefPtr<GTask> releaseTask()
- {
- GTask* returnValue = task;
- task = 0;
- return adoptGRef(returnValue);
- }
-
- GTask* task;
- WebKitSoupRequestGeneric* request;
- GRefPtr<GCancellable> cancellable;
- GRefPtr<GInputStream> stream;
-};
-
-const char* WebSoupRequestManager::supplementName()
-{
- return "WebSoupRequestManager";
-}
-
-WebSoupRequestManager::WebSoupRequestManager(WebProcess* process)
- : m_process(process)
- , m_schemes(adoptGRef(g_ptr_array_new_with_free_func(g_free)))
-{
- m_process->addMessageReceiver(Messages::WebSoupRequestManager::messageReceiverName(), *this);
-}
-
-WebSoupRequestManager::~WebSoupRequestManager()
-{
-}
-
-void WebSoupRequestManager::registerURIScheme(const String& scheme)
-{
- if (m_schemes->len)
- g_ptr_array_remove_index_fast(m_schemes.get(), m_schemes->len - 1);
- g_ptr_array_add(m_schemes.get(), g_strdup(scheme.utf8().data()));
- g_ptr_array_add(m_schemes.get(), 0);
-
- SoupSession* session = WebCore::SoupNetworkSession::defaultSession().soupSession();
- SoupRequestClass* genericRequestClass = static_cast<SoupRequestClass*>(g_type_class_ref(WEBKIT_TYPE_SOUP_REQUEST_GENERIC));
- genericRequestClass->schemes = const_cast<const char**>(reinterpret_cast<char**>(m_schemes->pdata));
- soup_session_add_feature_by_type(session, WEBKIT_TYPE_SOUP_REQUEST_GENERIC);
-}
-
-void WebSoupRequestManager::didHandleURIRequest(const IPC::DataReference& requestData, uint64_t contentLength, const String& mimeType, uint64_t requestID)
-{
- WebSoupRequestAsyncData* data = m_requestMap.get(requestID);
- ASSERT(data);
- GRefPtr<GTask> task = data->releaseTask();
- ASSERT(task.get());
-
- WebKitSoupRequestGeneric* request = WEBKIT_SOUP_REQUEST_GENERIC(g_task_get_source_object(task.get()));
- webkitSoupRequestGenericSetContentLength(request, contentLength ? contentLength : -1);
- webkitSoupRequestGenericSetContentType(request, !mimeType.isEmpty() ? mimeType.utf8().data() : 0);
-
- GInputStream* dataStream;
- if (!requestData.size()) {
- // Empty reply, just create and empty GMemoryInputStream.
- dataStream = g_memory_input_stream_new();
- m_requestMap.remove(requestID);
- } else if (requestData.size() == contentLength) {
- // We don't expect more data, so we can just create a GMemoryInputStream with all the data.
- dataStream = g_memory_input_stream_new_from_data(g_memdup(requestData.data(), requestData.size()), contentLength, g_free);
- m_requestMap.remove(requestID);
- } else {
- // We expect more data chunks from the UI process.
- dataStream = webkitSoupRequestInputStreamNew(contentLength);
- data->stream = dataStream;
- webkitSoupRequestInputStreamAddData(WEBKIT_SOUP_REQUEST_INPUT_STREAM(dataStream), requestData.data(), requestData.size());
- }
- g_task_return_pointer(task.get(), dataStream, g_object_unref);
-}
-
-void WebSoupRequestManager::didReceiveURIRequestData(const IPC::DataReference& requestData, uint64_t requestID)
-{
- WebSoupRequestAsyncData* data = m_requestMap.get(requestID);
- // The data might have been removed from the request map if a previous chunk failed
- // and a new message was sent by the UI process before being notified about the failure.
- if (!data)
- return;
- ASSERT(data->stream.get());
-
- if (data->requestFailed()) {
- // ResourceRequest failed or it was cancelled. It doesn't matter here the error or if it was cancelled,
- // because that's already handled by the resource handle client, we just want to notify the UI process
- // to stop reading data from the user input stream. If UI process already sent all the data we simply
- // finish silently.
- if (!webkitSoupRequestInputStreamFinished(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data->stream.get())))
- m_process->parentProcessConnection()->send(Messages::WebSoupRequestManagerProxy::DidFailToLoadURIRequest(requestID), 0);
- m_requestMap.remove(requestID);
-
- return;
- }
-
- webkitSoupRequestInputStreamAddData(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data->stream.get()), requestData.data(), requestData.size());
- if (webkitSoupRequestInputStreamFinished(WEBKIT_SOUP_REQUEST_INPUT_STREAM(data->stream.get())))
- m_requestMap.remove(requestID);
-}
-
-void WebSoupRequestManager::didFailURIRequest(const WebCore::ResourceError& error, uint64_t requestID)
-{
- WebSoupRequestAsyncData* data = m_requestMap.get(requestID);
- ASSERT(data);
- GRefPtr<GTask> task = data->releaseTask();
- ASSERT(task.get());
-
- g_task_return_new_error(task.get(), g_quark_from_string(error.domain().utf8().data()),
- error.errorCode(), "%s", error.localizedDescription().utf8().data());
- m_requestMap.remove(requestID);
-}
-
-void WebSoupRequestManager::send(GTask* task)
-{
- WebKitSoupRequestGeneric* request = WEBKIT_SOUP_REQUEST_GENERIC(g_task_get_source_object(task));
- SoupRequest* soupRequest = SOUP_REQUEST(request);
- GUniquePtr<char> uriString(soup_uri_to_string(soup_request_get_uri(soupRequest), FALSE));
-
- uint64_t requestID = generateSoupRequestID();
- m_requestMap.set(requestID, std::make_unique<WebSoupRequestAsyncData>(task, request));
-
- uint64_t initiatingPageID = WebCore::ResourceRequest(soupRequest).initiatingPageID();
- m_process->parentProcessConnection()->send(Messages::WebPageProxy::DidReceiveURIRequest(String::fromUTF8(uriString.get()), requestID), initiatingPageID);
-}
-
-GInputStream* WebSoupRequestManager::finish(GTask* task, GError** error)
-{
- gpointer inputStream = g_task_propagate_pointer(task, error);
- return inputStream ? G_INPUT_STREAM(inputStream) : 0;
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2WebProcesssoupWebSoupRequestManagermessagesin"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.messages.in (174583 => 174584)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.messages.in        2014-10-10 12:15:06 UTC (rev 174583)
+++ trunk/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.messages.in        2014-10-10 12:49:57 UTC (rev 174584)
</span><span class="lines">@@ -1,28 +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.
-
-messages -> WebSoupRequestManager {
- RegisterURIScheme(String uriScheme);
- DidHandleURIRequest(IPC::DataReference requestData, uint64_t contentLength, String mimeType, uint64_t requestID);
- DidReceiveURIRequestData(IPC::DataReference requestData, uint64_t requestID);
- DidFailURIRequest(WebCore::ResourceError error, uint64_t requestID);
-}
</del></span></pre>
</div>
</div>
</body>
</html>