tree: 8c360322bdc7ec932d89eb10cd92aafe1edc6073 [path history] [tgz]
  1. BUILD.gn
  2. DEPS
  3. OWNERS
  4. README.md
  5. document_policy.dict
  6. document_policy_corpus/
  7. document_policy_features.json5
  8. document_policy_fuzzer.cc
  9. document_policy_parser.cc
  10. document_policy_parser.h
  11. document_policy_parser_test.cc
  12. dom_document_policy.h
  13. dom_feature_policy.cc
  14. dom_feature_policy.h
  15. feature_policy.dict
  16. feature_policy.idl
  17. feature_policy_attr_fuzzer.cc
  18. feature_policy_corpus/
  19. feature_policy_features.json5
  20. feature_policy_fuzzer.cc
  21. feature_policy_parser.cc
  22. feature_policy_parser.h
  23. feature_policy_parser_delegate.h
  24. feature_policy_test.cc
  25. iframe_policy.h
  26. layout_animations_policy.cc
  27. layout_animations_policy.h
  28. policy_helper.h
  29. policy_test.cc
third_party/blink/renderer/core/feature_policy/README.md

This directory contains the renderer-specific portions of the Feature Policy API.

This includes:

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

  • Helpers for manipulating the parsed declarations.

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

Other feature policy resources

  • The core feature policy 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 Document::IsFeatureEnabled() (or SecurityContext::IsFeatureEnabled in a non- document context).