Index: content/child/permissions/permission_dispatcher.h |
diff --git a/content/child/permissions/permission_dispatcher.h b/content/child/permissions/permission_dispatcher.h |
index 769222eb5649347b4732f65a13431be8dbb559dd..f6d4572ff1f73535399845c346ae952e6fe7c772 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, |
@@ -78,12 +87,17 @@ class PermissionDispatcher : public blink::WebPermissionClient, |
private: |
using PendingCallbackVector = ScopedVector<blink::WebPermissionCallback>; |
+ using PendingBatchCallbackVector = |
+ ScopedVector<blink::WebPermissionsCallback>; |
// Runs the given |callback| with |status| as a parameter. It has to be run |
// on a worker thread. |
static void RunCallbackOnWorkerThread( |
blink::WebPermissionCallback* callback, |
scoped_ptr<blink::WebPermissionStatus> status); |
+ static void RunMultiCallbackOnWorkerThread( |
+ blink::WebPermissionsCallback* callback, |
+ scoped_ptr<blink::WebVector<blink::WebPermissionStatus>> statuses); |
// Helper method that returns an initialized PermissionServicePtr. |
PermissionServicePtr& GetPermissionServicePtr(); |
@@ -96,6 +110,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, |
@@ -105,6 +124,10 @@ class PermissionDispatcher : public blink::WebPermissionClient, |
void OnPermissionResponse(int worker_thread_id, |
PendingCallbackVector::iterator callback_iterator, |
PermissionStatus status); |
+ void OnPermissionsResponse( |
+ int worker_thread_id, |
+ PendingBatchCallbackVector::iterator callback_iterator, |
+ const mojo::Array<PermissionStatus>& status); |
void OnPermissionChanged(blink::WebPermissionType type, |
const std::string& origin, |
blink::WebPermissionObserver* observer, |
@@ -120,6 +143,7 @@ class PermissionDispatcher : public blink::WebPermissionClient, |
PermissionStatus current_status); |
PendingCallbackVector pending_callbacks_; |
+ PendingBatchCallbackVector batch_pending_callbacks_; |
ServiceRegistry* service_registry_; |
PermissionServicePtr permission_service_; |