Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM PaymentRequestUpdateEvent.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_PaymentRequestUpdateEventBinding_h
4 : #define mozilla_dom_PaymentRequestUpdateEventBinding_h
5 :
6 : #include "EventBinding.h"
7 : #include "PaymentRequestBinding.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 :
14 : namespace mozilla {
15 : namespace dom {
16 :
17 : struct NativePropertyHooks;
18 : struct PaymentDetailsModifier;
19 : struct PaymentDetailsUpdateAtoms;
20 : struct PaymentItem;
21 : class PaymentRequestUpdateEvent;
22 : struct PaymentRequestUpdateEventAtoms;
23 : struct PaymentShippingOption;
24 : class ProtoAndIfaceCache;
25 :
26 : } // namespace dom
27 : } // namespace mozilla
28 :
29 : namespace mozilla {
30 : namespace dom {
31 :
32 0 : struct PaymentDetailsUpdate : public PaymentDetailsBase
33 : {
34 : MOZ_INIT_OUTSIDE_CTOR Optional<nsString> mError;
35 : MOZ_INIT_OUTSIDE_CTOR PaymentItem mTotal;
36 :
37 : PaymentDetailsUpdate();
38 :
39 : explicit inline PaymentDetailsUpdate(const FastDictionaryInitializer& )
40 : : PaymentDetailsBase(FastDictionaryInitializer()),
41 : mTotal(FastDictionaryInitializer())
42 : {
43 : // Do nothing here; this is used by our "Fast" subclass
44 : }
45 :
46 : private:
47 : PaymentDetailsUpdate(const PaymentDetailsUpdate&) = delete;
48 : PaymentDetailsUpdate& operator=(const PaymentDetailsUpdate&) = delete;
49 :
50 : static bool
51 : InitIds(JSContext* cx, PaymentDetailsUpdateAtoms* atomsCache);
52 :
53 : public:
54 : bool
55 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
56 :
57 : bool
58 : Init(const nsAString& aJSON);
59 :
60 : bool
61 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
62 :
63 : bool
64 : ToJSON(nsAString& aJSON) const;
65 :
66 : void
67 : TraceDictionary(JSTracer* trc);
68 : };
69 :
70 : namespace binding_detail {
71 : struct FastPaymentDetailsUpdate : public PaymentDetailsUpdate
72 : {
73 : inline FastPaymentDetailsUpdate()
74 : : PaymentDetailsUpdate(FastDictionaryInitializer())
75 : {
76 : // Doesn't matter what int we pass to the parent constructor
77 : }
78 : };
79 : } // namespace binding_detail
80 :
81 :
82 : struct PaymentRequestUpdateEventInit : public EventInit
83 : {
84 : PaymentRequestUpdateEventInit();
85 :
86 0 : explicit inline PaymentRequestUpdateEventInit(const FastDictionaryInitializer& )
87 0 : : EventInit(FastDictionaryInitializer())
88 : {
89 : // Do nothing here; this is used by our "Fast" subclass
90 0 : }
91 :
92 : explicit inline PaymentRequestUpdateEventInit(const PaymentRequestUpdateEventInit& aOther)
93 : {
94 : *this = aOther;
95 : }
96 :
97 : bool
98 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
99 :
100 : bool
101 : Init(const nsAString& aJSON);
102 :
103 : bool
104 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
105 :
106 : bool
107 : ToJSON(nsAString& aJSON) const;
108 :
109 : void
110 : TraceDictionary(JSTracer* trc);
111 :
112 : PaymentRequestUpdateEventInit&
113 : operator=(const PaymentRequestUpdateEventInit& aOther);
114 : };
115 :
116 : namespace binding_detail {
117 : struct FastPaymentRequestUpdateEventInit : public PaymentRequestUpdateEventInit
118 : {
119 0 : inline FastPaymentRequestUpdateEventInit()
120 0 : : PaymentRequestUpdateEventInit(FastDictionaryInitializer())
121 : {
122 : // Doesn't matter what int we pass to the parent constructor
123 0 : }
124 : };
125 : } // namespace binding_detail
126 :
127 :
128 : namespace PaymentRequestUpdateEventBinding {
129 :
130 : typedef mozilla::dom::PaymentRequestUpdateEvent NativeType;
131 :
132 : bool
133 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
134 :
135 : JSObject*
136 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
137 :
138 : const JSClass*
139 : GetJSClass();
140 :
141 : bool
142 : Wrap(JSContext* aCx, mozilla::dom::PaymentRequestUpdateEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
143 :
144 : template <class T>
145 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
146 : {
147 0 : JS::Rooted<JSObject*> reflector(aCx);
148 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
149 : }
150 :
151 : // We declare this as an array so that retrieving a pointer to this
152 : // binding's property hooks only requires compile/link-time resolvable
153 : // address arithmetic. Declaring it as a pointer instead would require
154 : // doing a run-time load to fetch a pointer to this binding's property
155 : // hooks. And then structures which embedded a pointer to this structure
156 : // would require a run-time load for proper initialization, which would
157 : // then induce static constructors. Lots of static constructors.
158 : extern const NativePropertyHooks sNativePropertyHooks[];
159 :
160 : void
161 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
162 :
163 : JS::Handle<JSObject*>
164 : GetProtoObjectHandle(JSContext* aCx);
165 :
166 : JS::Handle<JSObject*>
167 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
168 :
169 : JSObject*
170 : GetConstructorObject(JSContext* aCx);
171 :
172 : } // namespace PaymentRequestUpdateEventBinding
173 :
174 :
175 :
176 : } // namespace dom
177 : } // namespace mozilla
178 :
179 : #endif // mozilla_dom_PaymentRequestUpdateEventBinding_h
|