#include "third_party/blink/renderer/core/permissions_policy/policy_helper.h"
#include "third_party/blink/public/mojom/permissions_policy/document_policy_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy.mojom-blink.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/inspector/protocol/page.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
namespace blink {
namespace {
const char kAccelerometerPolicyName[] = …;
const char kAllScreensCapturePolicyName[] = …;
const char kAmbientLightSensorPolicyName[] = …;
const char kAttributionReportingPolicyName[] = …;
const char kAutoplayPolicyName[] = …;
const char kBluetoothPolicyName[] = …;
const char kBrowsingTopicsPolicyName[] = …;
const char kBrowsingTopicsBackwardCompatiblePolicyName[] = …;
const char kCameraPolicyName[] = …;
const char kCapturedSurfaceControlPolicyName[] = …;
const char kClientHintDPRPolicyName[] = …;
const char kClientHintDeviceMemoryPolicyName[] = …;
const char kClientHintDownlinkPolicyName[] = …;
const char kClientHintECTPolicyName[] = …;
const char kClientHintPrefersColorSchemePolicyName[] = …;
const char kClientHintPrefersReducedMotionPolicyName[] = …;
const char kClientHintPrefersReducedTransparencyPolicyName[] = …;
const char kClientHintRTTPolicyName[] = …;
const char kClientHintSaveDataPolicyName[] = …;
const char kClientHintUAPolicyName[] = …;
const char kClientHintUAArchPolicyName[] = …;
const char kClientHintUABitnessPolicyName[] = …;
const char kClientHintUAFormFactorsPolicyName[] = …;
const char kClientHintUAPlatformPolicyName[] = …;
const char kClientHintUAModelPolicyName[] = …;
const char kClientHintUAMobilePolicyName[] = …;
const char kClientHintUAFullVersionPolicyName[] = …;
const char kClientHintUAFullVersionListPolicyName[] = …;
const char kClientHintUAPlatformVersionPolicyName[] = …;
const char kClientHintUAWoW64PolicyName[] = …;
const char kClientHintViewportHeightPolicyName[] = …;
const char kClientHintViewportWidthPolicyName[] = …;
const char kClientHintWidthPolicyName[] = …;
const char kClipboardReadPolicyName[] = …;
const char kClipboardWritePolicyName[] = …;
const char kComputePressurePolicyName[] = …;
const char kCrossOriginIsolatedPolicyName[] = …;
const char kDeferredFetchPolicyName[] = …;
const char kDigitalCredentialsGetPolicyName[] = …;
const char kDirectSocketsPolicyName[] = …;
const char kDisplayCapturePolicyName[] = …;
const char kEncryptedMediaPolicyName[] = …;
const char kExecutionWhileOutOfViewportPolicyName[] = …;
const char kExecutionWhileNotRenderedPolicyName[] = …;
const char kFocusWithoutUserActivationPolicyName[] = …;
const char kFullscreenPolicyName[] = …;
const char kFrobulatePolicyName[] = …;
const char kGamepadPolicyName[] = …;
const char kGeolocationPolicyName[] = …;
const char kGyroscopePolicyName[] = …;
const char kHidPolicyName[] = …;
const char kIdentityCredentialsGetPolicyName[] = …;
const char kIdleDetectionPolicyName[] = …;
const char kJoinAdInterestGroupPolicyName[] = …;
const char kKeyboardMapPolicyName[] = …;
const char kLocalFontsPolicyName[] = …;
const char kMagnetometerPolicyName[] = …;
const char kMediaPlaybackWhileNotVisiblePolicyName[] = …;
const char kMicrophonePolicyName[] = …;
const char kMidiFeaturePolicyName[] = …;
const char kOTPCredentialsPolicyName[] = …;
const char kPartitionedPopinsPolicyName[] = …;
const char kPaymentPolicyName[] = …;
const char kPictureInPicturePolicyName[] = …;
const char kPrivateAggregationPolicyName[] = …;
const char kPrivateStateTokenIssuancePolicyName[] = …;
const char kPublicKeyCredentialsCreatePolicyName[] = …;
const char kPublicKeyCredentialsGetPolicyName[] = …;
const char kRunAdAuctionPolicyName[] = …;
const char kScreenWakeLockPolicyName[] = …;
const char kSerialPolicyName[] = …;
const char kSharedAutofillPolicyName[] = …;
const char kSharedStoragePolicyName[] = …;
const char kSharedStorageSelectUrlPolicyName[] = …;
const char kSmartCardPolicyName[] = …;
const char kSpeakerSelectionPolicyName[] = …;
const char kStorageAccessAPIPolicyName[] = …;
const char kSubAppsPolicyName[] = …;
const char kSyncXHRPolicyName[] = …;
const char kTrustTokenRedemptionPolicyName[] = …;
const char kUsbPolicyName[] = …;
const char kUsbUnrestrictedPolicyName[] = …;
const char kUnloadPolicyName[] = …;
const char kVerticalScrollPolicyName[] = …;
const char kWebAppInstallationPolicyName[] = …;
const char kWebPrintingPolicyName[] = …;
const char kWebSharePolicyName[] = …;
const char kWebXrPolicyName[] = …;
const char kWindowManagementPolicyName[] = …;
}
const FeatureNameMap GetDefaultFeatureNameMap(bool is_isolated_context) { … }
DocumentPolicyFeatureSet& GetAvailableDocumentPolicyFeaturesInternal() { … }
void ResetAvailableDocumentPolicyFeaturesForTest() { … }
const DocumentPolicyFeatureSet& GetAvailableDocumentPolicyFeatures() { … }
bool DisabledByOriginTrial(const String& feature_name,
FeatureContext* feature_context) { … }
bool DisabledByOriginTrial(mojom::blink::DocumentPolicyFeature feature,
FeatureContext* feature_context) { … }
String PermissionsPolicyFeatureToProtocol(mojom::blink::PermissionsPolicyFeature feature, ExecutionContext* execution_context) { … }
}