tree: 2f8a4402060c65dad5b4b9819edafa34e1ba4f12 [path history] [tgz]
  1. document_policy_corpus/
  2. feature_policy_corpus/
  3. permissions_policy_corpus/
  4. DEPS
  5. DIR_METADATA
  6. OWNERS
  7. README.md
  8. build.gni
  9. document_policy.dict
  10. document_policy_features.json5
  11. document_policy_fuzzer.cc
  12. document_policy_parser.cc
  13. document_policy_parser.h
  14. document_policy_parser_test.cc
  15. document_policy_sim_test.cc
  16. dom_feature_policy.cc
  17. dom_feature_policy.h
  18. feature_policy.dict
  19. feature_policy.idl
  20. feature_policy_fuzzer.cc
  21. iframe_policy.h
  22. layout_animations_policy.cc
  23. layout_animations_policy.h
  24. permissions_policy.dict
  25. permissions_policy_attr_fuzzer.cc
  26. permissions_policy_devtools_support.cc
  27. permissions_policy_devtools_support.h
  28. permissions_policy_devtools_support_test.cc
  29. permissions_policy_features.json5
  30. permissions_policy_fuzzer.cc
  31. permissions_policy_parser.cc
  32. permissions_policy_parser.h
  33. permissions_policy_test.cc
  34. policy_helper.h
  35. policy_test.cc
third_party/blink/renderer/core/permissions_policy/README.md

This directory contains the renderer-specific portions of the Permissions Policy API, and Document Policy API.

This includes:

  • The parser for the HTTP Permissions-Policy/Feature-Policy header and the iframe allow attribute.

  • The parser for the HTTP Document-Policy header and the iframe policy attribute.

  • Helpers for manipulating the parsed declarations.

  • Implementation of the document.featurePolicy and iframe.featurePolicy interfaces.

Other policy resources

  • The core algorithms can be found in /common/feature\_policy/.

  • The feature list enum is found in /public/mojom/feature\_policy/.

  • The recommended API for checking whether features should be enabled or not is ExecutionContext::IsFeatureEnabled().