Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM CSPReport.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_CSPReportBinding_h
4 : #define mozilla_dom_CSPReportBinding_h
5 :
6 : #include "js/RootingAPI.h"
7 : #include "jspubtd.h"
8 : #include "mozilla/ErrorResult.h"
9 : #include "mozilla/dom/BindingDeclarations.h"
10 : #include "mozilla/dom/Nullable.h"
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 : struct CSPReportAtoms;
16 : struct CSPReportProperties;
17 : struct CSPReportPropertiesAtoms;
18 : struct NativePropertyHooks;
19 : class ProtoAndIfaceCache;
20 :
21 : } // namespace dom
22 : } // namespace mozilla
23 :
24 : namespace mozilla {
25 : namespace dom {
26 :
27 0 : struct CSPReportProperties : public DictionaryBase
28 : {
29 : MOZ_INIT_OUTSIDE_CTOR nsString mBlocked_uri;
30 : MOZ_INIT_OUTSIDE_CTOR nsString mDocument_uri;
31 : MOZ_INIT_OUTSIDE_CTOR Optional<int32_t> mLine_number;
32 : MOZ_INIT_OUTSIDE_CTOR nsString mOriginal_policy;
33 : MOZ_INIT_OUTSIDE_CTOR nsString mReferrer;
34 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mScript_sample;
35 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mSource_file;
36 : MOZ_INIT_OUTSIDE_CTOR nsString mViolated_directive;
37 :
38 : CSPReportProperties();
39 :
40 0 : explicit inline CSPReportProperties(const FastDictionaryInitializer& )
41 0 : {
42 : // Do nothing here; this is used by our "Fast" subclass
43 0 : }
44 :
45 : explicit inline CSPReportProperties(const CSPReportProperties& aOther)
46 : {
47 : *this = aOther;
48 : }
49 :
50 : bool
51 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
52 :
53 : bool
54 : Init(const nsAString& aJSON);
55 :
56 : bool
57 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
58 :
59 : bool
60 : ToJSON(nsAString& aJSON) const;
61 :
62 : void
63 : TraceDictionary(JSTracer* trc);
64 :
65 : CSPReportProperties&
66 : operator=(const CSPReportProperties& aOther);
67 :
68 : private:
69 : static bool
70 : InitIds(JSContext* cx, CSPReportPropertiesAtoms* atomsCache);
71 : };
72 :
73 : namespace binding_detail {
74 : struct FastCSPReportProperties : public CSPReportProperties
75 : {
76 : inline FastCSPReportProperties()
77 : : CSPReportProperties(FastDictionaryInitializer())
78 : {
79 : // Doesn't matter what int we pass to the parent constructor
80 : }
81 : };
82 : } // namespace binding_detail
83 :
84 :
85 0 : struct CSPReport : public DictionaryBase
86 : {
87 : MOZ_INIT_OUTSIDE_CTOR CSPReportProperties mCsp_report;
88 :
89 : CSPReport();
90 :
91 : explicit inline CSPReport(const FastDictionaryInitializer& )
92 : : mCsp_report(FastDictionaryInitializer())
93 : {
94 : // Do nothing here; this is used by our "Fast" subclass
95 : }
96 :
97 : explicit inline CSPReport(const CSPReport& aOther)
98 : : mCsp_report(FastDictionaryInitializer())
99 : {
100 : *this = aOther;
101 : }
102 :
103 : bool
104 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
105 :
106 : bool
107 : Init(const nsAString& aJSON);
108 :
109 : bool
110 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
111 :
112 : bool
113 : ToJSON(nsAString& aJSON) const;
114 :
115 : void
116 : TraceDictionary(JSTracer* trc);
117 :
118 : CSPReport&
119 : operator=(const CSPReport& aOther);
120 :
121 : private:
122 : static bool
123 : InitIds(JSContext* cx, CSPReportAtoms* atomsCache);
124 : };
125 :
126 : namespace binding_detail {
127 : struct FastCSPReport : public CSPReport
128 : {
129 : inline FastCSPReport()
130 : : CSPReport(FastDictionaryInitializer())
131 : {
132 : // Doesn't matter what int we pass to the parent constructor
133 : }
134 : };
135 : } // namespace binding_detail
136 :
137 :
138 : } // namespace dom
139 : } // namespace mozilla
140 :
141 : #endif // mozilla_dom_CSPReportBinding_h
|