WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Checking if we can fully remove this CUSTOM_PROTOCOLS flag
0001-Removing-CUSTOM_PROTOCOLS-compilation-switch.patch (text/plain), 63.90 KB, created by
Pascal Jacquemart
on 2014-10-09 09:37:38 PDT
(
hide
)
Description:
Checking if we can fully remove this CUSTOM_PROTOCOLS flag
Filename:
MIME Type:
Creator:
Pascal Jacquemart
Created:
2014-10-09 09:37:38 PDT
Size:
63.90 KB
patch
obsolete
>From f147552e7cae922aa801f7f4a1691d0ebcef0842 Mon Sep 17 00:00:00 2001 >From: "p.jacquemart" <p.jacquemart@samsung.com> >Date: Thu, 9 Oct 2014 17:34:42 +0100 >Subject: [PATCH] Removing CUSTOM_PROTOCOLS compilation switch > >--- > ChangeLog | 9 + > Source/WebKit2/ChangeLog | 70 +++++++ > Source/WebKit2/NetworkProcess/NetworkProcess.cpp | 2 - > .../Cocoa/CustomProtocolManagerCocoa.mm | 4 - > .../CustomProtocols/CustomProtocolManager.h | 4 - > .../CustomProtocolManager.messages.in | 4 - > .../soup/CustomProtocolManagerImpl.cpp | 4 - > .../soup/CustomProtocolManagerImpl.h | 4 - > .../soup/CustomProtocolManagerSoup.cpp | 4 - > .../Network/NetworkProcessCreationParameters.cpp | 4 - > .../Network/NetworkProcessCreationParameters.h | 2 - > .../Shared/WebProcessCreationParameters.cpp | 11 -- > .../WebKit2/Shared/WebProcessCreationParameters.h | 5 - > .../WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h | 4 - > .../WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp | 41 ----- > .../C/soup/WKSoupCustomProtocolRequestManager.cpp | 9 - > .../UIProcess/API/C/soup/WKSoupRequestManager.cpp | 57 ------ > .../CustomProtocols/CustomProtocolManagerProxy.h | 4 - > .../CustomProtocolManagerProxy.messages.in | 4 - > .../mac/CustomProtocolManagerProxyMac.mm | 4 - > .../soup/CustomProtocolManagerProxySoup.cpp | 4 - > .../soup/WebSoupCustomProtocolRequestManager.cpp | 4 - > .../soup/WebSoupCustomProtocolRequestManager.h | 4 - > .../WebSoupCustomProtocolRequestManagerClient.cpp | 4 - > .../WebSoupCustomProtocolRequestManagerClient.h | 4 - > .../UIProcess/Network/NetworkProcessProxy.cpp | 2 - > .../UIProcess/Network/NetworkProcessProxy.h | 8 +- > Source/WebKit2/UIProcess/WebContext.cpp | 17 +- > Source/WebKit2/UIProcess/WebContext.h | 3 - > Source/WebKit2/UIProcess/WebPageProxy.cpp | 11 -- > Source/WebKit2/UIProcess/WebPageProxy.h | 4 - > Source/WebKit2/UIProcess/WebPageProxy.messages.in | 7 - > Source/WebKit2/UIProcess/WebProcessProxy.cpp | 2 - > Source/WebKit2/UIProcess/WebProcessProxy.h | 8 +- > Source/WebKit2/UIProcess/mac/WebContextMac.mm | 4 - > .../UIProcess/soup/WebSoupRequestManagerClient.cpp | 42 ----- > .../UIProcess/soup/WebSoupRequestManagerProxy.cpp | 128 ------------- > .../soup/WebSoupRequestManagerProxy.messages.in | 25 --- > Source/WebKit2/WebKit2Prefix.h | 3 - > Source/WebKit2/WebProcess/WebProcess.cpp | 11 -- > .../WebProcess/soup/WebKitSoupRequestGeneric.cpp | 13 -- > .../WebProcess/soup/WebKitSoupRequestGeneric.h | 8 +- > Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp | 9 - > .../WebProcess/soup/WebSoupRequestManager.cpp | 194 -------------------- > .../soup/WebSoupRequestManager.messages.in | 28 --- > Source/cmake/OptionsEfl.cmake | 1 - > 46 files changed, 84 insertions(+), 714 deletions(-) > delete mode 100644 Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp > delete mode 100644 Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.cpp > delete mode 100644 Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp > delete mode 100644 Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp > delete mode 100644 Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in > delete mode 100644 Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp > delete mode 100644 Source/WebKit2/WebProcess/soup/WebSoupRequestManager.messages.in > >diff --git a/ChangeLog b/ChangeLog >index 1bf54d2..0216207 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,12 @@ >+2014-10-09 Pascal Jacquemart <p.jacquemart@samsung.com> >+ >+ Removing CUSTOM_PROTOCOLS compilation flag >+ https://bugs.webkit.org/show_bug.cgi?id=128169 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Source/cmake/OptionsEfl.cmake: >+ > 2014-10-07 Pascal Jacquemart <p.jacquemart@samsung.com> > > [EFL] Enable custom URI schemes with CustomProtocols >diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog >index a2e2b96b..ec2a20a 100644 >--- a/Source/WebKit2/ChangeLog >+++ b/Source/WebKit2/ChangeLog >@@ -1,3 +1,73 @@ >+2014-10-09 Pascal Jacquemart <p.jacquemart@samsung.com> >+ >+ Removing CUSTOM_PROTOCOLS compilation flag >+ https://bugs.webkit.org/show_bug.cgi?id=128169 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * NetworkProcess/NetworkProcess.cpp: >+ (WebKit::NetworkProcess::NetworkProcess): >+ * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm: >+ * Shared/Network/CustomProtocols/CustomProtocolManager.h: >+ * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: >+ * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp: >+ * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h: >+ * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp: >+ * Shared/Network/NetworkProcessCreationParameters.cpp: >+ (WebKit::NetworkProcessCreationParameters::encode): >+ (WebKit::NetworkProcessCreationParameters::decode): >+ * Shared/Network/NetworkProcessCreationParameters.h: >+ * 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/WKSoupCustomProtocolRequestManager.cpp: >+ (WKSoupCustomProtocolRequestManagerGetTypeID): >+ (WKSoupCustomProtocolRequestManagerSetClient): >+ * UIProcess/API/C/soup/WKSoupRequestManager.cpp: Removed. >+ * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h: >+ * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in: >+ * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm: >+ * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp: >+ * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp: >+ * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h: >+ * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp: >+ * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h: >+ * UIProcess/Network/NetworkProcessProxy.cpp: >+ (WebKit::NetworkProcessProxy::NetworkProcessProxy): >+ * UIProcess/Network/NetworkProcessProxy.h: >+ * UIProcess/WebContext.cpp: >+ (WebKit::WebContext::WebContext): >+ (WebKit::WebContext::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers): >+ (WebKit::WebContext::unregisterSchemeForCustomProtocol): >+ * UIProcess/WebContext.h: >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::didReceiveURIRequest): Deleted. >+ * UIProcess/WebPageProxy.h: >+ * UIProcess/WebPageProxy.messages.in: >+ * UIProcess/WebProcessProxy.cpp: >+ (WebKit::WebProcessProxy::WebProcessProxy): >+ * UIProcess/WebProcessProxy.h: >+ * UIProcess/mac/WebContextMac.mm: >+ (WebKit::WebContext::platformInitializeWebProcess): >+ (WebKit::WebContext::platformInitializeNetworkProcess): >+ * UIProcess/soup/WebSoupRequestManagerClient.cpp: Removed. >+ * UIProcess/soup/WebSoupRequestManagerProxy.cpp: Removed. >+ * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Removed. >+ * WebKit2Prefix.h: >+ * WebProcess/WebProcess.cpp: >+ (WebKit::WebProcess::WebProcess): >+ * WebProcess/soup/WebKitSoupRequestGeneric.cpp: >+ (webkitSoupRequestGenericSendAsync): >+ (webkitSoupRequestGenericSendFinish): >+ * WebProcess/soup/WebKitSoupRequestGeneric.h: >+ * WebProcess/soup/WebProcessSoup.cpp: >+ (WebKit::WebProcess::platformInitializeWebProcess): >+ * WebProcess/soup/WebSoupRequestManager.cpp: Removed. >+ * WebProcess/soup/WebSoupRequestManager.messages.in: Removed. >+ > 2014-10-08 Carlos Garcia Campos <cgarcia@igalia.com> > > [GTK] Use the PageLoadState observer also to monitor title and estimated load progress >diff --git a/Source/WebKit2/NetworkProcess/NetworkProcess.cpp b/Source/WebKit2/NetworkProcess/NetworkProcess.cpp >index 13e64c5..a8dd78b 100644 >--- a/Source/WebKit2/NetworkProcess/NetworkProcess.cpp >+++ b/Source/WebKit2/NetworkProcess/NetworkProcess.cpp >@@ -76,9 +76,7 @@ NetworkProcess::NetworkProcess() > > addSupplement<AuthenticationManager>(); > addSupplement<WebCookieManager>(); >-#if ENABLE(CUSTOM_PROTOCOLS) > addSupplement<CustomProtocolManager>(); >-#endif > } > > NetworkProcess::~NetworkProcess() >diff --git a/Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm b/Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm >index ffb4d1e..3e43e2b 100644 >--- a/Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm >+++ b/Source/WebKit2/Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm >@@ -26,8 +26,6 @@ > #import "config.h" > #import "CustomProtocolManager.h" > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > #import "ChildProcess.h" > #import "CustomProtocolManagerMessages.h" > #import "CustomProtocolManagerProxyMessages.h" >@@ -274,5 +272,3 @@ RetainPtr<WKCustomProtocol> CustomProtocolManager::protocolForID(uint64_t custom > } > > } // namespace WebKit >- >-#endif // ENABLE(CUSTOM_PROTOCOLS) >diff --git a/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h b/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h >index f4b9646..802372b 100644 >--- a/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h >+++ b/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.h >@@ -26,8 +26,6 @@ > #ifndef CustomProtocolManager_h > #define CustomProtocolManager_h > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > #include "Connection.h" > #include "NetworkProcessSupplement.h" > #include "WebProcessSupplement.h" >@@ -119,6 +117,4 @@ private: > > } // namespace WebKit > >-#endif // ENABLE(CUSTOM_PROTOCOLS) >- > #endif // CustomProtocolManager_h >diff --git a/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.messages.in b/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.messages.in >index 2376d92..45d081a 100644 >--- a/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.messages.in >+++ b/Source/WebKit2/Shared/Network/CustomProtocols/CustomProtocolManager.messages.in >@@ -20,8 +20,6 @@ > # 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. > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > messages -> CustomProtocolManager { > DidFailWithError(uint64_t customProtocolID, WebCore::ResourceError error) > DidLoadData(uint64_t customProtocolID, IPC::DataReference data) >@@ -31,5 +29,3 @@ messages -> CustomProtocolManager { > RegisterScheme(String name) > UnregisterScheme(String name) > } >- >-#endif // ENABLE(CUSTOM_PROTOCOLS) >diff --git a/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp b/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp >index 98c55e1..a383be8 100644 >--- a/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp >+++ b/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp >@@ -20,8 +20,6 @@ > #include "config.h" > #include "CustomProtocolManagerImpl.h" > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > #include "ChildProcess.h" > #include "CustomProtocolManagerProxyMessages.h" > #include "DataReference.h" >@@ -203,5 +201,3 @@ GInputStream* CustomProtocolManagerImpl::finish(GTask* task, GError** error) > } > > } // namespace WebKit >- >-#endif // ENABLE(CUSTOM_PROTOCOLS) >diff --git a/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h b/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h >index 1d44241..e65fd12 100644 >--- a/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h >+++ b/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h >@@ -20,8 +20,6 @@ > #ifndef CustomProtocolManagerImpl_h > #define CustomProtocolManagerImpl_h > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > #include <wtf/HashMap.h> > #include <wtf/gobject/GRefPtr.h> > #include <wtf/text/WTFString.h> >@@ -69,6 +67,4 @@ private: > > } // namespace WebKit > >-#endif // ENABLE(CUSTOM_PROTOCOLS) >- > #endif // CustomProtocolManagerImpl_h >diff --git a/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp b/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp >index 6b71ac0..52468e6 100644 >--- a/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp >+++ b/Source/WebKit2/Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp >@@ -20,8 +20,6 @@ > #include "config.h" > #include "CustomProtocolManager.h" > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > #include "ChildProcess.h" > #include "CustomProtocolManagerImpl.h" > #include "CustomProtocolManagerMessages.h" >@@ -109,5 +107,3 @@ void CustomProtocolManager::didFinishLoading(uint64_t customProtocolID) > } > > } // namespace WebKit >- >-#endif // ENABLE(CUSTOM_PROTOCOLS) >diff --git a/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp b/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp >index 5fa3032..39cb7c2 100644 >--- a/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp >+++ b/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.cpp >@@ -50,9 +50,7 @@ void NetworkProcessCreationParameters::encode(IPC::ArgumentEncoder& encoder) con > encoder << parentBundleDirectoryExtensionHandle; > #endif > encoder << shouldUseTestingNetworkSession; >-#if ENABLE(CUSTOM_PROTOCOLS) > encoder << urlSchemesRegisteredForCustomProtocols; >-#endif > #if PLATFORM(COCOA) > encoder << parentProcessName; > encoder << uiProcessBundleIdentifier; >@@ -94,10 +92,8 @@ bool NetworkProcessCreationParameters::decode(IPC::ArgumentDecoder& decoder, Net > #endif > if (!decoder.decode(result.shouldUseTestingNetworkSession)) > return false; >-#if ENABLE(CUSTOM_PROTOCOLS) > if (!decoder.decode(result.urlSchemesRegisteredForCustomProtocols)) > return false; >-#endif > #if PLATFORM(COCOA) > if (!decoder.decode(result.parentProcessName)) > return false; >diff --git a/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h b/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h >index 3a0f4cd1..38884cd 100644 >--- a/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h >+++ b/Source/WebKit2/Shared/Network/NetworkProcessCreationParameters.h >@@ -69,9 +69,7 @@ struct NetworkProcessCreationParameters { > #endif > bool shouldUseTestingNetworkSession; > >-#if ENABLE(CUSTOM_PROTOCOLS) > Vector<String> urlSchemesRegisteredForCustomProtocols; >-#endif > > #if PLATFORM(COCOA) > String parentProcessName; >diff --git a/Source/WebKit2/Shared/WebProcessCreationParameters.cpp b/Source/WebKit2/Shared/WebProcessCreationParameters.cpp >index 1d8f987..da713bd 100644 >--- a/Source/WebKit2/Shared/WebProcessCreationParameters.cpp >+++ b/Source/WebKit2/Shared/WebProcessCreationParameters.cpp >@@ -84,13 +84,8 @@ void WebProcessCreationParameters::encode(IPC::ArgumentEncoder& encoder) const > #if ENABLE(CACHE_PARTITIONING) > encoder << urlSchemesRegisteredAsCachePartitioned; > #endif >-#if ENABLE(CUSTOM_PROTOCOLS) > encoder << urlSchemesRegisteredForCustomProtocols; >-#endif > #if USE(SOUP) >-#if !ENABLE(CUSTOM_PROTOCOLS) >- encoder << urlSchemesRegistered; >-#endif > encoder << cookiePersistentStoragePath; > encoder << cookiePersistentStorageType; > encoder.encodeEnum(cookieAcceptPolicy); >@@ -195,15 +190,9 @@ bool WebProcessCreationParameters::decode(IPC::ArgumentDecoder& decoder, WebProc > if (!decoder.decode(parameters.urlSchemesRegisteredAsCachePartitioned)) > return false; > #endif >-#if ENABLE(CUSTOM_PROTOCOLS) > if (!decoder.decode(parameters.urlSchemesRegisteredForCustomProtocols)) > return false; >-#endif > #if USE(SOUP) >-#if !ENABLE(CUSTOM_PROTOCOLS) >- if (!decoder.decode(parameters.urlSchemesRegistered)) >- return false; >-#endif > if (!decoder.decode(parameters.cookiePersistentStoragePath)) > return false; > if (!decoder.decode(parameters.cookiePersistentStorageType)) >diff --git a/Source/WebKit2/Shared/WebProcessCreationParameters.h b/Source/WebKit2/Shared/WebProcessCreationParameters.h >index 47a9eee..27979f9 100644 >--- a/Source/WebKit2/Shared/WebProcessCreationParameters.h >+++ b/Source/WebKit2/Shared/WebProcessCreationParameters.h >@@ -91,13 +91,8 @@ struct WebProcessCreationParameters { > #if ENABLE(CACHE_PARTITIONING) > Vector<String> urlSchemesRegisteredAsCachePartitioned; > #endif >-#if ENABLE(CUSTOM_PROTOCOLS) > Vector<String> urlSchemesRegisteredForCustomProtocols; >-#endif > #if USE(SOUP) >-#if !ENABLE(CUSTOM_PROTOCOLS) >- Vector<String> urlSchemesRegistered; >-#endif > String cookiePersistentStoragePath; > uint32_t cookiePersistentStorageType; > HTTPCookieAcceptPolicy cookieAcceptPolicy; >diff --git a/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h b/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h >index 0333335..d77267d 100644 >--- a/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h >+++ b/Source/WebKit2/UIProcess/API/C/soup/WKAPICastSoup.h >@@ -35,11 +35,7 @@ namespace WebKit { > class WebSoupCustomProtocolRequestManager; > class WebSoupRequestManagerProxy; > >-#if ENABLE(CUSTOM_PROTOCOLS) > WK_ADD_API_MAPPING(WKSoupCustomProtocolRequestManagerRef, WebSoupCustomProtocolRequestManager) >-#else >-WK_ADD_API_MAPPING(WKSoupRequestManagerRef, WebSoupRequestManagerProxy) >-#endif > > } > >diff --git a/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp b/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp >deleted file mode 100644 >index 84d21f9..0000000 >--- a/Source/WebKit2/UIProcess/API/C/soup/WKContextSoup.cpp >+++ /dev/null >@@ -1,41 +0,0 @@ >-/* >- * 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>()); >-} >- >diff --git a/Source/WebKit2/UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp b/Source/WebKit2/UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp >index 95b1f81..d5d36f6 100644 >--- a/Source/WebKit2/UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp >+++ b/Source/WebKit2/UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp >@@ -33,19 +33,10 @@ using namespace WebKit; > > WKTypeID WKSoupCustomProtocolRequestManagerGetTypeID() > { >-#if ENABLE(CUSTOM_PROTOCOLS) > return toAPI(WebSoupCustomProtocolRequestManager::APIType); >-#else >- return 0; >-#endif > } > > void WKSoupCustomProtocolRequestManagerSetClient(WKSoupCustomProtocolRequestManagerRef soupRequestManagerRef, const WKSoupCustomProtocolRequestManagerClientBase* wkClient) > { >-#if ENABLE(CUSTOM_PROTOCOLS) > toImpl(soupRequestManagerRef)->initializeClient(wkClient); >-#else >- UNUSED_PARAM(soupRequestManagerRef); >- UNUSED_PARAM(wkClient); >-#endif > } >diff --git a/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.cpp b/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.cpp >deleted file mode 100644 >index ecff28c..0000000 >--- a/Source/WebKit2/UIProcess/API/C/soup/WKSoupRequestManager.cpp >+++ /dev/null >@@ -1,57 +0,0 @@ >-/* >- * 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); >-} >diff --git a/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h b/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h >index 25a9670..ea4862c 100644 >--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h >+++ b/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h >@@ -26,8 +26,6 @@ > #ifndef CustomProtocolManagerProxy_h > #define CustomProtocolManagerProxy_h > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > #include "MessageReceiver.h" > > #if PLATFORM(COCOA) >@@ -67,6 +65,4 @@ private: > > } // namespace WebKit > >-#endif // ENABLE(CUSTOM_PROTOCOLS) >- > #endif // CustomProtocolManagerProxy_h >diff --git a/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in b/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in >index 7aef0e0..93c0ad4 100644 >--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in >+++ b/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in >@@ -20,11 +20,7 @@ > # 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. > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > messages -> CustomProtocolManagerProxy { > StartLoading(uint64_t customProtocolID, WebCore::ResourceRequest request) > StopLoading(uint64_t customProtocolID) > } >- >-#endif // ENABLE(CUSTOM_PROTOCOLS) >diff --git a/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm b/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm >index 7d0efca..51f1722 100644 >--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm >+++ b/Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm >@@ -26,8 +26,6 @@ > #import "config.h" > #import "CustomProtocolManagerProxy.h" > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > #import "ChildProcessProxy.h" > #import "Connection.h" > #import "CustomProtocolManagerMessages.h" >@@ -149,5 +147,3 @@ void CustomProtocolManagerProxy::stopLoading(uint64_t customProtocolID) > } > > } // namespace WebKit >- >-#endif // ENABLE(CUSTOM_PROTOCOLS) >diff --git a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp b/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp >index a6b437d..f8bf2f3 100644 >--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp >+++ b/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp >@@ -20,8 +20,6 @@ > #include "config.h" > #include "CustomProtocolManagerProxy.h" > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > #include "ChildProcessProxy.h" > #include "CustomProtocolManagerMessages.h" > #include "CustomProtocolManagerProxyMessages.h" >@@ -50,5 +48,3 @@ void CustomProtocolManagerProxy::stopLoading(uint64_t customProtocolID) > } > > } // namespace WebKit >- >-#endif // ENABLE(CUSTOM_PROTOCOLS) >diff --git a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp b/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp >index 59e2589..5621a86 100644 >--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp >+++ b/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp >@@ -20,8 +20,6 @@ > #include "config.h" > #include "WebSoupCustomProtocolRequestManager.h" > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > #include "APIData.h" > #include "CustomProtocolManagerMessages.h" > #include "WebContext.h" >@@ -146,5 +144,3 @@ void WebSoupCustomProtocolRequestManager::didFinishLoading(uint64_t customProtoc > } > > } // namespace WebKit >- >-#endif // ENABLE(CUSTOM_PROTOCOLS) >diff --git a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h b/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h >index a140925..2e1b9fa 100644 >--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h >+++ b/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h >@@ -20,8 +20,6 @@ > #ifndef WebSoupCustomProtocolRequestManager_h > #define WebSoupCustomProtocolRequestManager_h > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > #include "APIObject.h" > #include "WebContextSupplement.h" > #include "WebSoupCustomProtocolRequestManagerClient.h" >@@ -83,6 +81,4 @@ private: > > } // namespace WebKit > >-#endif // ENABLE(CUSTOM_PROTOCOLS) >- > #endif // WebSoupCustomProtocolRequestManager_h >diff --git a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp b/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp >index 80d43c5..35aacd7 100644 >--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp >+++ b/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp >@@ -20,8 +20,6 @@ > #include "config.h" > #include "WebSoupCustomProtocolRequestManagerClient.h" > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > namespace WebKit { > > bool WebSoupCustomProtocolRequestManagerClient::startLoading(WebSoupCustomProtocolRequestManager* soupRequestManager, uint64_t customProtocolID, const WebCore::ResourceRequest& request) >@@ -41,5 +39,3 @@ void WebSoupCustomProtocolRequestManagerClient::stopLoading(WebSoupCustomProtoco > } > > } // namespace WebKit >- >-#endif // ENABLE(CUSTOM_PROTOCOLS) >diff --git a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h b/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h >index e143321..debb221 100644 >--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h >+++ b/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h >@@ -20,8 +20,6 @@ > #ifndef WebSoupCustomProtocolRequestManagerClient_h > #define WebSoupCustomProtocolRequestManagerClient_h > >-#if ENABLE(CUSTOM_PROTOCOLS) >- > #include "APIClient.h" > #include "WKAPICast.h" > #include "WKSoupCustomProtocolRequestManager.h" >@@ -49,6 +47,4 @@ public: > > } // namespace WebKit > >-#endif // ENABLE(CUSTOM_PROTOCOLS) >- > #endif // WebSoupCustomProtocolRequestManagerClient_h >diff --git a/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp b/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp >index 49667b9..360d957 100644 >--- a/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp >+++ b/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp >@@ -55,9 +55,7 @@ PassRefPtr<NetworkProcessProxy> NetworkProcessProxy::create(WebContext& webConte > NetworkProcessProxy::NetworkProcessProxy(WebContext& webContext) > : m_webContext(webContext) > , m_numPendingConnectionRequests(0) >-#if ENABLE(CUSTOM_PROTOCOLS) > , m_customProtocolManagerProxy(this, webContext) >-#endif > { > connect(); > } >diff --git a/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h b/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h >index c92b98f..8e259be 100644 >--- a/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h >+++ b/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h >@@ -29,15 +29,12 @@ > #if ENABLE(NETWORK_PROCESS) > > #include "ChildProcessProxy.h" >+#include "CustomProtocolManagerProxy.h" > #include "ProcessLauncher.h" > #include "WebProcessProxyMessages.h" > #include <memory> > #include <wtf/Deque.h> > >-#if ENABLE(CUSTOM_PROTOCOLS) >-#include "CustomProtocolManagerProxy.h" >-#endif >- > #if PLATFORM(IOS) > #include "ProcessAssertion.h" > #endif >@@ -98,10 +95,7 @@ private: > Deque<RefPtr<Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply>> m_pendingConnectionReplies; > > std::unique_ptr<DownloadProxyMap> m_downloadProxyMap; >- >-#if ENABLE(CUSTOM_PROTOCOLS) > CustomProtocolManagerProxy m_customProtocolManagerProxy; >-#endif > > #if PLATFORM(IOS) > std::unique_ptr<ProcessAssertion> m_assertion; >diff --git a/Source/WebKit2/UIProcess/WebContext.cpp b/Source/WebKit2/UIProcess/WebContext.cpp >index b4d5c78..3b12c18 100644 >--- a/Source/WebKit2/UIProcess/WebContext.cpp >+++ b/Source/WebKit2/UIProcess/WebContext.cpp >@@ -29,6 +29,7 @@ > #include "APIArray.h" > #include "APIDownloadClient.h" > #include "APIHistoryClient.h" >+#include "CustomProtocolManagerMessages.h" > #include "DownloadProxy.h" > #include "DownloadProxyMessages.h" > #include "Logging.h" >@@ -91,20 +92,12 @@ > #include "ServicesController.h" > #endif > >-#if ENABLE(CUSTOM_PROTOCOLS) >-#include "CustomProtocolManagerMessages.h" >-#endif >- > #if ENABLE(REMOTE_INSPECTOR) > #include <JavaScriptCore/RemoteInspector.h> > #endif > > #if USE(SOUP) >-#if ENABLE(CUSTOM_PROTOCOLS) > #include "WebSoupCustomProtocolRequestManager.h" >-#else >-#include "WebSoupRequestManagerProxy.h" >-#endif > #endif > > #ifndef NDEBUG >@@ -210,11 +203,7 @@ WebContext::WebContext(WebContextConfiguration configuration) > addSupplement<WebDatabaseManagerProxy>(); > #endif > #if USE(SOUP) >-#if ENABLE(CUSTOM_PROTOCOLS) > addSupplement<WebSoupCustomProtocolRequestManager>(); >-#else >- addSupplement<WebSoupRequestManagerProxy>(); >-#endif > #endif > #if ENABLE(BATTERY_STATUS) > addSupplement<WebBatteryManagerProxy>(); >@@ -1019,7 +1008,6 @@ void WebContext::registerURLSchemeAsCORSEnabled(const String& urlScheme) > sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsCORSEnabled(urlScheme)); > } > >-#if ENABLE(CUSTOM_PROTOCOLS) > HashSet<String>& WebContext::globalURLSchemesWithCustomProtocolHandlers() > { > static NeverDestroyed<HashSet<String>> set; >@@ -1047,7 +1035,6 @@ void WebContext::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(const S > for (auto* context : allContexts()) > context->unregisterSchemeForCustomProtocol(schemeLower); > } >-#endif > > #if ENABLE(CACHE_PARTITIONING) > void WebContext::registerURLSchemeAsCachePartitioned(const String& urlScheme) >@@ -1405,7 +1392,6 @@ void WebContext::setPlugInAutoStartOriginsFilteringOutEntriesAddedAfterTime(Immu > m_plugInAutoStartProvider.setAutoStartOriginsFilteringOutEntriesAddedAfterTime(dictionary, time); > } > >-#if ENABLE(CUSTOM_PROTOCOLS) > void WebContext::registerSchemeForCustomProtocol(const String& scheme) > { > sendToNetworkingProcess(Messages::CustomProtocolManager::RegisterScheme(scheme)); >@@ -1415,7 +1401,6 @@ void WebContext::unregisterSchemeForCustomProtocol(const String& scheme) > { > sendToNetworkingProcess(Messages::CustomProtocolManager::UnregisterScheme(scheme)); > } >-#endif > > #if ENABLE(NETSCAPE_PLUGIN_API) > void WebContext::pluginInfoStoreDidLoadPlugins(PluginInfoStore* store) >diff --git a/Source/WebKit2/UIProcess/WebContext.h b/Source/WebKit2/UIProcess/WebContext.h >index 9e2340a..cbcbc0b 100644 >--- a/Source/WebKit2/UIProcess/WebContext.h >+++ b/Source/WebKit2/UIProcess/WebContext.h >@@ -334,15 +334,12 @@ public: > > bool isURLKnownHSTSHost(const String& urlString, bool privateBrowsingEnabled) const; > void resetHSTSHosts(); >- >-#if ENABLE(CUSTOM_PROTOCOLS) > void registerSchemeForCustomProtocol(const String&); > void unregisterSchemeForCustomProtocol(const String&); > > static HashSet<String>& globalURLSchemesWithCustomProtocolHandlers(); > static void registerGlobalURLSchemeAsHavingCustomProtocolHandlers(const String&); > static void unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(const String&); >-#endif > > #if PLATFORM(COCOA) > void updateProcessSuppressionState() const; >diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp >index 190c915..fb6d572 100644 >--- a/Source/WebKit2/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp >@@ -113,10 +113,6 @@ > #include "ArgumentCodersGtk.h" > #endif > >-#if USE(SOUP) && !ENABLE(CUSTOM_PROTOCOLS) >-#include "WebSoupRequestManagerProxy.h" >-#endif >- > #if ENABLE(VIBRATION) > #include "WebVibrationProxy.h" > #endif >@@ -5043,13 +5039,6 @@ PassRefPtr<ViewSnapshot> WebPageProxy::takeViewSnapshot() > } > #endif > >-#if USE(SOUP) && !ENABLE(CUSTOM_PROTOCOLS) >-void WebPageProxy::didReceiveURIRequest(String uriString, uint64_t requestID) >-{ >- m_process->context().supplement<WebSoupRequestManagerProxy>()->didReceiveURIRequest(uriString, this, requestID); >-} >-#endif >- > #if PLATFORM(GTK) > void WebPageProxy::setComposition(const String& text, Vector<CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) > { >diff --git a/Source/WebKit2/UIProcess/WebPageProxy.h b/Source/WebKit2/UIProcess/WebPageProxy.h >index f0b7827..c0c0a34 100644 >--- a/Source/WebKit2/UIProcess/WebPageProxy.h >+++ b/Source/WebKit2/UIProcess/WebPageProxy.h >@@ -1253,10 +1253,6 @@ private: > void notifyRevealedSelection(); > #endif // PLATFORM(IOS) > >-#if USE(SOUP) && !ENABLE(CUSTOM_PROTOCOLS) >- void didReceiveURIRequest(String uriString, uint64_t requestID); >-#endif >- > void clearLoadDependentCallbacks(); > > void performDragControllerAction(DragControllerAction, WebCore::DragData&, const String& dragStorageName, const SandboxExtension::Handle&, const SandboxExtension::HandleArray&); >diff --git a/Source/WebKit2/UIProcess/WebPageProxy.messages.in b/Source/WebKit2/UIProcess/WebPageProxy.messages.in >index 0f455e7..9ece8d6 100644 >--- a/Source/WebKit2/UIProcess/WebPageProxy.messages.in >+++ b/Source/WebKit2/UIProcess/WebPageProxy.messages.in >@@ -366,13 +366,6 @@ messages -> WebPageProxy { > SaveRecentSearches(String name, Vector<String> searchItems) > LoadRecentSearches(String name) -> (Vector<String> result) > >-#if USE(SOUP) >-#if !ENABLE(CUSTOM_PROTOCOLS) >- # Soup custom URI request messages >- DidReceiveURIRequest(String uriString, uint64_t requestID); >-#endif >-#endif >- > SavePDFToFileInDownloadsFolder(String suggestedFilename, String originatingURLString, IPC::DataReference data) > > #if PLATFORM(COCOA) >diff --git a/Source/WebKit2/UIProcess/WebProcessProxy.cpp b/Source/WebKit2/UIProcess/WebProcessProxy.cpp >index 8a6b583..b20c071 100644 >--- a/Source/WebKit2/UIProcess/WebProcessProxy.cpp >+++ b/Source/WebKit2/UIProcess/WebProcessProxy.cpp >@@ -92,9 +92,7 @@ WebProcessProxy::WebProcessProxy(WebContext& context) > : m_responsivenessTimer(this) > , m_context(context) > , m_mayHaveUniversalFileReadSandboxExtension(false) >-#if ENABLE(CUSTOM_PROTOCOLS) > , m_customProtocolManagerProxy(this, context) >-#endif > #if PLATFORM(COCOA) > , m_processSuppressionEnabled(false) > #endif >diff --git a/Source/WebKit2/UIProcess/WebProcessProxy.h b/Source/WebKit2/UIProcess/WebProcessProxy.h >index ea3480a..b63f6e3 100644 >--- a/Source/WebKit2/UIProcess/WebProcessProxy.h >+++ b/Source/WebKit2/UIProcess/WebProcessProxy.h >@@ -28,6 +28,7 @@ > > #include "APISession.h" > #include "ChildProcessProxy.h" >+#include "CustomProtocolManagerProxy.h" > #include "MessageReceiverMap.h" > #include "PlatformProcessIdentifier.h" > #include "PluginInfoStore.h" >@@ -43,10 +44,6 @@ > #include <wtf/PassRefPtr.h> > #include <wtf/RefCounted.h> > >-#if ENABLE(CUSTOM_PROTOCOLS) >-#include "CustomProtocolManagerProxy.h" >-#endif >- > #if PLATFORM(IOS) > #include "ProcessThrottler.h" > #endif >@@ -224,10 +221,7 @@ private: > HashSet<WebUserContentControllerProxy*> m_webUserContentControllerProxies; > > std::unique_ptr<DownloadProxyMap> m_downloadProxyMap; >- >-#if ENABLE(CUSTOM_PROTOCOLS) > CustomProtocolManagerProxy m_customProtocolManagerProxy; >-#endif > > #if PLATFORM(COCOA) > HashSet<uint64_t> m_processSuppressiblePages; >diff --git a/Source/WebKit2/UIProcess/mac/WebContextMac.mm b/Source/WebKit2/UIProcess/mac/WebContextMac.mm >index cd88b09..2f6b68f 100644 >--- a/Source/WebKit2/UIProcess/mac/WebContextMac.mm >+++ b/Source/WebKit2/UIProcess/mac/WebContextMac.mm >@@ -208,10 +208,8 @@ void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& para > #if ENABLE(NETWORK_PROCESS) > if (!m_usesNetworkProcess) { > #endif >-#if ENABLE(CUSTOM_PROTOCOLS) > for (const auto& scheme : globalURLSchemesWithCustomProtocolHandlers()) > parameters.urlSchemesRegisteredForCustomProtocols.append(scheme); >-#endif > #if ENABLE(NETWORK_PROCESS) > } > #endif >@@ -245,10 +243,8 @@ void WebContext::platformInitializeNetworkProcess(NetworkProcessCreationParamete > parameters.parentProcessName = [[NSProcessInfo processInfo] processName]; > parameters.uiProcessBundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; > >-#if ENABLE(CUSTOM_PROTOCOLS) > for (const auto& scheme : globalURLSchemesWithCustomProtocolHandlers()) > parameters.urlSchemesRegisteredForCustomProtocols.append(scheme); >-#endif > > parameters.httpProxy = [[NSUserDefaults standardUserDefaults] stringForKey:WebKit2HTTPProxyDefaultsKey]; > parameters.httpsProxy = [[NSUserDefaults standardUserDefaults] stringForKey:WebKit2HTTPSProxyDefaultsKey]; >diff --git a/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp b/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp >deleted file mode 100644 >index 140d05b..0000000 >--- a/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerClient.cpp >+++ /dev/null >@@ -1,42 +0,0 @@ >-/* >- * 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 >diff --git a/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp b/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp >deleted file mode 100644 >index cd0af18..0000000 >--- a/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.cpp >+++ /dev/null >@@ -1,128 +0,0 @@ >-/* >- * 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 >diff --git a/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in b/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in >deleted file mode 100644 >index 18058f5..0000000 >--- a/Source/WebKit2/UIProcess/soup/WebSoupRequestManagerProxy.messages.in >+++ /dev/null >@@ -1,25 +0,0 @@ >-# 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); >-} >diff --git a/Source/WebKit2/WebKit2Prefix.h b/Source/WebKit2/WebKit2Prefix.h >index 88d0737..9291680 100644 >--- a/Source/WebKit2/WebKit2Prefix.h >+++ b/Source/WebKit2/WebKit2Prefix.h >@@ -42,8 +42,6 @@ > > #define ENABLE_MEMORY_SAMPLER 1 > >-#define ENABLE_CUSTOM_PROTOCOLS 1 >- > #define ENABLE_SHAREABLE_RESOURCE 1 > > #include <CoreFoundation/CoreFoundation.h> >@@ -80,7 +78,6 @@ > > #if PLATFORM(GTK) > #define ENABLE_NETWORK_PROCESS 1 >-#define ENABLE_CUSTOM_PROTOCOLS 1 > #endif > > /* When C++ exceptions are disabled, the C++ library defines |try| and |catch| >diff --git a/Source/WebKit2/WebProcess/WebProcess.cpp b/Source/WebKit2/WebProcess/WebProcess.cpp >index 7c170b0..2766455 100644 >--- a/Source/WebKit2/WebProcess/WebProcess.cpp >+++ b/Source/WebKit2/WebProcess/WebProcess.cpp >@@ -100,9 +100,7 @@ > #include "SecItemShim.h" > #endif > >-#if ENABLE(CUSTOM_PROTOCOLS) > #include "CustomProtocolManager.h" >-#endif > > #if ENABLE(DATABASE_PROCESS) > #include "WebToDatabaseProcessConnection.h" >@@ -128,10 +126,6 @@ > #include <JavaScriptCore/RemoteInspector.h> > #endif > >-#if USE(SOUP) && !ENABLE(CUSTOM_PROTOCOLS) >-#include "WebSoupRequestManager.h" >-#endif >- > using namespace JSC; > using namespace WebCore; > >@@ -198,15 +192,10 @@ WebProcess::WebProcess() > #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) > addSupplement<WebNotificationManager>(); > #endif >-#if ENABLE(CUSTOM_PROTOCOLS) > addSupplement<CustomProtocolManager>(); >-#endif > #if ENABLE(BATTERY_STATUS) > addSupplement<WebBatteryManager>(); > #endif >-#if USE(SOUP) && !ENABLE(CUSTOM_PROTOCOLS) >- addSupplement<WebSoupRequestManager>(); >-#endif > m_plugInAutoStartOriginHashes.add(SessionID::defaultSessionID(), HashMap<unsigned, double>()); > } > >diff --git a/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp b/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp >index 55c5037..dde2f4d 100644 >--- a/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp >+++ b/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp >@@ -22,11 +22,6 @@ > > #include <wtf/text/CString.h> > >-#if !ENABLE(CUSTOM_PROTOCOLS) >-#include "WebProcess.h" >-#include "WebSoupRequestManager.h" >-#endif >- > using namespace WebKit; > > G_DEFINE_TYPE(WebKitSoupRequestGeneric, webkit_soup_request_generic, SOUP_TYPE_REQUEST) >@@ -51,25 +46,17 @@ static void webkit_soup_request_generic_init(WebKitSoupRequestGeneric* request) > > static void webkitSoupRequestGenericSendAsync(SoupRequest* request, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer userData) > { >-#if ENABLE(CUSTOM_PROTOCOLS) > CustomProtocolManagerImpl* customProtocolManager = WEBKIT_SOUP_REQUEST_GENERIC_GET_CLASS(request)->customProtocolManager; > ASSERT(customProtocolManager); > customProtocolManager->send(g_task_new(request, cancellable, callback, userData)); >-#else >- WebProcess::shared().supplement<WebSoupRequestManager>()->send(g_task_new(request, cancellable, callback, userData)); >-#endif > } > > static GInputStream* webkitSoupRequestGenericSendFinish(SoupRequest* request, GAsyncResult* result, GError** error) > { > g_return_val_if_fail(g_task_is_valid(result, request), 0); >-#if ENABLE(CUSTOM_PROTOCOLS) > CustomProtocolManagerImpl* customProtocolManager = WEBKIT_SOUP_REQUEST_GENERIC_GET_CLASS(request)->customProtocolManager; > ASSERT(customProtocolManager); > return customProtocolManager->finish(G_TASK(result), error); >-#else >- return WebProcess::shared().supplement<WebSoupRequestManager>()->finish(G_TASK(result), error); >-#endif > } > > static goffset webkitSoupRequestGenericGetContentLength(SoupRequest* request) >diff --git a/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.h b/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.h >index 5c5d3ad..edf7fd3 100644 >--- a/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.h >+++ b/Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.h >@@ -20,13 +20,11 @@ > #ifndef WebKitSoupRequestGeneric_h > #define WebKitSoupRequestGeneric_h > >+#include "CustomProtocolManagerImpl.h" >+ > #include <glib-object.h> > #include <libsoup/soup.h> > >-#if ENABLE(CUSTOM_PROTOCOLS) >-#include "CustomProtocolManagerImpl.h" >-#endif >- > G_BEGIN_DECLS > > #define WEBKIT_TYPE_SOUP_REQUEST_GENERIC (webkit_soup_request_generic_get_type()) >@@ -49,9 +47,7 @@ struct _WebKitSoupRequestGeneric { > struct _WebKitSoupRequestGenericClass { > SoupRequestClass parent; > >-#if ENABLE(CUSTOM_PROTOCOLS) > WebKit::CustomProtocolManagerImpl* customProtocolManager; >-#endif > }; > > GType webkit_soup_request_generic_get_type(); >diff --git a/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp b/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp >index 0aaa35c..84f7c4d 100644 >--- a/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp >+++ b/Source/WebKit2/WebProcess/soup/WebProcessSoup.cpp >@@ -44,10 +44,6 @@ > #include <wtf/gobject/GRefPtr.h> > #include <wtf/gobject/GUniquePtr.h> > >-#if !ENABLE(CUSTOM_PROTOCOLS) >-#include "WebSoupRequestManager.h" >-#endif >- > namespace WebKit { > > static uint64_t getCacheDiskFreeSize(SoupCache* cache) >@@ -170,11 +166,6 @@ void WebProcess::platformInitializeWebProcess(const WebProcessCreationParameters > if (!parameters.languages.isEmpty()) > setSoupSessionAcceptLanguage(parameters.languages); > >-#if !ENABLE(CUSTOM_PROTOCOLS) >- for (size_t i = 0; i < parameters.urlSchemesRegistered.size(); i++) >- supplement<WebSoupRequestManager>()->registerURIScheme(parameters.urlSchemesRegistered[i]); >-#endif >- > setIgnoreTLSErrors(parameters.ignoreTLSErrors); > > WebCore::addLanguageChangeObserver(this, languageChanged); >diff --git a/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp b/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp >deleted file mode 100644 >index e71ee40..0000000 >--- a/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.cpp >+++ /dev/null >@@ -1,194 +0,0 @@ >-/* >- * 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 >diff --git a/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.messages.in b/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.messages.in >deleted file mode 100644 >index 24afa95..0000000 >--- a/Source/WebKit2/WebProcess/soup/WebSoupRequestManager.messages.in >+++ /dev/null >@@ -1,28 +0,0 @@ >-# 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); >-} >diff --git a/Source/cmake/OptionsEfl.cmake b/Source/cmake/OptionsEfl.cmake >index cc939d0..75aedb0 100644 >--- a/Source/cmake/OptionsEfl.cmake >+++ b/Source/cmake/OptionsEfl.cmake >@@ -308,7 +308,6 @@ if (ENABLE_FTL_JIT) > set(HAVE_LLVM ON) > endif () > >-add_definitions(-DENABLE_CUSTOM_PROTOCOLS=1) > > # [E]WebKit2 tests need a hint to find out where processes such as WebProcess are located at. > add_definitions(-DWEBKIT_EXEC_PATH=\"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}\") >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 128169
:
239544
|
239614