chromium/third_party/blink/public/mojom/permissions_policy/document_policy_feature.mojom

// Copyright 2020 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 Document Policy.
enum DocumentPolicyFeature {
  kDefault = 0,
  // Controls access to font-display attribute in @font-face CSS rule
  // kFontDisplay = 1, // Removed.
  // Takes a parameter, |bpp|, i.e. byte-per-pixel ratio, that images
  // needs to obey.
  // kLosslessImagesMaxBpp = 2, // Removed.
  // Controls whether the browser should allow navigations that cause the page to scroll.
  kForceLoadAtTop = 3,
  // Takes a parameter, |bpp|, i.e. byte-per-pixel ratio, that images
  // needs to obey.
  // kLosslessImagesStrictMaxBpp = 4, // Removed.
  // kLossyImagesMaxBpp = 5, // Removed.
  // Takes a parameter, |scale_ratio|, and restricts source image sizes to be
  // no more than |scale_ratio| x larger than the image's containing block.
  // kOversizedImages = 6, // Removed.
  // Controls the layout size of intrinsically sized images and videos. When
  // disabled, default size (300 x 150) is used to prevent relayout.
  // kUnsizedMedia = 7, // Removed.
  // Restricts the usage of layout-causing animations in a document.
  // kLayoutAnimations = 8, // Removed.
  // Controls the ability of the document to use several dynamic markup API
  // which interfere with document's input stream (document.write(),
  // document.close(), etc.).
  // kDocumentWrite = 9, // Removed.
  // Controls whether synchronous script elements will run.
  // kSyncScript = 10, // Removed.
  // Controls whether or not the JS Self-Profiling API is enabled.
  kJSProfiling = 11,
  // Controls use of synchronous XMLHTTPRequest API.
  kSyncXHR = 12,
  // Slot 13 (kDocumentDomain) was removed. Do not re-use its number.
  // Controls whether or not to include javascript stack traces in crash reports
  // from the Reporting API.
  kIncludeJSCallStacksInCrashReports = 14,

  // 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_document_policy_enum.py in
  // chromium/src/tools/metrics/histograms/ to update the UMA mapping.
};