{
// All permissions policy (https://github.com/w3c/webappsec-permissions-policy)
// features are defined here.
// For more details on adding a new permissions policy, see:
// https://chromium.googlesource.com/chromium/src/+/main/third_party/blink/common/permissions_policy/README.md
// TODO(yashard): Add all permissions policy features here.
parameters: {
// "depends_on" specifies relationship to runtime features defined
// in "runtime_enabled_features.json5":
// depends_on: ["feature1", "feature2", ...]
// * If the depends_on features are *only* runtime features, the feature is
// available if any of the runtime features are enabled.
// * If the depends_on list includes origin trial features, the feature is
// available if any of the origin trial features are enabled.
depends_on: {
default: [],
valid_type: "list",
},
// permissions_policy_name: "FEATURE_NAME" is used to specify the policy name
// which gets parsed from the header or the allow attribute.
permissions_policy_name: {
},
// feature_default: Default allowlist state for feature. This corresponds
// to enum class |PermissionsPolicyFeatureDefault| in
// public/common/permissions_policy/permissions_policy_features.h
feature_default: {
default: "EnableForSelf",
valid_values: [
"EnableForAll",
"EnableForSelf",
]
},
// "default_value_behind_flag" specifies default_value override values
// based on different runtime flags set.
//
// When multiple flags are set, default_value correspond to the first
// flag in the list will be used, e.g.
// default_value_behind_flag: [
// ["A", "EnableForSelf"],
// ["B", "EnableForAll"],
// ]
// "EnableForSelf" will be used as default value when both flag A and B are set.
//
// Note: the runtime flags here refer to features defined in
// "third_party/blink/public/common/features.h", instead of those defined in
// "runtime_enabled_features.json5" because the latter is only available
// on renderer side, while default_value is needed from browser side as
// well.
default_value_behind_flag: {
default: [],
valid_type: "list",
},
// "visibility" specifies which contexts a feature should be visible to. If
// a features is not visibile to a document, it cannot be granted, but also
// will not be exposed in `document.featurePolicy.features()`.
visibility: {
default: "All",
valid_values: [
"All",
"IsolatedContext"
]
}
},
data: [
{
name: "Accelerometer",
permissions_policy_name: "accelerometer",
},
{
name: "AllScreensCapture",
permissions_policy_name: "all-screens-capture",
depends_on: ["GetAllScreensMedia"],
visibility: "IsolatedContext",
},
{
name: "AmbientLightSensor",
permissions_policy_name: "ambient-light-sensor",
depends_on: ["SensorExtraClasses"],
},
{
name: "AttributionReporting",
permissions_policy_name: "attribution-reporting",
feature_default: "EnableForAll",
depends_on: ["AttributionReporting", "AttributionReportingCrossAppWeb"],
},
{
name: "Autoplay",
permissions_policy_name: "autoplay",
},
{
name: "Bluetooth",
permissions_policy_name: "bluetooth",
depends_on: ["WebBluetooth"],
},
{
name: "BrowsingTopics",
permissions_policy_name: "browsing-topics",
feature_default: "EnableForAll",
depends_on: ["TopicsAPI"],
},
{
name: "BrowsingTopicsBackwardCompatible",
permissions_policy_name: "interest-cohort",
feature_default: "EnableForAll",
depends_on: ["TopicsAPI"],
},
{
name: "Camera",
permissions_policy_name: "camera",
},
{
name: "CapturedSurfaceControl",
permissions_policy_name: "captured-surface-control",
depends_on: ["CapturedSurfaceControl"],
},
{
name: "ClientHintDPR",
permissions_policy_name: "ch-dpr",
},
{
name: "ClientHintDeviceMemory",
permissions_policy_name: "ch-device-memory",
},
{
name: "ClientHintDownlink",
permissions_policy_name: "ch-downlink",
},
{
name: "ClientHintECT",
permissions_policy_name: "ch-ect",
},
{
name: "ClientHintPrefersColorScheme",
permissions_policy_name: "ch-prefers-color-scheme",
},
{
name: "ClientHintPrefersReducedMotion",
permissions_policy_name: "ch-prefers-reduced-motion",
},
{
name: "ClientHintPrefersReducedTransparency",
permissions_policy_name: "ch-prefers-reduced-transparency",
},
{
name: "ClientHintRTT",
permissions_policy_name: "ch-rtt",
},
{
name: "ClientHintSaveData",
permissions_policy_name: "ch-save-data",
feature_default: "EnableForAll",
},
{
name: "ClientHintUA",
permissions_policy_name: "ch-ua",
feature_default: "EnableForAll",
},
{
name: "ClientHintUAArch",
permissions_policy_name: "ch-ua-arch",
},
{
name: "ClientHintUABitness",
permissions_policy_name: "ch-ua-bitness",
},
{
name: "ClientHintUAFormFactors",
permissions_policy_name: "ch-ua-form-factors",
},
{
name: "ClientHintUAPlatform",
permissions_policy_name: "ch-ua-platform",
feature_default: "EnableForAll",
},
{
name: "ClientHintUAModel",
permissions_policy_name: "ch-ua-model",
},
{
name: "ClientHintUAMobile",
permissions_policy_name: "ch-ua-mobile",
feature_default: "EnableForAll",
},
{
name: "ClientHintUAFullVersion",
permissions_policy_name: "ch-ua-full-version",
},
{
name: "ClientHintUAFullVersionList",
permissions_policy_name: "ch-ua-full-version-list",
},
{
name: "ClientHintUAPlatformVersion",
permissions_policy_name: "ch-ua-platform-version",
},
{
name: "ClientHintUAWoW64",
permissions_policy_name: "ch-ua-wow64",
},
{
name: "ClientHintViewportHeight",
permissions_policy_name: "ch-viewport-height",
depends_on: ["ViewportHeightClientHintHeader"],
},
{
name: "ClientHintViewportWidth",
permissions_policy_name: "ch-viewport-width",
},
{
name: "ClientHintWidth",
permissions_policy_name: "ch-width",
},
{
name: "ClipboardRead",
permissions_policy_name: "clipboard-read",
},
{
name: "ClipboardWrite",
permissions_policy_name: "clipboard-write",
},
{
name: "ComputePressure",
permissions_policy_name: "compute-pressure",
depends_on: ["ComputePressure"],
},
{
name: "CrossOriginIsolated",
permissions_policy_name: "cross-origin-isolated",
},
{
name: "DeferredFetch",
permissions_policy_name: "deferred-fetch",
depends_on: ["FetchLaterAPI"],
},
{
name: "DigitalCredentialsGet",
permissions_policy_name: "digital-credentials-get",
depends_on: ["WebIdentityDigitalCredentials"],
},
{
name: "DirectSockets",
permissions_policy_name: "direct-sockets",
depends_on: ["DirectSockets"],
visibility: "IsolatedContext",
},
{
name: "DisplayCapture",
permissions_policy_name: "display-capture",
},
{
name: "EncryptedMedia",
permissions_policy_name: "encrypted-media",
},
{
name: "ExecutionWhileOutOfViewport",
permissions_policy_name: "execution-while-out-of-viewport",
feature_default: "EnableForAll",
depends_on: ["FreezeFramesOnVisibility"],
},
{
name: "ExecutionWhileNotRendered",
permissions_policy_name: "execution-while-not-rendered",
feature_default: "EnableForAll",
depends_on: ["FreezeFramesOnVisibility"],
},
{
name: "FocusWithoutUserActivation",
permissions_policy_name: "focus-without-user-activation",
feature_default: "EnableForAll",
depends_on: ["BlockingFocusWithoutUserActivation"],
},
{
name: "Fullscreen",
permissions_policy_name: "fullscreen",
},
{
name: "Frobulate",
permissions_policy_name: "frobulate",
depends_on: ["OriginTrialsSampleAPI"],
},
{
name: "Gamepad",
permissions_policy_name: "gamepad",
feature_default: "EnableForAll",
},
{
name: "Geolocation",
permissions_policy_name: "geolocation",
},
{
name: "Gyroscope",
permissions_policy_name: "gyroscope",
},
{
name: "Hid",
permissions_policy_name: "hid",
depends_on: ["WebHID"],
},
{
name: "IdentityCredentialsGet",
permissions_policy_name: "identity-credentials-get",
},
{
name: "IdleDetection",
permissions_policy_name: "idle-detection",
},
{
name: "JoinAdInterestGroup",
permissions_policy_name: "join-ad-interest-group",
feature_default: "EnableForAll",
depends_on: ["AdInterestGroupAPI"],
default_value_behind_flag: [
["AdInterestGroupAPIRestrictedPolicyByDefault", "EnableForSelf"],
],
},
{
name: "KeyboardMap",
permissions_policy_name: "keyboard-map",
},
{
name: "LocalFonts",
permissions_policy_name: "local-fonts",
depends_on: ["FontAccess"],
},
{
name: "Magnetometer",
permissions_policy_name: "magnetometer",
},
{
name: "MediaPlaybackWhileNotVisible",
permissions_policy_name: "media-playback-while-not-visible",
feature_default: "EnableForAll",
depends_on: ["MediaPlaybackWhileNotVisiblePermissionPolicy"],
},
{
name: "Microphone",
permissions_policy_name: "microphone",
},
{
name: "MidiFeature",
permissions_policy_name: "midi",
},
{
name: "OTPCredentials",
permissions_policy_name: "otp-credentials",
depends_on: ["WebOTPAssertionFeaturePolicy"],
},
{
name: "PartitionedPopins",
permissions_policy_name: "popins",
feature_default: "EnableForSelf",
depends_on: ["PartitionedPopins"],
},
{
name: "Payment",
permissions_policy_name: "payment",
depends_on: ["PaymentRequest"],
},
{
name: "PictureInPicture",
permissions_policy_name: "picture-in-picture",
feature_default: "EnableForAll",
},
{
name: "PrivateAggregation",
permissions_policy_name: "private-aggregation",
feature_default: "EnableForAll",
depends_on: ["SharedStorageAPI", "Fledge"],
},
{
name: "PrivateStateTokenIssuance",
permissions_policy_name: "private-state-token-issuance",
depends_on: ["PrivateStateTokens"],
},
{
name: "PublicKeyCredentialsCreate",
permissions_policy_name: "publickey-credentials-create",
},
{
name: "PublicKeyCredentialsGet",
permissions_policy_name: "publickey-credentials-get",
},
{
name: "RunAdAuction",
permissions_policy_name: "run-ad-auction",
feature_default: "EnableForAll",
depends_on: ["Fledge"],
default_value_behind_flag: [
["AdInterestGroupAPIRestrictedPolicyByDefault", "EnableForSelf"],
],
},
{
name: "ScreenWakeLock",
permissions_policy_name: "screen-wake-lock",
depends_on: ["WakeLock"],
},
{
name: "Serial",
permissions_policy_name: "serial",
depends_on: ["Serial"],
},
{
name: "SharedAutofill",
permissions_policy_name: "shared-autofill",
depends_on: ["SharedAutofill"],
},
{
name: "SharedStorage",
permissions_policy_name: "shared-storage",
feature_default: "EnableForAll",
depends_on: ["SharedStorageAPI"],
},
{
name: "SharedStorageSelectUrl",
permissions_policy_name: "shared-storage-select-url",
feature_default: "EnableForAll",
depends_on: ["SharedStorageAPI"],
},
{
name: "SmartCard",
permissions_policy_name: "smart-card",
depends_on: ["SmartCard"],
visibility: "IsolatedContext",
},
{
name: "SpeakerSelection",
permissions_policy_name: "speaker-selection",
depends_on: ["SpeakerSelection"],
},
{
name: "StorageAccessAPI",
feature_default: "EnableForAll",
permissions_policy_name: "storage-access",
},
{
name: "SubApps",
permissions_policy_name: "sub-apps",
depends_on: ["DesktopPWAsSubApps"],
visibility: "IsolatedContext",
},
{
name: "SyncXHR",
feature_default: "EnableForAll",
permissions_policy_name: "sync-xhr",
},
{
name: "TrustTokenRedemption",
permissions_policy_name: "private-state-token-redemption",
depends_on: ["PrivateStateTokens"],
},
{
name: "Usb",
permissions_policy_name: "usb",
depends_on: ["WebUSB"],
},
{
name: "UsbUnrestricted",
permissions_policy_name: "usb-unrestricted",
depends_on: ["UnrestrictedUsb"],
visibility: "IsolatedContext",
},
{
// Unload is special and can default to being disabled by default based
// on the DeprecateUnload flag.
name: "Unload",
permissions_policy_name: "unload",
feature_default: "EnableForAll",
},
{
name: "VerticalScroll",
permissions_policy_name: "vertical-scroll",
feature_default: "EnableForAll",
depends_on: ["ExperimentalPolicies"],
},
{
name: "WebAppInstallation",
permissions_policy_name: "web-app-installation",
depends_on: ["WebAppInstallation"],
},
{
name: "WebPrinting",
permissions_policy_name: "web-printing",
depends_on: ["WebPrinting"],
visibility: "IsolatedContext",
},
{
name: "WebShare",
permissions_policy_name: "web-share",
depends_on: ["WebShare"],
},
{
name: "WebXr",
permissions_policy_name: "xr-spatial-tracking",
depends_on: ["WebXR"],
},
{
name: "WindowManagement",
permissions_policy_name: "window-management",
},
],
}