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

Unified Diff: content/browser/permissions/permission_service_impl.h

Issue 1316863010: browser: implement multiple permission requesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@request-multiple-content
Patch Set: Cut down on CL size 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/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 736f39703c64c22213c9a4c0a3a5927082178846..4fdc99db65cd6aafc9fc6636212322001da75fd5 100644
--- a/content/browser/permissions/permission_service_impl.h
+++ b/content/browser/permissions/permission_service_impl.h
@@ -14,6 +14,7 @@
namespace content {
+class PermissionPendingRequest;
mlamouri (slow - plz ping) 2015/09/16 15:08:09 Hmm, I'm sure this is a stupid question but... wha
Lalit Maganti 2015/09/16 17:21:18 Not stupid at all. It's a very old class which no
enum class PermissionType;
// Implements the PermissionService Mojo interface.
@@ -26,7 +27,6 @@ enum class PermissionType;
class PermissionServiceImpl : public PermissionService {
public:
~PermissionServiceImpl() override;
-
// Clear pending operations currently run by the service. This will be called
// by PermissionServiceContext when it will need the service to clear its
// state for example, if the frame changes.
@@ -44,14 +44,13 @@ class PermissionServiceImpl : public PermissionService {
mojo::Callback<void(mojo::Array<PermissionStatus>)>;
struct PendingRequest {
- PendingRequest(PermissionType permission, const GURL& origin,
- const PermissionStatusCallback& callback);
+ PendingRequest(const PermissionsStatusCallback& callback,
+ int request_count);
~PendingRequest();
int manager_id;
- PermissionType permission;
- GURL origin;
- PermissionStatusCallback callback;
+ PermissionsStatusCallback callback;
+ int request_count;
};
using RequestsMap = IDMap<PendingRequest, IDMapOwnPointer>;
@@ -91,7 +90,15 @@ class PermissionServiceImpl : public PermissionService {
void OnConnectionError();
- void OnRequestPermissionResponse(int request_id, PermissionStatus status);
+ void RequestPermissionsInternal(
+ mojo::Array<PermissionName> permissions,
+ const mojo::String& origin,
+ bool user_gesture,
+ const PermissionsStatusCallback& callback);
+
+ void OnRequestPermissionsResponse(
+ int request_id,
+ const std::vector<PermissionStatus>& status);
PermissionStatus GetPermissionStatusFromName(PermissionName permission,
const GURL& origin);

Powered by Google App Engine
This is Rietveld 408576698