/work/obj-fuzz/dist/include/mozilla/dom/NotificationEventBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM NotificationEvent.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_NotificationEventBinding_h |
4 | | #define mozilla_dom_NotificationEventBinding_h |
5 | | |
6 | | #include "ExtendableEventBinding.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/Notification.h" |
13 | | #include "mozilla/dom/Nullable.h" |
14 | | #include "mozilla/dom/PrototypeList.h" |
15 | | |
16 | | namespace mozilla { |
17 | | namespace dom { |
18 | | |
19 | | struct NativePropertyHooks; |
20 | | class Notification; |
21 | | class NotificationEvent; |
22 | | struct NotificationEventAtoms; |
23 | | struct NotificationEventInitAtoms; |
24 | | class ProtoAndIfaceCache; |
25 | | |
26 | | } // namespace dom |
27 | | } // namespace mozilla |
28 | | |
29 | | namespace mozilla { |
30 | | namespace dom { |
31 | | |
32 | | struct NotificationEventInit : public ExtendableEventInit |
33 | | { |
34 | | MOZ_INIT_OUTSIDE_CTOR OwningNonNull<mozilla::dom::Notification> mNotification; |
35 | | |
36 | | NotificationEventInit(); |
37 | | |
38 | | explicit inline NotificationEventInit(const FastDictionaryInitializer& ) |
39 | | : ExtendableEventInit(FastDictionaryInitializer()) |
40 | 0 | { |
41 | 0 | // Do nothing here; this is used by our "Fast" subclass |
42 | 0 | } |
43 | | |
44 | | explicit inline NotificationEventInit(const NotificationEventInit& aOther) |
45 | 0 | { |
46 | 0 | *this = aOther; |
47 | 0 | } |
48 | | |
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 | | inline void |
59 | | TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags) |
60 | 0 | { |
61 | 0 | ImplCycleCollectionTraverse(aCallback, mNotification, "mNotification", aFlags); |
62 | 0 | } |
63 | | |
64 | | inline void |
65 | | UnlinkForCC() |
66 | 0 | { |
67 | 0 | ImplCycleCollectionUnlink(mNotification); |
68 | 0 | } |
69 | | |
70 | | NotificationEventInit& |
71 | | operator=(const NotificationEventInit& aOther); |
72 | | |
73 | | private: |
74 | | static bool |
75 | | InitIds(JSContext* cx, NotificationEventInitAtoms* atomsCache); |
76 | | }; |
77 | | |
78 | | namespace binding_detail { |
79 | | struct FastNotificationEventInit : public NotificationEventInit |
80 | | { |
81 | | inline FastNotificationEventInit() |
82 | | : NotificationEventInit(FastDictionaryInitializer()) |
83 | 0 | { |
84 | 0 | // Doesn't matter what int we pass to the parent constructor |
85 | 0 | } |
86 | | }; |
87 | | } // namespace binding_detail |
88 | | |
89 | | |
90 | | namespace NotificationEvent_Binding { |
91 | | |
92 | | typedef mozilla::dom::NotificationEvent NativeType; |
93 | | |
94 | | bool |
95 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
96 | | |
97 | | const JSClass* |
98 | | GetJSClass(); |
99 | | |
100 | | bool |
101 | | Wrap(JSContext* aCx, mozilla::dom::NotificationEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
102 | | |
103 | | template <class T> |
104 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
105 | 0 | { |
106 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
107 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
108 | 0 | } |
109 | | |
110 | | void |
111 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
112 | | |
113 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
114 | 0 | { |
115 | 0 | /* Get the interface prototype object for this class. This will create the |
116 | 0 | object as needed. */ |
117 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::NotificationEvent, |
118 | 0 | &CreateInterfaceObjects, |
119 | 0 | /* aDefineOnGlobal = */ true); |
120 | 0 |
|
121 | 0 | } |
122 | | |
123 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
124 | 0 | { |
125 | 0 | /* Get the interface object for this class. This will create the object as |
126 | 0 | needed. */ |
127 | 0 |
|
128 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::NotificationEvent, |
129 | 0 | &CreateInterfaceObjects, |
130 | 0 | aDefineOnGlobal); |
131 | 0 | } |
132 | | |
133 | | JSObject* |
134 | | GetConstructorObject(JSContext* aCx); |
135 | | |
136 | | } // namespace NotificationEvent_Binding |
137 | | |
138 | | |
139 | | |
140 | | } // namespace dom |
141 | | } // namespace mozilla |
142 | | |
143 | | #endif // mozilla_dom_NotificationEventBinding_h |