summaryrefslogtreecommitdiffstats
path: root/src/core/api/qwebengineurlrequestinfo.cpp
diff options
context:
space:
mode:
authorDavid Rosca <nowrep@gmail.com>2015-10-08 17:28:19 +0200
committerDavid Rosca <nowrep@gmail.com>2015-10-12 09:12:35 +0000
commiteffa889ba7b7a10b3648a9ded55a5bcd4bae993a (patch)
tree1c737c26152f168fca6ea69f48708ae9eeddc70b /src/core/api/qwebengineurlrequestinfo.cpp
parent2e9c6cd0bd6789a4f46fe0bcfbd522f0dd3eb4cb (diff)
Add firstPartyUrl to QWebEngineUrlRequestInfo
Add firstPartyUrl that can be used to identify third-party requests. Change-Id: I2b8e48ff0a1a4402af224c80f91d4e599a61a89c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/core/api/qwebengineurlrequestinfo.cpp')
-rw-r--r--src/core/api/qwebengineurlrequestinfo.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/api/qwebengineurlrequestinfo.cpp b/src/core/api/qwebengineurlrequestinfo.cpp
index b769081f8..e8ce65be3 100644
--- a/src/core/api/qwebengineurlrequestinfo.cpp
+++ b/src/core/api/qwebengineurlrequestinfo.cpp
@@ -119,11 +119,12 @@ ASSERT_ENUMS_MATCH(QtWebEngineCore::WebContentsAdapterClient::OtherNavigation, Q
*/
-QWebEngineUrlRequestInfoPrivate::QWebEngineUrlRequestInfoPrivate(QWebEngineUrlRequestInfo::ResourceType resource, QWebEngineUrlRequestInfo::NavigationType navigation, const QUrl &u, const QByteArray &m)
+QWebEngineUrlRequestInfoPrivate::QWebEngineUrlRequestInfoPrivate(QWebEngineUrlRequestInfo::ResourceType resource, QWebEngineUrlRequestInfo::NavigationType navigation, const QUrl &u, const QUrl &fpu, const QByteArray &m)
: resourceType(resource)
, navigationType(navigation)
, shouldBlockRequest(false)
, url(u)
+ , firstPartyUrl(fpu)
, method(m)
{
}
@@ -218,6 +219,17 @@ QUrl QWebEngineUrlRequestInfo::requestUrl() const
return d->url;
}
+/*!
+ Returns the first party URL of the request.
+ The first party URL is the URL of the page that issued the request.
+*/
+
+QUrl QWebEngineUrlRequestInfo::firstPartyUrl() const
+{
+ Q_D(const QWebEngineUrlRequestInfo);
+ return d->firstPartyUrl;
+}
+
/*!
Returns the HTTP method of the request (for example, GET or POST).