diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2016-10-17 07:00:26 -0700 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2017-09-13 13:34:31 +0000 |
commit | 7b365eb352780dc0d939e918b0aa58d0458fd9da (patch) | |
tree | 6453e84f62bcbe92f9149a486fc83dbdf09cdb4c /src/webenginewidgets/api/qwebenginepage.cpp | |
parent | 98bdf56f7428094c2d197fff72422d301470fbcb (diff) |
Support Quota Management API
Expose navigator.webkitPersistentStorage.requestQuota() calls to
the API layer as a permission API. It allows the users to accept
these requests and specify a quota for persistent storage.
https://developer.chrome.com/apps/offline_storage#managing_quota
[ChangeLog] navigator.webkitPersistentStorage.requestQuota() calls
were rejected by default and now they will emit signal
quotaPermissionRequested in both WebEngineView and QWebEnginePage.
Task-number: QTBUG-56354
Change-Id: Id192577ffb403694d3051414744ded89bbfd2aa8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webenginewidgets/api/qwebenginepage.cpp')
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 178f6ec98..41034e43c 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -53,6 +53,7 @@ #include "qwebenginehistory_p.h" #include "qwebengineprofile.h" #include "qwebengineprofile_p.h" +#include "qwebenginequotapermissionrequest.h" #include "qwebenginescriptcollection_p.h" #include "qwebenginesettings.h" #include "qwebengineview.h" @@ -579,6 +580,13 @@ void QWebEnginePagePrivate::runMouseLockPermissionRequest(const QUrl &securityOr Q_EMIT q->featurePermissionRequested(securityOrigin, QWebEnginePage::MouseLock); } +void QWebEnginePagePrivate::runQuotaPermissionRequest(QSharedPointer<QtWebEngineCore::QuotaPermissionController> controller) +{ + Q_Q(QWebEnginePage); + QWebEngineQuotaPermissionRequest request(controller); + Q_EMIT q->quotaPermissionRequested(request); +} + QObject *QWebEnginePagePrivate::accessibilityParentObject() { return view; @@ -740,6 +748,17 @@ QWebEnginePage::QWebEnginePage(QObject* parent) */ /*! + \fn QWebEnginePage::quotaPermissionRequested(QWebEngineQuotaPermissionRequest request) + \since 5.11 + + This signal is emitted when the web page requests larger persistent storage + than the application's current allocation in File System API. The default quota + is 0 bytes. + + The request object \a request can be used to accept or reject the request. +*/ + +/*! \fn void QWebEnginePage::pdfPrintingFinished(const QString &filePath, bool success) \since 5.9 |