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

Unified Diff: content/public/browser/permission_manager.h

Issue 1316863010: browser: implement multiple permission requesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@request-multiple-content
Patch Set: Fix memory leak in permission_manager Created 5 years, 3 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
Index: content/public/browser/permission_manager.h
diff --git a/content/public/browser/permission_manager.h b/content/public/browser/permission_manager.h
index 55ac893bb66950ad2b11de6fc61e6008d262686c..a7f6607aead04d762ca78fb23b4505d36aa0cd81 100644
--- a/content/public/browser/permission_manager.h
+++ b/content/public/browser/permission_manager.h
@@ -36,6 +36,24 @@ class CONTENT_EXPORT PermissionManager {
bool user_gesture,
const base::Callback<void(PermissionStatus)>& callback) = 0;
+ // Requests multiple permissions on behalf of a frame identified by
+ // render_frame_host.
+ // When the permission request is handled, whether it failed, timed out or
+ // succeeded, the |callback| will be run. The order of statuses in the
+ // returned vector will correspond to the order of requested permission
+ // types.
+ // Returns a request id which can be used to cancel the request (see
+ // CancelPermissionRequest). This can be kNoPendingRequestOrSubscription if
+ // there is no further need to cancel the permission in which case |callback|
+ // was invoked.
+ virtual int RequestPermissions(
+ const std::vector<PermissionType>& permission,
+ RenderFrameHost* render_frame_host,
+ const GURL& requesting_origin,
+ bool user_gesture,
+ const base::Callback<void(
+ const std::vector<PermissionStatus>&)>& callback) = 0;
michaelbai 2015/09/23 17:51:52 Are you going to combine RequestPermission into Re
Lalit Maganti 2015/09/23 17:57:25 Yes you're right but no we are not going to do thi
+
// Cancels a previous permission request specified by |request_id|. Cancelling
// an already cancelled request or providing the |request_id|
// kNoPendingRequestOrSubscription is a no-op.

Powered by Google App Engine
This is Rietveld 408576698