Index: chrome/browser/permissions/permission_context_base.h |
diff --git a/chrome/browser/permissions/permission_context_base.h b/chrome/browser/permissions/permission_context_base.h |
index 72ef40eee34a40502376ba08970940774901d7b8..e50a900b1bed6053e7ba723a282c3ad010cdfb8c 100644 |
--- a/chrome/browser/permissions/permission_context_base.h |
+++ b/chrome/browser/permissions/permission_context_base.h |
@@ -16,6 +16,7 @@ |
#include "components/content_settings/core/common/content_settings.h" |
#include "components/content_settings/core/common/content_settings_types.h" |
#include "components/keyed_service/core/keyed_service.h" |
+#include "third_party/WebKit/public/platform/WebFeaturePolicyFeature.h" |
#if defined(OS_ANDROID) |
class PermissionQueueController; |
@@ -58,7 +59,8 @@ using BrowserPermissionCallback = base::Callback<void(ContentSetting)>; |
class PermissionContextBase : public KeyedService { |
public: |
PermissionContextBase(Profile* profile, |
- const ContentSettingsType content_settings_type); |
+ ContentSettingsType content_settings_type, |
+ blink::WebFeaturePolicyFeature feature_policy_feature); |
~PermissionContextBase() override; |
// A field trial used to enable the global permissions kill switch. |
@@ -180,6 +182,8 @@ class PermissionContextBase : public KeyedService { |
private: |
friend class PermissionContextBaseTests; |
+ bool PermissionAllowedByFeaturePolicy(content::RenderFrameHost* rfh) const; |
+ |
// Called when a request is no longer used so it can be cleaned up. |
void CleanUpRequest(const PermissionRequestID& id); |
@@ -204,6 +208,7 @@ class PermissionContextBase : public KeyedService { |
Profile* profile_; |
const ContentSettingsType content_settings_type_; |
+ const blink::WebFeaturePolicyFeature feature_policy_feature_; |
#if defined(OS_ANDROID) |
std::unique_ptr<PermissionQueueController> permission_queue_controller_; |
#endif |