/work/obj-fuzz/dist/include/mozilla/dom/CSPDictionariesBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM CSPDictionaries.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_CSPDictionariesBinding_h |
4 | | #define mozilla_dom_CSPDictionariesBinding_h |
5 | | |
6 | | #include "GeckoProfiler.h" |
7 | | #include "js/RootingAPI.h" |
8 | | #include "jspubtd.h" |
9 | | #include "mozilla/ErrorResult.h" |
10 | | #include "mozilla/dom/BindingDeclarations.h" |
11 | | #include "mozilla/dom/Nullable.h" |
12 | | |
13 | | namespace mozilla { |
14 | | namespace dom { |
15 | | |
16 | | struct CSP; |
17 | | struct CSPAtoms; |
18 | | struct CSPPoliciesAtoms; |
19 | | struct NativePropertyHooks; |
20 | | class ProtoAndIfaceCache; |
21 | | |
22 | | } // namespace dom |
23 | | } // namespace mozilla |
24 | | |
25 | | namespace mozilla { |
26 | | namespace dom { |
27 | | |
28 | | struct CSP : public DictionaryBase |
29 | | { |
30 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mBase_uri; |
31 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mBlock_all_mixed_content; |
32 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mChild_src; |
33 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mConnect_src; |
34 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mDefault_src; |
35 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mFont_src; |
36 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mForm_action; |
37 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mFrame_ancestors; |
38 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mFrame_src; |
39 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mImg_src; |
40 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mManifest_src; |
41 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mMedia_src; |
42 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mObject_src; |
43 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mReferrer; |
44 | | MOZ_INIT_OUTSIDE_CTOR bool mReport_only; |
45 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mReport_uri; |
46 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mRequire_sri_for; |
47 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mSandbox; |
48 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mScript_src; |
49 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mStyle_src; |
50 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mUpgrade_insecure_requests; |
51 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<nsString>> mWorker_src; |
52 | | |
53 | | CSP(); |
54 | | |
55 | | explicit inline CSP(const FastDictionaryInitializer& ) |
56 | 0 | { |
57 | 0 | // Do nothing here; this is used by our "Fast" subclass |
58 | 0 | } |
59 | | |
60 | | explicit inline CSP(const CSP& aOther) |
61 | 0 | { |
62 | 0 | *this = aOther; |
63 | 0 | } |
64 | | |
65 | | bool |
66 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
67 | | |
68 | | bool |
69 | | Init(const nsAString& aJSON); |
70 | | |
71 | | bool |
72 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
73 | | |
74 | | bool |
75 | | ToJSON(nsAString& aJSON) const; |
76 | | |
77 | | void |
78 | | TraceDictionary(JSTracer* trc); |
79 | | |
80 | | CSP& |
81 | | operator=(const CSP& aOther); |
82 | | |
83 | | private: |
84 | | static bool |
85 | | InitIds(JSContext* cx, CSPAtoms* atomsCache); |
86 | | }; |
87 | | |
88 | | namespace binding_detail { |
89 | | struct FastCSP : public CSP |
90 | | { |
91 | | inline FastCSP() |
92 | | : CSP(FastDictionaryInitializer()) |
93 | 0 | { |
94 | 0 | // Doesn't matter what int we pass to the parent constructor |
95 | 0 | } |
96 | | }; |
97 | | } // namespace binding_detail |
98 | | |
99 | | |
100 | | struct CSPPolicies : public DictionaryBase |
101 | | { |
102 | | MOZ_INIT_OUTSIDE_CTOR Optional<Sequence<CSP>> mCsp_policies; |
103 | | |
104 | | CSPPolicies(); |
105 | | |
106 | | explicit inline CSPPolicies(const FastDictionaryInitializer& ) |
107 | 0 | { |
108 | 0 | // Do nothing here; this is used by our "Fast" subclass |
109 | 0 | } |
110 | | |
111 | | explicit inline CSPPolicies(const CSPPolicies& aOther) |
112 | 0 | { |
113 | 0 | *this = aOther; |
114 | 0 | } |
115 | | |
116 | | bool |
117 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
118 | | |
119 | | bool |
120 | | Init(const nsAString& aJSON); |
121 | | |
122 | | bool |
123 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
124 | | |
125 | | bool |
126 | | ToJSON(nsAString& aJSON) const; |
127 | | |
128 | | void |
129 | | TraceDictionary(JSTracer* trc); |
130 | | |
131 | | CSPPolicies& |
132 | | operator=(const CSPPolicies& aOther); |
133 | | |
134 | | private: |
135 | | static bool |
136 | | InitIds(JSContext* cx, CSPPoliciesAtoms* atomsCache); |
137 | | }; |
138 | | |
139 | | namespace binding_detail { |
140 | | struct FastCSPPolicies : public CSPPolicies |
141 | | { |
142 | | inline FastCSPPolicies() |
143 | | : CSPPolicies(FastDictionaryInitializer()) |
144 | 0 | { |
145 | 0 | // Doesn't matter what int we pass to the parent constructor |
146 | 0 | } |
147 | | }; |
148 | | } // namespace binding_detail |
149 | | |
150 | | |
151 | | } // namespace dom |
152 | | } // namespace mozilla |
153 | | |
154 | | #endif // mozilla_dom_CSPDictionariesBinding_h |