summaryrefslogtreecommitdiffstats
path: root/src/core/url_request_context_getter_qt.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-02-05 10:48:38 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-02-19 14:49:08 +0000
commitd3f80fb0b71e3020e4e8173e2002dc93efdc5f60 (patch)
tree1a019dbd7330479a278cce5908975ee940af38ef /src/core/url_request_context_getter_qt.cpp
parente263449d32e9392985c1587f2a0b4e0e77e605a2 (diff)
Experimental custom URL scheme API
Introduces API for custom URL scheme as an experimental API in widgets. A QML api is not included yet. Change-Id: Ice4542e5238feb961a4c9c60a809455e31dc1ec6 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/core/url_request_context_getter_qt.cpp')
-rw-r--r--src/core/url_request_context_getter_qt.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index 96ba36565..41af37e5d 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -62,6 +62,8 @@
#include "net/ftp/ftp_network_layer.h"
#include "browser_context_adapter.h"
+#include "custom_protocol_handler.h"
+#include "custom_url_scheme_handler.h"
#include "content_client_qt.h"
#include "network_delegate_qt.h"
#include "qrc_protocol_handler_qt.h"
@@ -282,6 +284,10 @@ void URLRequestContextGetterQt::generateJobFactory()
m_jobFactory->SetProtocolHandler(url::kFtpScheme,
new net::FtpProtocolHandler(new net::FtpNetworkLayer(m_urlRequestContext->host_resolver())));
+ Q_FOREACH (CustomUrlSchemeHandler* handler, m_browserContext->customUrlSchemeHandlers()) {
+ m_jobFactory->SetProtocolHandler(handler->scheme().toStdString(), handler->protocolHandler());
+ }
+
m_urlRequestContext->set_job_factory(m_jobFactory.get());
}