diff options
author | Florian Bruhin <git@the-compiler.org> | 2015-01-22 14:29:09 +0100 |
---|---|---|
committer | Florian Bruhin <qt-project.org@the-compiler.org> | 2015-01-22 16:44:53 +0100 |
commit | 379f64401d285e4047e30557513a2740d6860157 (patch) | |
tree | d2ec898c7cc30234a618add2653a181e93545e45 | |
parent | 8e3254696e043df4e31a4de2c413a9847ed2cf95 (diff) |
Add documentation for feature permission related APIs.
Those are mostly taken from QWebEnginePage's documentation with some slight
adjustments.
Change-Id: Ifbde5252cc46505c117a9d75ffa2af6e3b6eec11
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r-- | Source/WebKit/qt/WidgetApi/qwebpage.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/Source/WebKit/qt/WidgetApi/qwebpage.cpp b/Source/WebKit/qt/WidgetApi/qwebpage.cpp index bbe6769c1..613c1ac56 100644 --- a/Source/WebKit/qt/WidgetApi/qwebpage.cpp +++ b/Source/WebKit/qt/WidgetApi/qwebpage.cpp @@ -1214,6 +1214,48 @@ QWebInspector* QWebPagePrivate::getOrCreateInspector() \value WebModalDialog The window acts as modal dialog. */ +/*! + \enum QWebPage::PermissionPolicy + + This enum describes the permission policies that the user may set for data or device access. + + \value PermissionUnknown It is unknown whether the user grants or denies permission. + \value PermissionGrantedByUser The user has granted permission. + \value PermissionDeniedByUser The user has denied permission. + + \sa featurePermissionRequested(), featurePermissionRequestCanceled(), setFeaturePermission(), Feature +*/ + +/*! + \enum QWebPage::Feature + + This enum describes the platform feature access categories that the user may be asked to grant or deny access to. + + \value Notifications Access to notifications + \value Geolocation Access to location hardware or service + + \sa featurePermissionRequested(), featurePermissionRequestCanceled(), setFeaturePermission(), PermissionPolicy + +*/ + +/*! + \fn void QWebPage::featurePermissionRequested(QWebFrame* frame, QWebPage::Feature feature); + + This is signal is emitted when the given \a frame requests to make use of + the resource or device identified by \a feature. + + \sa featurePermissionRequestCanceled(), setFeaturePermission() +*/ + +/*! + \fn void QWebPage::featurePermissionRequestCanceled(QWebFrame* frame, QWebPage::Feature feature); + + This is signal is emitted when the given \a frame cancels a previously issued + request to make use of \a feature. + + \sa featurePermissionRequested(), setFeaturePermission() + +*/ /*! \class QWebPage::ViewportAttributes @@ -1615,6 +1657,13 @@ bool QWebPage::shouldInterruptJavaScript() #endif } +/*! + \fn void QWebPage::setFeaturePermission(QWebFrame* frame, Feature feature, PermissionPolicy policy) + + Sets the permission for the given \a frame to use \a feature to \a policy. + + \sa featurePermissionRequested(), featurePermissionRequestCanceled() +*/ void QWebPage::setFeaturePermission(QWebFrame* frame, Feature feature, PermissionPolicy policy) { #if !ENABLE(NOTIFICATIONS) && !ENABLE(LEGACY_NOTIFICATIONS) && !ENABLE(GEOLOCATION) |