Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM PopStateEvent.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_PopStateEventBinding_h
4 : #define mozilla_dom_PopStateEventBinding_h
5 :
6 : #include "EventBinding.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 NativePropertyHooks;
17 : class PopStateEvent;
18 : struct PopStateEventAtoms;
19 : struct PopStateEventInitAtoms;
20 : class ProtoAndIfaceCache;
21 :
22 : } // namespace dom
23 : } // namespace mozilla
24 :
25 : namespace mozilla {
26 : namespace dom {
27 :
28 : struct PopStateEventInit : public EventInit
29 : {
30 : MOZ_INIT_OUTSIDE_CTOR JS::Value mState;
31 :
32 : PopStateEventInit();
33 :
34 0 : explicit inline PopStateEventInit(const FastDictionaryInitializer& )
35 0 : : EventInit(FastDictionaryInitializer()),
36 0 : mState(JS::UndefinedValue())
37 : {
38 : // Do nothing here; this is used by our "Fast" subclass
39 0 : }
40 :
41 : private:
42 : PopStateEventInit(const PopStateEventInit&) = delete;
43 : PopStateEventInit& operator=(const PopStateEventInit&) = delete;
44 :
45 : static bool
46 : InitIds(JSContext* cx, PopStateEventInitAtoms* atomsCache);
47 :
48 : public:
49 : bool
50 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
51 :
52 : bool
53 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
54 :
55 : void
56 : TraceDictionary(JSTracer* trc);
57 : };
58 :
59 : namespace binding_detail {
60 : struct FastPopStateEventInit : public PopStateEventInit
61 : {
62 0 : inline FastPopStateEventInit()
63 0 : : PopStateEventInit(FastDictionaryInitializer())
64 : {
65 : // Doesn't matter what int we pass to the parent constructor
66 0 : }
67 : };
68 : } // namespace binding_detail
69 :
70 :
71 : namespace PopStateEventBinding {
72 :
73 : typedef mozilla::dom::PopStateEvent NativeType;
74 :
75 : JSObject*
76 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
77 :
78 : const JSClass*
79 : GetJSClass();
80 :
81 : bool
82 : Wrap(JSContext* aCx, mozilla::dom::PopStateEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
83 :
84 : template <class T>
85 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
86 : {
87 0 : JS::Rooted<JSObject*> reflector(aCx);
88 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
89 : }
90 :
91 : // We declare this as an array so that retrieving a pointer to this
92 : // binding's property hooks only requires compile/link-time resolvable
93 : // address arithmetic. Declaring it as a pointer instead would require
94 : // doing a run-time load to fetch a pointer to this binding's property
95 : // hooks. And then structures which embedded a pointer to this structure
96 : // would require a run-time load for proper initialization, which would
97 : // then induce static constructors. Lots of static constructors.
98 : extern const NativePropertyHooks sNativePropertyHooks[];
99 :
100 : void
101 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
102 :
103 : JS::Handle<JSObject*>
104 : GetProtoObjectHandle(JSContext* aCx);
105 :
106 : JS::Handle<JSObject*>
107 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
108 :
109 : JSObject*
110 : GetConstructorObject(JSContext* aCx);
111 :
112 : } // namespace PopStateEventBinding
113 :
114 :
115 :
116 : } // namespace dom
117 : } // namespace mozilla
118 :
119 : #endif // mozilla_dom_PopStateEventBinding_h
|