Index: chrome/browser/permissions/permission_manager.h |
diff --git a/chrome/browser/permissions/permission_manager.h b/chrome/browser/permissions/permission_manager.h |
index 044dfcda5a964765cc7a6a1ff6b7c9deba9affce..d2a945734231ed848e213f44de8d302502690b2a 100644 |
--- a/chrome/browser/permissions/permission_manager.h |
+++ b/chrome/browser/permissions/permission_manager.h |
@@ -6,13 +6,17 @@ |
#define CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_H_ |
#include "base/callback_forward.h" |
+#include "base/containers/scoped_ptr_hash_map.h" |
#include "base/id_map.h" |
#include "base/macros.h" |
+#include "base/memory/weak_ptr.h" |
#include "components/content_settings/core/browser/content_settings_observer.h" |
+#include "components/content_settings/core/common/content_settings.h" |
#include "components/keyed_service/core/keyed_service.h" |
#include "content/public/browser/permission_manager.h" |
+class PermissionRequestID; |
class Profile; |
namespace content { |
@@ -34,10 +38,19 @@ class PermissionManager : public KeyedService, |
const GURL& requesting_origin, |
bool user_gesture, |
const base::Callback<void(content::PermissionStatus)>& callback) override; |
+ void RequestPermissions( |
+ const std::vector<content::PermissionType>& permissions, |
+ content::RenderFrameHost* render_frame_host, |
+ int request_id, |
+ const GURL& requesting_origin, |
+ bool user_gesture, |
+ const base::Callback<void(const StatusVector&)>& callback) override; |
void CancelPermissionRequest(content::PermissionType permission, |
content::RenderFrameHost* render_frame_host, |
int request_id, |
const GURL& requesting_origin) override; |
+ void CancelPermissionsRequest(content::RenderFrameHost* render_frame_host, |
+ int request_id) override; |
void ResetPermission(content::PermissionType permission, |
const GURL& requesting_origin, |
const GURL& embedding_origin) override; |
@@ -59,6 +72,18 @@ class PermissionManager : public KeyedService, |
struct Subscription; |
using SubscriptionsMap = IDMap<Subscription, IDMapOwnPointer>; |
+ struct PendingResponses; |
+ struct PendingResponse; |
+ using PendingResponseMap |
+ = base::ScopedPtrHashMap<int, scoped_ptr<PendingResponses>>; |
+ |
+ void OnRequestsResponse( |
+ const base::Callback<void(const StatusVector&)>& callback, |
+ const PermissionRequestID request, |
+ PendingResponses* pending_responses, |
+ int index, |
+ ContentSetting content_setting); |
+ |
// content_settings::Observer implementation. |
void OnContentSettingChanged(const ContentSettingsPattern& primary_pattern, |
const ContentSettingsPattern& secondary_pattern, |
@@ -67,6 +92,11 @@ class PermissionManager : public KeyedService, |
Profile* profile_; |
SubscriptionsMap subscriptions_; |
+ PendingResponseMap pending_batch_responses_; |
+ |
+ // Need to keep this as the last member so it is destroyed before any other |
+ // fields. |
+ base::WeakPtrFactory<PermissionManager> weak_ptr_factory_; |
DISALLOW_COPY_AND_ASSIGN(PermissionManager); |
}; |