summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/Network/CustomProtocols
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/UIProcess/Network/CustomProtocols')
-rw-r--r--Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp86
-rw-r--r--Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h31
-rw-r--r--Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in4
-rw-r--r--Source/WebKit2/UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp54
-rw-r--r--Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp148
-rw-r--r--Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h88
-rw-r--r--Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp45
-rw-r--r--Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h54
8 files changed, 107 insertions, 403 deletions
diff --git a/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp b/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp
new file mode 100644
index 000000000..452f3a858
--- /dev/null
+++ b/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.cpp
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "CustomProtocolManagerProxy.h"
+
+#include "APICustomProtocolManagerClient.h"
+#include "ChildProcessProxy.h"
+#include "CustomProtocolManagerMessages.h"
+#include "CustomProtocolManagerProxyMessages.h"
+#include "WebProcessPool.h"
+#include <WebCore/ResourceRequest.h>
+
+namespace WebKit {
+
+CustomProtocolManagerProxy::CustomProtocolManagerProxy(ChildProcessProxy* childProcessProxy, WebProcessPool& processPool)
+ : m_childProcessProxy(childProcessProxy)
+ , m_processPool(processPool)
+{
+ ASSERT(m_childProcessProxy);
+ m_childProcessProxy->addMessageReceiver(Messages::CustomProtocolManagerProxy::messageReceiverName(), *this);
+}
+
+CustomProtocolManagerProxy::~CustomProtocolManagerProxy()
+{
+ m_childProcessProxy->removeMessageReceiver(Messages::CustomProtocolManagerProxy::messageReceiverName());
+}
+
+void CustomProtocolManagerProxy::startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest& request)
+{
+ m_processPool.customProtocolManagerClient().startLoading(*this, customProtocolID, request);
+}
+
+void CustomProtocolManagerProxy::stopLoading(uint64_t customProtocolID)
+{
+ m_processPool.customProtocolManagerClient().stopLoading(*this, customProtocolID);
+}
+
+void CustomProtocolManagerProxy::processDidClose()
+{
+ m_processPool.customProtocolManagerClient().invalidate(*this);
+}
+
+void CustomProtocolManagerProxy::wasRedirectedToRequest(uint64_t customProtocolID, const WebCore::ResourceRequest& request, const WebCore::ResourceResponse& redirectResponse)
+{
+ m_childProcessProxy->send(Messages::CustomProtocolManager::WasRedirectedToRequest(customProtocolID, request, redirectResponse), 0);
+}
+
+void CustomProtocolManagerProxy::didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse& response, uint32_t cacheStoragePolicy)
+{
+ m_childProcessProxy->send(Messages::CustomProtocolManager::DidReceiveResponse(customProtocolID, response, cacheStoragePolicy), 0);
+}
+
+void CustomProtocolManagerProxy::didLoadData(uint64_t customProtocolID, const IPC::DataReference& data)
+{
+ m_childProcessProxy->send(Messages::CustomProtocolManager::DidLoadData(customProtocolID, data), 0);
+}
+
+void CustomProtocolManagerProxy::didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError& error)
+{
+ m_childProcessProxy->send(Messages::CustomProtocolManager::DidFailWithError(customProtocolID, error), 0);
+}
+
+void CustomProtocolManagerProxy::didFinishLoading(uint64_t customProtocolID)
+{
+ m_childProcessProxy->send(Messages::CustomProtocolManager::DidFinishLoading(customProtocolID), 0);
+}
+
+} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h b/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h
index 9615a510b..ffe99cbe1 100644
--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h
+++ b/Source/WebKit2/UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h
@@ -26,40 +26,53 @@
#ifndef CustomProtocolManagerProxy_h
#define CustomProtocolManagerProxy_h
-#if ENABLE(CUSTOM_PROTOCOLS)
-
#include "MessageReceiver.h"
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
#include <wtf/HashMap.h>
#include <wtf/RetainPtr.h>
OBJC_CLASS WKCustomProtocolLoader;
#endif
+namespace IPC {
+class DataReference;
+}
+
namespace WebCore {
+class ResourceError;
class ResourceRequest;
+class ResourceResponse;
} // namespace WebCore
namespace WebKit {
class ChildProcessProxy;
-class WebContext;
+class WebProcessPool;
class CustomProtocolManagerProxy : public IPC::MessageReceiver {
public:
- explicit CustomProtocolManagerProxy(ChildProcessProxy*, WebContext&);
+ CustomProtocolManagerProxy(ChildProcessProxy*, WebProcessPool&);
+ ~CustomProtocolManagerProxy();
void startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest&);
void stopLoading(uint64_t customProtocolID);
+ void processDidClose();
+
+ void wasRedirectedToRequest(uint64_t customProtocolID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
+ void didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse&, uint32_t cacheStoragePolicy);
+ void didLoadData(uint64_t customProtocolID, const IPC::DataReference&);
+ void didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError&);
+ void didFinishLoading(uint64_t customProtocolID);
+
private:
// IPC::MessageReceiver
- virtual void didReceiveMessage(IPC::Connection*, IPC::MessageDecoder&) override;
+ void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
ChildProcessProxy* m_childProcessProxy;
- WebContext& m_webContext;
+ WebProcessPool& m_processPool;
-#if PLATFORM(MAC)
+#if PLATFORM(COCOA)
typedef HashMap<uint64_t, RetainPtr<WKCustomProtocolLoader>> LoaderMap;
LoaderMap m_loaderMap;
#endif
@@ -67,6 +80,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 7aef0e0e7..93c0ad435 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/soup/CustomProtocolManagerProxySoup.cpp b/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp
deleted file mode 100644
index a6b437d04..000000000
--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "CustomProtocolManagerProxy.h"
-
-#if ENABLE(CUSTOM_PROTOCOLS)
-
-#include "ChildProcessProxy.h"
-#include "CustomProtocolManagerMessages.h"
-#include "CustomProtocolManagerProxyMessages.h"
-#include "WebContext.h"
-#include "WebSoupCustomProtocolRequestManager.h"
-#include <WebCore/ResourceRequest.h>
-
-namespace WebKit {
-
-CustomProtocolManagerProxy::CustomProtocolManagerProxy(ChildProcessProxy* childProcessProxy, WebContext& webContext)
- : m_childProcessProxy(childProcessProxy)
- , m_webContext(webContext)
-{
- ASSERT(m_childProcessProxy);
- m_childProcessProxy->addMessageReceiver(Messages::CustomProtocolManagerProxy::messageReceiverName(), *this);
-}
-
-void CustomProtocolManagerProxy::startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest& request)
-{
- m_webContext.supplement<WebSoupCustomProtocolRequestManager>()->startLoading(customProtocolID, request);
-}
-
-void CustomProtocolManagerProxy::stopLoading(uint64_t customProtocolID)
-{
- m_webContext.supplement<WebSoupCustomProtocolRequestManager>()->stopLoading(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
deleted file mode 100644
index ad73ad494..000000000
--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "WebSoupCustomProtocolRequestManager.h"
-
-#if ENABLE(CUSTOM_PROTOCOLS)
-
-#include "APIData.h"
-#include "CustomProtocolManagerMessages.h"
-#include "WebContext.h"
-#include <WebCore/ResourceError.h>
-#include <WebCore/ResourceRequest.h>
-#include <WebCore/ResourceResponse.h>
-
-#if PLATFORM(GTK)
-#include <WebCore/ErrorsGtk.h>
-#endif
-
-namespace WebKit {
-
-const char* WebSoupCustomProtocolRequestManager::supplementName()
-{
- return "WebSoupCustomProtocolRequestManager";
-}
-
-PassRefPtr<WebSoupCustomProtocolRequestManager> WebSoupCustomProtocolRequestManager::create(WebContext* context)
-{
- return adoptRef(new WebSoupCustomProtocolRequestManager(context));
-}
-
-WebSoupCustomProtocolRequestManager::WebSoupCustomProtocolRequestManager(WebContext* context)
- : WebContextSupplement(context)
-{
-}
-
-WebSoupCustomProtocolRequestManager::~WebSoupCustomProtocolRequestManager()
-{
-}
-
-void WebSoupCustomProtocolRequestManager::initializeClient(const WKSoupCustomProtocolRequestManagerClientBase* client)
-{
- m_client.initialize(client);
-}
-
-// WebContextSupplement
-void WebSoupCustomProtocolRequestManager::contextDestroyed()
-{
-}
-
-void WebSoupCustomProtocolRequestManager::processDidClose(WebProcessProxy*)
-{
-}
-
-void WebSoupCustomProtocolRequestManager::refWebContextSupplement()
-{
- API::Object::ref();
-}
-
-void WebSoupCustomProtocolRequestManager::derefWebContextSupplement()
-{
- API::Object::deref();
-}
-
-void WebSoupCustomProtocolRequestManager::registerSchemeForCustomProtocol(const String& scheme)
-{
- if (!context())
- return;
-
- context()->registerSchemeForCustomProtocol(scheme);
-
- ASSERT(!m_registeredSchemes.contains(scheme));
- m_registeredSchemes.append(scheme);
-}
-
-void WebSoupCustomProtocolRequestManager::unregisterSchemeForCustomProtocol(const String& scheme)
-{
- if (!context())
- return;
-
- context()->unregisterSchemeForCustomProtocol(scheme);
-
- ASSERT(m_registeredSchemes.contains(scheme));
- m_registeredSchemes.remove(m_registeredSchemes.find(scheme));
-}
-
-void WebSoupCustomProtocolRequestManager::startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest& request)
-{
- if (!m_client.startLoading(this, customProtocolID, request))
- didFailWithError(customProtocolID, WebCore::cannotShowURLError(request));
-}
-
-void WebSoupCustomProtocolRequestManager::stopLoading(uint64_t customProtocolID)
-{
- m_client.stopLoading(this, customProtocolID);
-}
-
-void WebSoupCustomProtocolRequestManager::didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse& response)
-{
- if (!context())
- return;
-
- context()->networkingProcessConnection()->send(Messages::CustomProtocolManager::DidReceiveResponse(customProtocolID, response, 0), 0);
-}
-
-void WebSoupCustomProtocolRequestManager::didLoadData(uint64_t customProtocolID, const API::Data* data)
-{
- if (!context())
- return;
-
- context()->networkingProcessConnection()->send(Messages::CustomProtocolManager::DidLoadData(customProtocolID, data->dataReference()), 0);
-}
-
-void WebSoupCustomProtocolRequestManager::didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError& error)
-{
- if (!context())
- return;
-
- context()->networkingProcessConnection()->send(Messages::CustomProtocolManager::DidFailWithError(customProtocolID, error), 0);
-}
-
-void WebSoupCustomProtocolRequestManager::didFinishLoading(uint64_t customProtocolID)
-{
- if (!context())
- return;
-
- context()->networkingProcessConnection()->send(Messages::CustomProtocolManager::DidFinishLoading(customProtocolID), 0);
-}
-
-} // 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
deleted file mode 100644
index a140925d1..000000000
--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WebSoupCustomProtocolRequestManager_h
-#define WebSoupCustomProtocolRequestManager_h
-
-#if ENABLE(CUSTOM_PROTOCOLS)
-
-#include "APIObject.h"
-#include "WebContextSupplement.h"
-#include "WebSoupCustomProtocolRequestManagerClient.h"
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefPtr.h>
-#include <wtf/text/WTFString.h>
-
-namespace API {
-class Data;
-}
-
-namespace WebCore {
-class ResourceError;
-class ResourceRequest;
-class ResourceResponse;
-}
-
-namespace WebKit {
-
-class WebContext;
-
-class WebSoupCustomProtocolRequestManager : public API::ObjectImpl<API::Object::Type::SoupCustomProtocolRequestManager>, public WebContextSupplement {
-public:
- static const char* supplementName();
-
- static PassRefPtr<WebSoupCustomProtocolRequestManager> create(WebContext*);
- virtual ~WebSoupCustomProtocolRequestManager();
-
- void initializeClient(const WKSoupCustomProtocolRequestManagerClientBase*);
-
- void registerSchemeForCustomProtocol(const String& scheme);
- void unregisterSchemeForCustomProtocol(const String& scheme);
-
- void startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest&);
- void stopLoading(uint64_t customProtocolID);
-
- void didReceiveResponse(uint64_t customProtocolID, const WebCore::ResourceResponse&);
- void didLoadData(uint64_t customProtocolID, const API::Data*);
- void didFailWithError(uint64_t customProtocolID, const WebCore::ResourceError&);
- void didFinishLoading(uint64_t customProtocolID);
-
- const Vector<String>& registeredSchemesForCustomProtocols() const { return m_registeredSchemes; }
-
- using API::Object::ref;
- using API::Object::deref;
-
-private:
- WebSoupCustomProtocolRequestManager(WebContext*);
-
- // WebContextSupplement
- virtual void contextDestroyed() override;
- virtual void processDidClose(WebProcessProxy*) override;
- virtual void refWebContextSupplement() override;
- virtual void derefWebContextSupplement() override;
-
- WebSoupCustomProtocolRequestManagerClient m_client;
- Vector<String> m_registeredSchemes;
-};
-
-} // 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
deleted file mode 100644
index 80d43c5a3..000000000
--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "WebSoupCustomProtocolRequestManagerClient.h"
-
-#if ENABLE(CUSTOM_PROTOCOLS)
-
-namespace WebKit {
-
-bool WebSoupCustomProtocolRequestManagerClient::startLoading(WebSoupCustomProtocolRequestManager* soupRequestManager, uint64_t customProtocolID, const WebCore::ResourceRequest& request)
-{
- if (!m_client.startLoading)
- return false;
-
- RefPtr<API::URLRequest> urlRequest = API::URLRequest::create(request);
- m_client.startLoading(toAPI(soupRequestManager), customProtocolID, toAPI(urlRequest.get()), m_client.base.clientInfo);
- return true;
-}
-
-void WebSoupCustomProtocolRequestManagerClient::stopLoading(WebSoupCustomProtocolRequestManager* soupRequestManager, uint64_t customProtocolID)
-{
- if (m_client.stopLoading)
- m_client.stopLoading(toAPI(soupRequestManager), customProtocolID, m_client.base.clientInfo);
-}
-
-} // namespace WebKit
-
-#endif // ENABLE(CUSTOM_PROTOCOLS)
diff --git a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h b/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h
deleted file mode 100644
index e14332141..000000000
--- a/Source/WebKit2/UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2013 Igalia S.L.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef WebSoupCustomProtocolRequestManagerClient_h
-#define WebSoupCustomProtocolRequestManagerClient_h
-
-#if ENABLE(CUSTOM_PROTOCOLS)
-
-#include "APIClient.h"
-#include "WKAPICast.h"
-#include "WKSoupCustomProtocolRequestManager.h"
-
-namespace API {
-
-template<> struct ClientTraits<WKSoupCustomProtocolRequestManagerClientBase> {
- typedef std::tuple<WKSoupCustomProtocolRequestManagerClientV0> Versions;
-};
-}
-
-namespace WebCore {
-class ResourceRequest;
-}
-
-namespace WebKit {
-
-class WebSoupCustomProtocolRequestManager;
-
-class WebSoupCustomProtocolRequestManagerClient : public API::Client<WKSoupCustomProtocolRequestManagerClientBase> {
-public:
- bool startLoading(WebSoupCustomProtocolRequestManager*, uint64_t customProtocolID, const WebCore::ResourceRequest&);
- void stopLoading(WebSoupCustomProtocolRequestManager*, uint64_t customProtocolID);
-};
-
-} // namespace WebKit
-
-#endif // ENABLE(CUSTOM_PROTOCOLS)
-
-#endif // WebSoupCustomProtocolRequestManagerClient_h