diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-02-04 13:11:02 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-02-04 12:22:50 +0000 |
commit | 0622e02b9da5b93c6824367732970af0214601fb (patch) | |
tree | 32b133d8d10683c833ae5fcee5e19015f5a7f857 /src/core/web_contents_delegate_qt.h | |
parent | 49a08bdf0ce3f42607d42eaefb693293c5bb53b9 (diff) |
Handle multiple feature requests
This patch makes it possible to have multiple outstanding feature
requests and adds hooks for chromium to cancel requests.
Change-Id: Icbeb30aa39ace090d853a29aefaeebbe726fe251
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src/core/web_contents_delegate_qt.h')
-rw-r--r-- | src/core/web_contents_delegate_qt.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h index 324a191fb..cb006106e 100644 --- a/src/core/web_contents_delegate_qt.h +++ b/src/core/web_contents_delegate_qt.h @@ -92,16 +92,14 @@ public: void overrideWebPreferences(content::WebContents *, content::WebPreferences*); void allowCertificateError(const QSharedPointer<CertificateErrorController> &) ; - void requestGeolocationPermission(const GURL &requestingFrameOrigin, base::Callback<void (bool)> resultCallback); + void requestGeolocationPermission(const GURL &requestingFrameOrigin, const base::Callback<void (bool)> &resultCallback); + void cancelGeolocationPermissionRequest(const GURL &requestingFrameOrigin); void geolocationPermissionReply(const QUrl&, bool permission); private: WebContentsAdapter *createWindow(content::WebContents *new_contents, WindowOpenDisposition disposition, const gfx::Rect& initial_pos, bool user_gesture); - struct { - QUrl url; - base::Callback<void (bool)> callback; - } m_lastGeolocationPermissionRequest; + QHash<QUrl, base::Callback<void (bool)> > m_geolocationPermissionRequests; WebContentsAdapterClient *m_viewClient; QString m_lastSearchedString; |