CefSchemeOptions.cs 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. //
  2. // This file manually written from cef/include/internal/cef_types.h.
  3. // C API name: cef_scheme_options_t.
  4. //
  5. namespace Xilium.CefGlue
  6. {
  7. /// <summary>
  8. /// Configuration options for registering a custom scheme.
  9. /// These values are used when calling AddCustomScheme.
  10. /// </summary>
  11. public enum CefSchemeOptions
  12. {
  13. None = 0,
  14. /// <summary>
  15. /// If CEF_SCHEME_OPTION_STANDARD is set the scheme will be treated as a
  16. /// standard scheme. Standard schemes are subject to URL canonicalization and
  17. /// parsing rules as defined in the Common Internet Scheme Syntax RFC 1738
  18. /// Section 3.1 available at http://www.ietf.org/rfc/rfc1738.txt
  19. ///
  20. /// In particular, the syntax for standard scheme URLs must be of the form:
  21. /// <pre>
  22. /// [scheme]://[username]:[password]@[host]:[port]/[url-path]
  23. /// </pre> Standard scheme URLs must have a host component that is a fully
  24. /// qualified domain name as defined in Section 3.5 of RFC 1034 [13] and
  25. /// Section 2.1 of RFC 1123. These URLs will be canonicalized to
  26. /// "scheme://host/path" in the simplest case and
  27. /// "scheme://username:password@host:port/path" in the most explicit case. For
  28. /// example, "scheme:host/path" and "scheme:///host/path" will both be
  29. /// canonicalized to "scheme://host/path". The origin of a standard scheme URL
  30. /// is the combination of scheme, host and port (i.e., "scheme://host:port" in
  31. /// the most explicit case).
  32. ///
  33. /// For non-standard scheme URLs only the "scheme:" component is parsed and
  34. /// canonicalized. The remainder of the URL will be passed to the handler as-
  35. /// is. For example, "scheme:///some%20text" will remain the same. Non-standard
  36. /// scheme URLs cannot be used as a target for form submission.
  37. /// </summary>
  38. Standard = 1 << 0,
  39. /// <summary>
  40. /// If CEF_SCHEME_OPTION_LOCAL is set the scheme will be treated with the same
  41. /// security rules as those applied to "file" URLs. Normal pages cannot link to
  42. /// or access local URLs. Also, by default, local URLs can only perform
  43. /// XMLHttpRequest calls to the same URL (origin + path) that originated the
  44. /// request. To allow XMLHttpRequest calls from a local URL to other URLs with
  45. /// the same origin set the CefSettings.file_access_from_file_urls_allowed
  46. /// value to true (1). To allow XMLHttpRequest calls from a local URL to all
  47. /// origins set the CefSettings.universal_access_from_file_urls_allowed value
  48. /// to true (1).
  49. /// </summary>
  50. Local = 1 << 1,
  51. /// <summary>
  52. /// If CEF_SCHEME_OPTION_DISPLAY_ISOLATED is set the scheme can only be
  53. /// displayed from other content hosted with the same scheme. For example,
  54. /// pages in other origins cannot create iframes or hyperlinks to URLs with the
  55. /// scheme. For schemes that must be accessible from other schemes don't set
  56. /// this, set CEF_SCHEME_OPTION_CORS_ENABLED, and use CORS
  57. /// "Access-Control-Allow-Origin" headers to further restrict access.
  58. /// </summary>
  59. DisplayIsolated = 1 << 2,
  60. /// <summary>
  61. /// If CEF_SCHEME_OPTION_SECURE is set the scheme will be treated with the same
  62. /// security rules as those applied to "https" URLs. For example, loading this
  63. /// scheme from other secure schemes will not trigger mixed content warnings.
  64. /// </summary>
  65. Secure = 1 << 3,
  66. /// <summary>
  67. /// If CEF_SCHEME_OPTION_CORS_ENABLED is set the scheme can be sent CORS
  68. /// requests. This value should be set in most cases where
  69. /// CEF_SCHEME_OPTION_STANDARD is set.
  70. /// </summary>
  71. CorsEnabled = 1 << 4,
  72. /// <summary>
  73. /// If CEF_SCHEME_OPTION_CSP_BYPASSING is set the scheme can bypass Content-
  74. /// Security-Policy (CSP) checks. This value should not be set in most cases
  75. /// where CEF_SCHEME_OPTION_STANDARD is set.
  76. /// </summary>
  77. CspBypassing = 1 << 5,
  78. /// <summary>
  79. /// If CEF_SCHEME_OPTION_FETCH_ENABLED is set the scheme can perform Fetch API
  80. /// requests.
  81. /// </summary>
  82. FetchEnabled = 1 << 6,
  83. }
  84. }