Index: content/shell/browser/shell_permission_manager.cc |
diff --git a/content/shell/browser/shell_permission_manager.cc b/content/shell/browser/shell_permission_manager.cc |
index fffcfa560c3baf9dd26e7e39c876492fc2650b7e..d78630bbf1b733f3bb525a020eeab8a6ff7f3864 100644 |
--- a/content/shell/browser/shell_permission_manager.cc |
+++ b/content/shell/browser/shell_permission_manager.cc |
@@ -22,16 +22,30 @@ void ShellPermissionManager::RequestPermission( |
int request_id, |
const GURL& requesting_origin, |
bool user_gesture, |
- const base::Callback<void(PermissionStatus)>& callback) { |
+ const RequestCallback& callback) { |
callback.Run(permission == PermissionType::GEOLOCATION |
? PERMISSION_STATUS_GRANTED : PERMISSION_STATUS_DENIED); |
} |
+void ShellPermissionManager::RequestPermission( |
+ const std::vector<PermissionType>& permissions, |
+ content::RenderFrameHost* render_frame_host, |
+ int request_id, |
+ const GURL& requesting_origin, |
+ bool user_gesture, |
+ const BatchRequestCallback& callback) { |
+ std::vector<PermissionStatus> statuses(permissions.size(), |
+ PERMISSION_STATUS_DENIED); |
+ for (size_t i = 0; i < permissions.size(); i++) { |
+ statuses[i] = permissions[i] == PermissionType::GEOLOCATION |
mlamouri (slow - plz ping)
2015/09/02 11:36:42
Same as above.
|
+ ? PERMISSION_STATUS_GRANTED : PERMISSION_STATUS_DENIED; |
+ } |
+ callback.Run(statuses); |
+} |
+ |
void ShellPermissionManager::CancelPermissionRequest( |
- PermissionType permission, |
RenderFrameHost* render_frame_host, |
- int request_id, |
- const GURL& requesting_origin) { |
+ int request_id) { |
} |
void ShellPermissionManager::ResetPermission( |