Index: content/browser/permissions/permission_service_impl.h |
diff --git a/content/browser/permissions/permission_service_impl.h b/content/browser/permissions/permission_service_impl.h |
index a6d120cd8be515c6dad0afbab3c6510ee53d2a51..ece8e48aa67701151ab7aba62cfeb2a434308cdd 100644 |
--- a/content/browser/permissions/permission_service_impl.h |
+++ b/content/browser/permissions/permission_service_impl.h |
@@ -14,6 +14,9 @@ |
namespace content { |
+class PermissionPendingRequest; |
+class PermissionPendingSingleRequest; |
+class PermissionPendingMultipleRequest; |
enum class PermissionType; |
// Implements the PermissionService Mojo interface. |
@@ -40,17 +43,10 @@ class PermissionServiceImpl : public PermissionService { |
private: |
using PermissionStatusCallback = mojo::Callback<void(PermissionStatus)>; |
+ using PermissionsStatusCallback = |
+ mojo::Callback<void(mojo::Array<PermissionStatus>)>; |
- struct PendingRequest { |
- PendingRequest(PermissionType permission, const GURL& origin, |
- const PermissionStatusCallback& callback); |
- ~PendingRequest(); |
- |
- PermissionType permission; |
- GURL origin; |
- PermissionStatusCallback callback; |
- }; |
- using RequestsMap = IDMap<PendingRequest, IDMapOwnPointer>; |
+ using RequestsMap = IDMap<PermissionPendingRequest, IDMapOwnPointer>; |
struct PendingSubscription { |
PendingSubscription(PermissionType permission, const GURL& origin, |
@@ -73,6 +69,10 @@ class PermissionServiceImpl : public PermissionService { |
const mojo::String& origin, |
bool user_gesture, |
const PermissionStatusCallback& callback) override; |
+ void RequestPermissions(mojo::Array<PermissionName> permissions, |
+ const mojo::String& origin, |
+ bool user_gesture, |
+ const PermissionsStatusCallback& callback) override; |
void RevokePermission(PermissionName permission, |
const mojo::String& origin, |
const PermissionStatusCallback& callback) override; |
@@ -84,7 +84,14 @@ class PermissionServiceImpl : public PermissionService { |
void OnConnectionError(); |
- void OnRequestPermissionResponse(int request_id, PermissionStatus status); |
+ void OnRequestPermissionResponse(int request_id, |
+ PermissionPendingSingleRequest* request, |
+ PermissionStatus status); |
+ |
+ void OnRequestPermissionsResponse( |
+ int request_id, |
+ PermissionPendingMultipleRequest* request, |
+ const std::vector<PermissionStatus>& status); |
PermissionStatus GetPermissionStatusFromName(PermissionName permission, |
const GURL& origin); |