chromium/out/Default/gen/third_party/blink/renderer/core/permissions_policy/policy_helper.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Generated from template:
//   templates/policy_helper.cc.tmpl
// and input files:
//   ../../third_party/blink/renderer/core/permissions_policy/document_policy_features.json5
//   ../../third_party/blink/renderer/core/permissions_policy/permissions_policy_features.json5
//   ../../third_party/blink/renderer/platform/runtime_enabled_features.json5


#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[] =;

}  // namespace

// Features which depend on a flag also have the same flag controlling whether
// they are in this map. Features which are shipping as part of an origin trial
// add their feature names to this map unconditionally, as the trial token could
// be added after the HTTP header needs to be parsed. This also means that
// top-level documents which simply want to embed another page which uses an
// origin trial feature, without using the feature themselves, can use
// permissions policy to allow use of the feature in subframes (The framed
// document will still require a valid origin trial token to use the feature in
// this scenario).
const FeatureNameMap GetDefaultFeatureNameMap(bool is_isolated_context) {}


DocumentPolicyFeatureSet& GetAvailableDocumentPolicyFeaturesInternal() {}


void ResetAvailableDocumentPolicyFeaturesForTest() {}


const DocumentPolicyFeatureSet& GetAvailableDocumentPolicyFeatures() {}

// If any of the origin trial runtime feature is enabled, returns false,
// i.e. the feature is considered enabled by origin trial.
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) {}

}  // namespace blink