/work/obj-fuzz/dist/include/mozilla/dom/PresentationConnectionCloseEventBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM PresentationConnectionCloseEvent.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_PresentationConnectionCloseEventBinding_h |
4 | | #define mozilla_dom_PresentationConnectionCloseEventBinding_h |
5 | | |
6 | | #include "EventBinding.h" |
7 | | #include "GeckoProfiler.h" |
8 | | #include "js/RootingAPI.h" |
9 | | #include "jspubtd.h" |
10 | | #include "mozilla/ErrorResult.h" |
11 | | #include "mozilla/dom/BindingDeclarations.h" |
12 | | #include "mozilla/dom/Nullable.h" |
13 | | #include "mozilla/dom/PrototypeList.h" |
14 | | |
15 | | namespace mozilla { |
16 | | namespace dom { |
17 | | |
18 | | struct NativePropertyHooks; |
19 | | class PresentationConnectionCloseEvent; |
20 | | struct PresentationConnectionCloseEventAtoms; |
21 | | struct PresentationConnectionCloseEventInitAtoms; |
22 | | class ProtoAndIfaceCache; |
23 | | |
24 | | } // namespace dom |
25 | | } // namespace mozilla |
26 | | |
27 | | namespace mozilla { |
28 | | namespace dom { |
29 | | |
30 | | enum class PresentationConnectionClosedReason : uint8_t { |
31 | | Error, |
32 | | Closed, |
33 | | Wentaway, |
34 | | EndGuard_ |
35 | | }; |
36 | | |
37 | | namespace PresentationConnectionClosedReasonValues { |
38 | | extern const EnumEntry strings[4]; |
39 | | } // namespace PresentationConnectionClosedReasonValues |
40 | | |
41 | | bool |
42 | | ToJSValue(JSContext* aCx, PresentationConnectionClosedReason aArgument, JS::MutableHandle<JS::Value> aValue); |
43 | | |
44 | | |
45 | | struct PresentationConnectionCloseEventInit : public EventInit |
46 | | { |
47 | | MOZ_INIT_OUTSIDE_CTOR nsString mMessage; |
48 | | MOZ_INIT_OUTSIDE_CTOR PresentationConnectionClosedReason mReason; |
49 | | |
50 | | PresentationConnectionCloseEventInit(); |
51 | | |
52 | | explicit inline PresentationConnectionCloseEventInit(const FastDictionaryInitializer& ) |
53 | | : EventInit(FastDictionaryInitializer()) |
54 | 0 | { |
55 | 0 | // Do nothing here; this is used by our "Fast" subclass |
56 | 0 | } |
57 | | |
58 | | explicit inline PresentationConnectionCloseEventInit(const PresentationConnectionCloseEventInit& aOther) |
59 | 0 | { |
60 | 0 | *this = aOther; |
61 | 0 | } |
62 | | |
63 | | bool |
64 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
65 | | |
66 | | bool |
67 | | Init(const nsAString& aJSON); |
68 | | |
69 | | bool |
70 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
71 | | |
72 | | bool |
73 | | ToJSON(nsAString& aJSON) const; |
74 | | |
75 | | void |
76 | | TraceDictionary(JSTracer* trc); |
77 | | |
78 | | PresentationConnectionCloseEventInit& |
79 | | operator=(const PresentationConnectionCloseEventInit& aOther); |
80 | | |
81 | | private: |
82 | | static bool |
83 | | InitIds(JSContext* cx, PresentationConnectionCloseEventInitAtoms* atomsCache); |
84 | | }; |
85 | | |
86 | | namespace binding_detail { |
87 | | struct FastPresentationConnectionCloseEventInit : public PresentationConnectionCloseEventInit |
88 | | { |
89 | | inline FastPresentationConnectionCloseEventInit() |
90 | | : PresentationConnectionCloseEventInit(FastDictionaryInitializer()) |
91 | 0 | { |
92 | 0 | // Doesn't matter what int we pass to the parent constructor |
93 | 0 | } |
94 | | }; |
95 | | } // namespace binding_detail |
96 | | |
97 | | |
98 | | namespace PresentationConnectionCloseEvent_Binding { |
99 | | |
100 | | typedef mozilla::dom::PresentationConnectionCloseEvent NativeType; |
101 | | |
102 | | bool |
103 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
104 | | |
105 | | const JSClass* |
106 | | GetJSClass(); |
107 | | |
108 | | bool |
109 | | Wrap(JSContext* aCx, mozilla::dom::PresentationConnectionCloseEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
110 | | |
111 | | template <class T> |
112 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
113 | 0 | { |
114 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
115 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
116 | 0 | } |
117 | | |
118 | | // We declare this as an array so that retrieving a pointer to this |
119 | | // binding's property hooks only requires compile/link-time resolvable |
120 | | // address arithmetic. Declaring it as a pointer instead would require |
121 | | // doing a run-time load to fetch a pointer to this binding's property |
122 | | // hooks. And then structures which embedded a pointer to this structure |
123 | | // would require a run-time load for proper initialization, which would |
124 | | // then induce static constructors. Lots of static constructors. |
125 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
126 | | |
127 | | void |
128 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
129 | | |
130 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
131 | 0 | { |
132 | 0 | /* Get the interface prototype object for this class. This will create the |
133 | 0 | object as needed. */ |
134 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::PresentationConnectionCloseEvent, |
135 | 0 | &CreateInterfaceObjects, |
136 | 0 | /* aDefineOnGlobal = */ true); |
137 | 0 |
|
138 | 0 | } |
139 | | |
140 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
141 | 0 | { |
142 | 0 | /* Get the interface object for this class. This will create the object as |
143 | 0 | needed. */ |
144 | 0 |
|
145 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::PresentationConnectionCloseEvent, |
146 | 0 | &CreateInterfaceObjects, |
147 | 0 | aDefineOnGlobal); |
148 | 0 | } |
149 | | |
150 | | JSObject* |
151 | | GetConstructorObject(JSContext* aCx); |
152 | | |
153 | | } // namespace PresentationConnectionCloseEvent_Binding |
154 | | |
155 | | |
156 | | |
157 | | } // namespace dom |
158 | | } // namespace mozilla |
159 | | |
160 | | #endif // mozilla_dom_PresentationConnectionCloseEventBinding_h |