Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2061)

Unified Diff: content/shell/browser/shell_permission_manager.cc

Issue 1316863010: browser: implement multiple permission requesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@request-multiple-content
Patch Set: Rebase on master Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/browser/shell_permission_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 da12bdb8f7e1a4b07f3bbaa81d33a4586db9b382..7d242e9db2ab772169ef8727568f4a4226488bfb 100644
--- a/content/shell/browser/shell_permission_manager.cc
+++ b/content/shell/browser/shell_permission_manager.cc
@@ -27,11 +27,23 @@ int ShellPermissionManager::RequestPermission(
return kNoPendingOperation;
}
-void ShellPermissionManager::CancelPermissionRequest(
- PermissionType permission,
- RenderFrameHost* render_frame_host,
- int request_id,
- const GURL& requesting_origin) {
+int ShellPermissionManager::RequestPermissions(
+ const std::vector<PermissionType>& permissions,
+ content::RenderFrameHost* render_frame_host,
+ const GURL& requesting_origin,
+ bool user_gesture,
+ const base::Callback<void(
+ const std::vector<PermissionStatus>&)>& callback) {
+ std::vector<PermissionStatus> result;
+ for (const auto& permission : permissions) {
+ result.push_back(permission == PermissionType::GEOLOCATION
+ ? PERMISSION_STATUS_GRANTED : PERMISSION_STATUS_DENIED);
+ }
+ callback.Run(result);
+ return kNoPendingOperation;
+}
+
+void ShellPermissionManager::CancelPermissionRequest(int request_id) {
}
void ShellPermissionManager::ResetPermission(
« no previous file with comments | « content/shell/browser/shell_permission_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698