diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-10 16:56:53 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-25 10:00:35 +0000 |
commit | 44d980ff67867cb65bfe8035326be2b461ca7172 (patch) | |
tree | b17af444fe62213fd7ea4d740c1abbe8d6b1002d /src/core/permission_manager_qt.cpp | |
parent | 38944be4048e19a0ab6f3b8961f58e36048b53a8 (diff) |
Rebasing on Chromium 45
Fixing the minor differences needed to work with Chromium 45.
Change-Id: I5036b4b9a069d45e8dd37e24fab84cdfe5e67acc
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/core/permission_manager_qt.cpp')
-rw-r--r-- | src/core/permission_manager_qt.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/permission_manager_qt.cpp b/src/core/permission_manager_qt.cpp index 865874fe6..d89b530ee 100644 --- a/src/core/permission_manager_qt.cpp +++ b/src/core/permission_manager_qt.cpp @@ -36,7 +36,10 @@ #include "permission_manager_qt.h" +#include "content/browser/renderer_host/render_view_host_delegate.h" #include "content/public/browser/permission_type.h" +#include "content/public/browser/render_frame_host.h" +#include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" #include "type_conversion.h" @@ -90,7 +93,7 @@ void PermissionManagerQt::permissionRequestReply(const QUrl &origin, BrowserCont } void PermissionManagerQt::RequestPermission(content::PermissionType permission, - content::WebContents* web_contents, + content::RenderFrameHost *frameHost, int request_id, const GURL& requesting_origin, bool user_gesture, @@ -103,7 +106,8 @@ void PermissionManagerQt::RequestPermission(content::PermissionType permission, return; } - WebContentsDelegateQt* contentsDelegate = static_cast<WebContentsDelegateQt*>(web_contents->GetDelegate()); + content::WebContents *webContents = frameHost->GetRenderViewHost()->GetDelegate()->GetAsWebContents(); + WebContentsDelegateQt* contentsDelegate = static_cast<WebContentsDelegateQt*>(webContents->GetDelegate()); Q_ASSERT(contentsDelegate); Request request = { request_id, @@ -117,11 +121,11 @@ void PermissionManagerQt::RequestPermission(content::PermissionType permission, } void PermissionManagerQt::CancelPermissionRequest(content::PermissionType permission, - content::WebContents* web_contents, + content::RenderFrameHost *frameHost, int request_id, const GURL& requesting_origin) { - Q_UNUSED(web_contents); + Q_UNUSED(frameHost); const BrowserContextAdapter::PermissionType permissionType = toQt(permission); if (permissionType == BrowserContextAdapter::UnsupportedPermission) return; |