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-Original-Commit-Position: refs/heads/master@{#783959}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5c8d90e6d4619fb874c68bfc6adc71856ed12710
  • Loading branch information
Charlie Hu authored and Commit Bot committed Jun 30, 2020
1 parent 68c5432 commit ff73e64
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions 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
4 changes: 4 additions & 0 deletions blink/renderer/platform/exported/web_runtime_features.cc
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
4 changes: 4 additions & 0 deletions blink/renderer/platform/runtime_enabled_features.json5
Expand Up @@ -1419,6 +1419,10 @@
name: "Permissions",
status: "stable",
},
{
name: "PermissionsPolicyHeader",
status: "experimental"
},
{
name: "PermissionsRequestRevoke",
status: "experimental",
Expand Down

0 comments on commit ff73e64

Please sign in to comment.