Index: content/shell/browser/layout_test/layout_test_permission_manager.cc |
diff --git a/content/shell/browser/layout_test/layout_test_permission_manager.cc b/content/shell/browser/layout_test/layout_test_permission_manager.cc |
index 21300f30e3c44f13d11f453dbe925c573692426e..398f62b0a62b02c70882046a34f295d975765c95 100644 |
--- a/content/shell/browser/layout_test/layout_test_permission_manager.cc |
+++ b/content/shell/browser/layout_test/layout_test_permission_manager.cc |
@@ -67,7 +67,7 @@ void LayoutTestPermissionManager::RequestPermission( |
int request_id, |
const GURL& requesting_origin, |
bool user_gesture, |
- const base::Callback<void(PermissionStatus)>& callback) { |
+ const RequestCallback& callback) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
callback.Run(GetPermissionStatus( |
@@ -76,11 +76,29 @@ void LayoutTestPermissionManager::RequestPermission( |
->GetLastCommittedURL().GetOrigin())); |
} |
+void LayoutTestPermissionManager::RequestPermission( |
+ const std::vector<PermissionType>& permissions, |
+ content::RenderFrameHost* render_frame_host, |
+ int request_id, |
+ const GURL& requesting_origin, |
+ bool user_gesture, |
+ const BatchRequestCallback& callback) { |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
+ |
+ std::vector<PermissionStatus> statuses(permissions.size(), |
+ PERMISSION_STATUS_DENIED); |
mlamouri (slow - plz ping)
2015/08/21 10:24:41
nit: I would move the two arguments on this second
Lalit Maganti
2015/08/25 16:58:27
Done.
|
+ for (size_t i = 0; i < permissions.size(); i++) { |
+ statuses[i] = GetPermissionStatus( |
+ permissions[i], requesting_origin, |
+ WebContents::FromRenderFrameHost(render_frame_host) |
+ ->GetLastCommittedURL().GetOrigin()); |
+ } |
+ callback.Run(statuses); |
+} |
+ |
void LayoutTestPermissionManager::CancelPermissionRequest( |
- PermissionType permission, |
RenderFrameHost* render_frame_host, |
- int request_id, |
- const GURL& requesting_origin) { |
+ int request_id) { |
DCHECK_CURRENTLY_ON(BrowserThread::UI); |
} |