diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-06-17 18:06:12 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-07-01 11:50:02 +0200 |
commit | 3973b5b2a3fb29c0b38044e52f3166684fb3d5fc (patch) | |
tree | 5b9e5957984cc096ae26cf775224785b3b5a6600 /src/core/web_contents_delegate_qt.cpp | |
parent | e3c6a9c704959a8e291026b8edb6d24c8cf38643 (diff) |
Permission Management for Chromium 44
Implementing the new PermissionManager API.
Change-Id: If0fdac24b8fec561a898aba009345576b5ce7fc6
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/core/web_contents_delegate_qt.cpp')
-rw-r--r-- | src/core/web_contents_delegate_qt.cpp | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp index ea4bf3a03..865ee8e2c 100644 --- a/src/core/web_contents_delegate_qt.cpp +++ b/src/core/web_contents_delegate_qt.cpp @@ -337,28 +337,9 @@ void WebContentsDelegateQt::allowCertificateError(const QSharedPointer<Certifica m_viewClient->allowCertificateError(errorController); } -void WebContentsDelegateQt::requestGeolocationPermission(const GURL &requestingFrameOrigin, const base::Callback<void (bool)> &resultCallback) +void WebContentsDelegateQt::requestGeolocationPermission(const QUrl &requestingOrigin) { - QUrl url = toQt(requestingFrameOrigin); - bool newRequest = !m_geolocationPermissionRequests.contains(url); - m_geolocationPermissionRequests[url] = resultCallback; - if (newRequest) - m_viewClient->runGeolocationPermissionRequest(url); -} - -void WebContentsDelegateQt::cancelGeolocationPermissionRequest(const GURL &requestingFrameOrigin) -{ - m_geolocationPermissionRequests.remove(toQt(requestingFrameOrigin)); - // FIXME: Tell the API layer to cancel the permission request? -} - -void WebContentsDelegateQt::geolocationPermissionReply(const QUrl &origin, bool permission) -{ - auto it = m_geolocationPermissionRequests.find(origin); - if (it != m_geolocationPermissionRequests.end()) { - (*it).Run(permission); - m_geolocationPermissionRequests.erase(it); - } + m_viewClient->runGeolocationPermissionRequest(requestingOrigin); } void WebContentsDelegateQt::ShowValidationMessage(content::WebContents *web_contents, const gfx::Rect &anchor_in_root_view, const base::string16 &main_text, const base::string16 &sub_text) |