1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 include "mozilla/dom/DomSecurityIPCUtils.h";
7 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
8 using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";
9 using nsIContentSecurityPolicy::RequireTrustedTypesForDirectiveState from "nsIContentSecurityPolicy.h";
14 [Comparable] struct ContentSecurityPolicy
18 bool deliveredViaMetaTagFlag;
19 bool hasRequireTrustedTypesForDirective;
22 [Comparable] struct ContentPrincipalInfo
24 OriginAttributes attrs;
26 // Origin is not simply a part of the spec. Based on the scheme of the URI
27 // spec, we generate different kind of origins: for instance any file: URL
28 // shares the same origin, about: URLs have the full spec as origin and so
30 // Another important reason why we have this attribute is that
31 // ContentPrincipalInfo is used out of the main-thread. Having this value
32 // here allows us to retrive the origin without creating a full nsIPrincipal.
33 nsCString originNoSuffix;
39 // Like originNoSuffix, baseDomain is used out of the main-thread.
43 [Comparable] struct SystemPrincipalInfo
46 [Comparable] struct NullPrincipalInfo
48 OriginAttributes attrs;
52 [Comparable] struct ExpandedPrincipalInfo
54 OriginAttributes attrs;
55 PrincipalInfo[] allowlist;
58 [Comparable] union PrincipalInfo
63 ExpandedPrincipalInfo;
66 [Comparable] struct CSPInfo
68 ContentSecurityPolicy[] policyInfos;
69 PrincipalInfo requestPrincipalInfo;
70 nsCString selfURISpec;
72 uint64_t innerWindowID;
73 RequireTrustedTypesForDirectiveState requireTrustedTypesForDirectiveState;
74 bool skipAllowInlineStyleCheck;
77 [Comparable] struct WebTransportHash {
83 } // namespace mozilla