Bug 1883706: part 3) Implement `createHTML`, `createScript` and `createScriptURL...
[gecko.git] / ipc / glue / PBackgroundSharedTypes.ipdlh
blob92175b782dea318d77c97177066992ad169d627a
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 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
6 using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";
8 namespace mozilla {
9 namespace ipc {
11 [Comparable] struct ContentSecurityPolicy
13   nsString policy;
14   bool reportOnlyFlag;
15   bool deliveredViaMetaTagFlag;
18 [Comparable] struct ContentPrincipalInfo
20   OriginAttributes attrs;
22   // Origin is not simply a part of the spec. Based on the scheme of the URI
23   // spec, we generate different kind of origins: for instance any file: URL
24   // shares the same origin, about: URLs have the full spec as origin and so
25   // on.
26   // Another important reason why we have this attribute is that
27   // ContentPrincipalInfo is used out of the main-thread. Having this value
28   // here allows us to retrive the origin without creating a full nsIPrincipal.
29   nsCString originNoSuffix;
31   nsCString spec;
33   nsCString? domain;
35   // Like originNoSuffix, baseDomain is used out of the main-thread.
36   nsCString baseDomain;
39 [Comparable] struct SystemPrincipalInfo
40 { };
42 [Comparable] struct NullPrincipalInfo
44   OriginAttributes attrs;
45   nsCString spec;
48 [Comparable] struct ExpandedPrincipalInfo
50   OriginAttributes attrs;
51   PrincipalInfo[] allowlist;
54 [Comparable] union PrincipalInfo
56   ContentPrincipalInfo;
57   SystemPrincipalInfo;
58   NullPrincipalInfo;
59   ExpandedPrincipalInfo;
62 [Comparable] struct CSPInfo
64   ContentSecurityPolicy[] policyInfos;
65   PrincipalInfo requestPrincipalInfo;
66   nsCString selfURISpec;
67   nsString referrer;
68   uint64_t innerWindowID;
69   bool skipAllowInlineStyleCheck;
72 [Comparable] struct WebTransportHash {
73   nsCString algorithm;
74   uint8_t[] value;
77 } // namespace ipc
78 } // namespace mozilla