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/content_browser_client_qt.cpp | |
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/content_browser_client_qt.cpp')
-rw-r--r-- | src/core/content_browser_client_qt.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index c83b28c1a..d9f7e31be 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -399,7 +399,6 @@ void ContentBrowserClientQt::RequestPermission(content::PermissionType permissio const base::Callback<void(bool)>& result_callback) { Q_UNUSED(bridge_id); - Q_UNUSED(requesting_frame); Q_UNUSED(user_gesture); WebContentsDelegateQt* contentsDelegate = static_cast<WebContentsDelegateQt*>(web_contents->GetDelegate()); Q_ASSERT(contentsDelegate); @@ -409,6 +408,19 @@ void ContentBrowserClientQt::RequestPermission(content::PermissionType permissio result_callback.Run(false); } + +void ContentBrowserClientQt::CancelPermissionRequest(content::PermissionType permission, + content::WebContents* web_contents, + int bridge_id, + const GURL& requesting_frame) +{ + Q_UNUSED(bridge_id); + WebContentsDelegateQt* contentsDelegate = static_cast<WebContentsDelegateQt*>(web_contents->GetDelegate()); + Q_ASSERT(contentsDelegate); + if (permission == content::PERMISSION_GEOLOCATION) + contentsDelegate->cancelGeolocationPermissionRequest(requesting_frame); +} + blink::WebNotificationPermission ContentBrowserClientQt::CheckDesktopNotificationPermission(const GURL&, content::ResourceContext *, int ) { return blink::WebNotificationPermission::WebNotificationPermissionDenied; |