summaryrefslogtreecommitdiffstats
path: root/src/core/url_request_custom_job_delegate.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-19 13:30:51 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-22 10:30:42 +0000
commit2daa4950118dd76d0d0bf15e347217740b0cb5c5 (patch)
treea3febba6aaef36f59295ac950757dfee21a5dd2d /src/core/url_request_custom_job_delegate.cpp
parent86060ec61135cd30f9a8d8415784b767ce1f1252 (diff)
Add initiator to QWebEngineUrlRequestJob
Add a property that can be used to tell what is making the URL request. Change-Id: Ic7224382165e93d3c043c30e9a7cc5be9f29d9db Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/url_request_custom_job_delegate.cpp')
-rw-r--r--src/core/url_request_custom_job_delegate.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/url_request_custom_job_delegate.cpp b/src/core/url_request_custom_job_delegate.cpp
index 6b82cebb5..338bd7137 100644
--- a/src/core/url_request_custom_job_delegate.cpp
+++ b/src/core/url_request_custom_job_delegate.cpp
@@ -50,10 +50,12 @@ namespace QtWebEngineCore {
URLRequestCustomJobDelegate::URLRequestCustomJobDelegate(URLRequestCustomJobProxy *proxy,
const QUrl &url,
- const QByteArray &method)
+ const QByteArray &method,
+ const QUrl &initiatorOrigin)
: m_proxy(proxy),
m_request(url),
- m_method(method)
+ m_method(method),
+ m_initiatorOrigin(initiatorOrigin)
{
}
@@ -71,6 +73,11 @@ QByteArray URLRequestCustomJobDelegate::method() const
return m_method;
}
+QUrl URLRequestCustomJobDelegate::initiator() const
+{
+ return m_initiatorOrigin;
+}
+
void URLRequestCustomJobDelegate::reply(const QByteArray &contentType, QIODevice *device)
{
if (device)