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

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

Issue 1419083002: Permissions: browser/ side implementation of multiple permissions request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: content/public/browser/permission_manager.h
diff --git a/content/public/browser/permission_manager.h b/content/public/browser/permission_manager.h
index 0108b66d5e4d604c67d8b92c26d4d46e22153167..32c8f7fa5109a6c9133a2b95ef2080eac5317fdc 100644
--- a/content/public/browser/permission_manager.h
+++ b/content/public/browser/permission_manager.h
@@ -40,6 +40,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 kNoPendingOperation 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;
+
// Cancels a previous permission request specified by |request_id|. Cancelling
// an already cancelled request or providing the |request_id|
// kNoPendingOperation is a no-op.

Powered by Google App Engine
This is Rietveld 408576698