Index: content/child/permissions/permission_dispatcher.h |
diff --git a/content/child/permissions/permission_dispatcher.h b/content/child/permissions/permission_dispatcher.h |
index d90e95aa19d4deeb750571a7b507b93204000594..0493ae289907bfb7f91fa4a3a436f7c99ad79f73 100644 |
--- a/content/child/permissions/permission_dispatcher.h |
+++ b/content/child/permissions/permission_dispatcher.h |
@@ -43,6 +43,10 @@ class PermissionDispatcher : public blink::WebPermissionClient, |
virtual void requestPermission(blink::WebPermissionType, |
const blink::WebURL& origin, |
blink::WebPermissionCallback* callback); |
+ virtual void requestPermissions( |
+ const blink::WebVector<blink::WebPermissionType>& types, |
+ const blink::WebURL& origin, |
+ blink::WebPermissionsCallback* callback); |
virtual void revokePermission(blink::WebPermissionType, |
const blink::WebURL& origin, |
blink::WebPermissionCallback* callback); |
@@ -60,6 +64,11 @@ class PermissionDispatcher : public blink::WebPermissionClient, |
const std::string& origin, |
blink::WebPermissionCallback* callback, |
int worker_thread_id); |
+ void RequestPermissionsForWorker( |
+ const blink::WebVector<blink::WebPermissionType>& types, |
+ const std::string& origin, |
+ blink::WebPermissionsCallback* callback, |
+ int worker_thread_id); |
void RevokePermissionForWorker(blink::WebPermissionType type, |
const std::string& origin, |
blink::WebPermissionCallback* callback, |
@@ -80,12 +89,18 @@ class PermissionDispatcher : public blink::WebPermissionClient, |
using PendingCallbackMap = |
base::ScopedPtrHashMap<uintptr_t, |
scoped_ptr<blink::WebPermissionCallback>>; |
+ using PendingBatchCallbackMap = |
mlamouri (slow - plz ping)
2015/09/02 11:36:41
Name-wise, what about: PermissionCallbackMap and P
Lalit Maganti
2015/09/02 14:24:50
Done.
|
+ base::ScopedPtrHashMap<uintptr_t, |
+ scoped_ptr<blink::WebPermissionsCallback>>; |
// Runs the given |callback| with |status| as a parameter. It has to be run |
// on a worker thread. |
static void RunCallbackOnWorkerThread( |
mlamouri (slow - plz ping)
2015/09/02 11:36:41
Rename to RunPermissionCallbackOnWorkerThread?
Lalit Maganti
2015/09/02 14:24:50
Done.
|
blink::WebPermissionCallback* callback, |
scoped_ptr<blink::WebPermissionStatus> status); |
+ static void RunMultiCallbackOnWorkerThread( |
mlamouri (slow - plz ping)
2015/09/02 11:36:41
RunPermissionsCallbackOnWorkerThread?
Lalit Maganti
2015/09/02 14:24:50
Done.
|
+ blink::WebPermissionsCallback* callback, |
+ scoped_ptr<blink::WebVector<blink::WebPermissionStatus>> statuses); |
// Helper method that returns an initialized PermissionServicePtr. |
PermissionServicePtr& GetPermissionServicePtr(); |
@@ -98,6 +113,11 @@ class PermissionDispatcher : public blink::WebPermissionClient, |
const std::string& origin, |
blink::WebPermissionCallback* callback, |
int worker_thread_id); |
+ void RequestPermissionsInternal( |
+ const blink::WebVector<blink::WebPermissionType>& types, |
+ const std::string& origin, |
+ blink::WebPermissionsCallback* callback, |
+ int worker_thread_id); |
void RevokePermissionInternal(blink::WebPermissionType type, |
const std::string& origin, |
blink::WebPermissionCallback* callback, |
@@ -107,6 +127,9 @@ class PermissionDispatcher : public blink::WebPermissionClient, |
void OnPermissionResponse(int worker_thread_id, |
uintptr_t callback_key, |
PermissionStatus status); |
+ void OnPermissionsResponse(int worker_thread_id, |
mlamouri (slow - plz ping)
2015/09/02 11:36:41
Rename OnRequestPermissionsResponse()
Lalit Maganti
2015/09/02 14:24:50
Done.
|
+ uintptr_t callback_key, |
+ const mojo::Array<PermissionStatus>& status); |
void OnPermissionChanged(blink::WebPermissionType type, |
const std::string& origin, |
blink::WebPermissionObserver* observer, |
@@ -122,6 +145,7 @@ class PermissionDispatcher : public blink::WebPermissionClient, |
PermissionStatus current_status); |
PendingCallbackMap pending_callbacks_; |
+ PendingBatchCallbackMap batch_pending_callbacks_; |
mlamouri (slow - plz ping)
2015/09/02 11:36:41
// Pending callbacks for query(), revoke() and req
Lalit Maganti
2015/09/02 14:24:50
Done.
|
ServiceRegistry* service_registry_; |
PermissionServicePtr permission_service_; |