diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-10-17 16:01:40 +0200 |
---|---|---|
committer | Andras Becsi <andras.becsi@digia.com> | 2014-10-20 10:21:04 +0200 |
commit | acce17434876082ba46c631109b48e641185ca17 (patch) | |
tree | 08520f64ec4a8ce2841a0ceb4d6e6c3851eb5b46 /src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc | |
parent | 181d8fdf4cb45f31dd1692c5c6ea677eaa697929 (diff) |
Implement acceptNavigationRequest for the widgets API.
This is the equivalent API for navigationRequested in QtQuick.
This patch also enables and updates tests that depended on this
API, and removes the ones that we will not support.
Change-Id: I28970c11225420a9680fbd767880130492664179
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Diffstat (limited to 'src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc')
-rw-r--r-- | src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc index 983b80d7e..e254e6753 100644 --- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc @@ -147,6 +147,21 @@ */ /*! + \enum QWebEnginePage::NavigationType + + This enum describes the type of a navigation request. + + \value NavigationTypeLinkClicked The navigation request resulted from a clicked link. + \value NavigationTypeTyped The navigation request resulted from an explicitly loaded url. + \value NavigationTypeFormSubmitted The navigation request resulted from a form submission. + \value NavigationTypeBackForward The navigation request resulted from a back/forward action. + \value NavigationTypeReload The navigation request resulted from a reload action. + \value NavigationTypeOther The navigation request was triggered by other means not covered by the above. + + \sa acceptNavigationRequest() +*/ + +/*! \enum QWebEnginePage::Feature This enum describes the platform feature access categories that the user may be asked to grant or deny access to. @@ -211,6 +226,15 @@ */ /*! + \fn bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame) + This function is called whenever there is a request to navigate to a specified \a url by means of the specified navigation type \atype. + The \a isMainFrame argument marks if the request corresponds to the main frame, or a sub frame. + If the request is accepted Chromium will continue to load the page, else the request will be ignored. + The default implementation accepts the navigation request. +*/ + + +/*! \fn void QWebEnginePage::javaScriptAlert(const QUrl &securityOrigin, const QString& msg) This function is called whenever a JavaScript program running in a frame affiliated with \a securityOrigin calls the alert() function with the message \a msg. |