| // Copyright 2019 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module blink.mojom; |
| |
| // These values map to the features which can be controlled by Permissions Policy. |
| // |
| // Features are listed in |
| // https://github.com/w3c/webappsec-permissions-policy/blob/master/features.md. |
| // Not all listed features are supported in Blink, and many are gated by runtime |
| // flags. See renderer/core/permissions_policy/permissions_policy_features.json5 for the |
| // feature names which will be recognized in policy declarations. |
| // 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 |
| enum PermissionsPolicyFeature { |
| kNotFound = 0, |
| // Controls access to media autoplay. |
| kAutoplay = 1, |
| // Controls access to video input devices. |
| kCamera = 2, |
| // Controls whether navigator.requestMediaKeySystemAccess is allowed. |
| kEncryptedMedia = 3, |
| // Controls whether Element.requestFullscreen is allowed. |
| kFullscreen = 4, |
| // Controls access to Geolocation interface. |
| kGeolocation = 5, |
| // Controls access to audio input devices. |
| kMicrophone = 6, |
| // Controls access to requestMIDIAccess method. |
| kMidiFeature = 7, |
| // Controls access to PaymentRequest interface. |
| kPayment = 8, |
| // Controls use of synchronous XMLHTTPRequest API. |
| kSyncXHR = 13, |
| // Controls access to the WebUSB API. |
| kUsb = 14, |
| // The following features control access to the corresponding sensor classes. |
| // Fusion sensor APIs (e.g. LinearAcceleration, OrientationSensor-based |
| // classes)require all of the features that are inputs into that API to be |
| // enabled for the feature to be allowed. |
| kAccelerometer = 17, |
| kAmbientLightSensor = 18, |
| kGyroscope = 19, |
| kMagnetometer = 20, |
| // Controls access to Picture-in-Picture. |
| kPictureInPicture = 26, |
| // Controls the ability to block and interfere with vertical scrolling. |
| kVerticalScroll = 27, |
| // Controls access to Screen Wake Lock |
| kScreenWakeLock = 31, |
| // Sample Origin Trial enabled feature. This is used only for testing. |
| kFrobulate = 41, |
| // Controls access to Serial |
| kSerial = 42, |
| // Controls access to WebHID. |
| kHid = 43, |
| // Controls access to Idle Detection |
| kIdleDetection = 44, |
| // Allow execution while not in the viewport. |
| kExecutionWhileOutOfViewport = 50, |
| // Allow execution while not rendered. |
| kExecutionWhileNotRendered = 51, |
| |
| // When disallowed, a frame without user activation cannot acquire focus. |
| kFocusWithoutUserActivation = 52, |
| |
| // Client Hints |
| kClientHintDPR = 53, |
| kClientHintDeviceMemory = 54, |
| kClientHintDownlink = 55, |
| kClientHintECT = 56, |
| kClientHintRTT = 58, |
| kClientHintUA = 59, |
| kClientHintUAArch = 60, |
| kClientHintUAModel = 61, |
| kClientHintUAPlatform = 62, |
| kClientHintViewportWidth = 63, |
| kClientHintWidth = 64, |
| |
| // Controls use of WebXR API. |
| kWebXr = 66, |
| |
| // Web Authentication (https://w3c.github.io/webauthn/#sctn-iframe-guidance) |
| kPublicKeyCredentialsGet = 67, |
| |
| //Additional Client Hint |
| kClientHintUAMobile = 69, |
| |
| // Storage Access API |
| kStorageAccessAPI = 70, |
| |
| // Client Hint for the full browser version. |
| kClientHintUAFullVersion = 71, |
| |
| // Trust Token API redemption and request signing operations |
| kTrustTokenRedemption = 72, |
| |
| // Controls use of Attribution Reporting API |
| kAttributionReporting = 73, |
| |
| // Client Hint for UA platform version. |
| kClientHintUAPlatformVersion = 74, |
| |
| // cross-origin isolated permission |
| kCrossOriginIsolated = 75, |
| |
| // Controls use of Clipboard API Read. |
| kClipboardRead = 76, |
| |
| // Controls use of Clipboard API Write. |
| kClipboardWrite = 77, |
| |
| // Controls use of Web Share API. |
| kWebShare = 78, |
| |
| // Controls access to gamepads interface |
| kGamepad = 79, |
| |
| // Controls use of WebOTP API. |
| kOTPCredentials = 80, |
| |
| // Controls access to screen capture via getDisplayMedia(). |
| kDisplayCapture = 81, |
| |
| // [Deprecated] |
| // kInterestCohort = 82, |
| |
| // Controls whether Autofill may fill fields in that frame when triggered on |
| // a field with the main frame's origin. |
| kSharedAutofill = 83, |
| |
| // Controls access to Direct Sockets. |
| kDirectSockets = 84, |
| |
| // Client Hint for the preferred color scheme. |
| kClientHintPrefersColorScheme = 85, |
| |
| // Controls use of Window Management API. |
| kWindowManagement = 86, |
| |
| kClientHintUABitness = 87, |
| |
| // kClientHintUAReduced = 88, Removed in M116. |
| |
| // Client Hint for viewport height. |
| kClientHintViewportHeight = 89, |
| |
| // Controls access to the Keyboard API. |
| // https://wicg.github.io/keyboard-map/ |
| kKeyboardMap = 90, |
| |
| // Controls FLEDGE's runAdAuction API. |
| // |
| // See https://github.com/WICG/turtledove/blob/main/FLEDGE.md#21-initiating-an-on-device-auction |
| // for the API. |
| kRunAdAuction = 91, |
| |
| // Controls FLEDGE's joinAdInterestGroup and updateAdInterestGroups APIs. |
| // |
| // See https://github.com/WICG/turtledove/blob/main/FLEDGE.md#11-joining-interest-groups |
| // for the API. |
| kJoinAdInterestGroup = 92, |
| |
| // Client Hint for the full version for each brand. |
| kClientHintUAFullVersionList = 93, |
| |
| // kClientHintUAFull = 94, Removed in M116. |
| |
| // Client Hint for Sec-CH-UA-WoW64. |
| kClientHintUAWoW64 = 95, |
| |
| // "browsing-topics" permissions policy that controls the use of Topics API. |
| // https://github.com/jkarlin/topics |
| kBrowsingTopics = 97, |
| |
| // "interest-cohort" permissions policy that controls the use of Topics API. |
| // https://github.com/jkarlin/topics |
| kBrowsingTopicsBackwardCompatible = 98, |
| |
| // Client Hint for Save-Data. |
| kClientHintSaveData = 99, |
| |
| // Controls access to local fonts. |
| // https://wicg.github.io/local-font-access/#permissions-policy |
| kLocalFonts = 100, |
| |
| // Controls access to Bluetooth API. |
| kBluetooth = 101, |
| |
| // Controls use of FedCM API. |
| kIdentityCredentialsGet = 102, |
| |
| // "shared-storage" permissions policy that controls the use of Shared Storage |
| // API. |
| kSharedStorage = 103, |
| |
| // Controls use of unload handlers. |
| kUnload = 104, |
| |
| // Client Hint for the preferred reduced motion. |
| kClientHintPrefersReducedMotion = 105, |
| |
| // Controls use of Compute Pressure API. |
| // https://w3c.github.io/compute-pressure/#policy-control |
| kComputePressure = 106, |
| |
| // Web Smart Card API |
| kSmartCard = 107, |
| |
| // "shared-storage-select-url" permissions policy that controls the use of |
| // sharedStorage.selectURL(). |
| kSharedStorageSelectUrl = 108, |
| |
| // "private-aggregation" permissions policy that controls the use of |
| // privateAggregation within the shared storage worklet. |
| kPrivateAggregation = 109, |
| |
| // Private State Tokens API issuance operation |
| kPrivateStateTokenIssuance = 110, |
| |
| // Client Hint for form factor |
| kClientHintUAFormFactor = 111, |
| |
| // Client hint for prefers-reduced-transparency |
| kClientHintPrefersReducedTransparency = 112, |
| |
| // "web-printing" is a isolated context only permissions policy that controls |
| // the use of Web Printing API. |
| kWebPrinting = 113, |
| |
| // "usb-unrestricted" is a isolated context only permissions policy that |
| // controls whether protected USB interfaces and blocklisted USB devices can |
| // be accessed with WebUSB. |
| kUsbUnrestricted = 114, |
| |
| // Don't change assigned numbers of any item, and don't reuse removed slots. |
| // Add new features at the end of the enum. |
| // Also, run update_permissions_policy_enum.py in |
| // chromium/src/tools/metrics/histograms/ to update the UMA mapping. |
| }; |