diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc index 3f0ae022630e6d..782eac49a62f68 100644 --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc @@ -404,6 +404,10 @@ const base::Feature kOverscrollHistoryNavigation { const base::Feature kPeriodicBackgroundSync{"PeriodicBackgroundSync", base::FEATURE_DISABLED_BY_DEFAULT}; +// Enable permission policy for configuring and restricting feature behavior. +const base::Feature kPermissionsPolicyHeader{"PermissionsPolicyHeader", + base::FEATURE_DISABLED_BY_DEFAULT}; + // If Pepper 3D Image Chromium is allowed, this feature controls whether it is // enabled. const base::Feature kPepper3DImageChromium { diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h index 5f69a8fb40625d..492edaf4ae28d2 100644 --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h @@ -93,6 +93,7 @@ CONTENT_EXPORT extern const base::Feature kOriginIsolationHeader; CONTENT_EXPORT extern const base::Feature kOriginPolicy; CONTENT_EXPORT extern const base::Feature kOverscrollHistoryNavigation; CONTENT_EXPORT extern const base::Feature kPeriodicBackgroundSync; +CONTENT_EXPORT extern const base::Feature kPermissionsPolicyHeader; CONTENT_EXPORT extern const base::Feature kPepper3DImageChromium; CONTENT_EXPORT extern const base::Feature kPepperCrossOriginRedirectRestriction; CONTENT_EXPORT extern const base::Feature kPreferCompositingToLCDText; diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h index 0256e624c46b24..a0ac8c16be61fb 100644 --- a/third_party/blink/public/platform/web_runtime_features.h +++ b/third_party/blink/public/platform/web_runtime_features.h @@ -144,6 +144,7 @@ class WebRuntimeFeatures { bool); BLINK_PLATFORM_EXPORT static void EnablePeriodicBackgroundSync(bool); BLINK_PLATFORM_EXPORT static void EnablePermissionsAPI(bool); + BLINK_PLATFORM_EXPORT static void EnablePermissionsPolicyHeader(bool); BLINK_PLATFORM_EXPORT static void EnablePictureInPicture(bool); BLINK_PLATFORM_EXPORT static void EnablePictureInPictureAPI(bool); BLINK_PLATFORM_EXPORT static void EnablePointerLockOptions(bool); diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc index ceca33cba22879..9b63e0d61af3b7 100644 --- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc +++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc @@ -597,6 +597,10 @@ void WebRuntimeFeatures::EnableDocumentPolicy(bool enable) { RuntimeEnabledFeatures::SetDocumentPolicyEnabled(enable); } +void WebRuntimeFeatures::EnablePermissionsPolicyHeader(bool enable) { + RuntimeEnabledFeatures::SetPermissionsPolicyHeaderEnabled(enable); +} + void WebRuntimeFeatures::EnableAutoplayIgnoresWebAudio(bool enable) { RuntimeEnabledFeatures::SetAutoplayIgnoresWebAudioEnabled(enable); } diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index 8168172745491c..de6abf1590427a 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5 @@ -1419,6 +1419,10 @@ name: "Permissions", status: "stable", }, + { + name: "PermissionsPolicyHeader", + status: "experimental" + }, { name: "PermissionsRequestRevoke", status: "experimental",