Skip to content

Commit

Permalink
Add flags for Permissions Policy header
Browse files Browse the repository at this point in the history
Add flags for the work of renaming Feature Policy as Permissions Policy

The rename discussion was at
w3c/webappsec-permissions-policy#359.
The PR that made the actual changes was
w3c/webappsec-permissions-policy#379
committed as
w3c/webappsec-permissions-policy@14898d1.

Enable this in Chrome with --enable-features=PermissionsPolicyHeader

Bug: 1095641
Change-Id: Iccb6114bfeddb219e2cfe1a788d530dbcd8ba179
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2246870
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Charlie Hu <chenleihu@google.com>
Cr-Commit-Position: refs/heads/master@{#783959}
  • Loading branch information
Charlie Hu authored and Commit Bot committed Jun 30, 2020
1 parent 5f9b778 commit 5c8d90e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content/public/common/content_features.cc
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions content/public/common/content_features.h
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions third_party/blink/public/platform/web_runtime_features.h
Expand Up @@ -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);
Expand Down
Expand Up @@ -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);
}
Expand Down
Expand Up @@ -1419,6 +1419,10 @@
name: "Permissions",
status: "stable",
},
{
name: "PermissionsPolicyHeader",
status: "experimental"
},
{
name: "PermissionsRequestRevoke",
status: "experimental",
Expand Down

0 comments on commit 5c8d90e

Please sign in to comment.