Line data Source code
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 "js/RootingAPI.h"
8 : #include "jspubtd.h"
9 : #include "mozilla/ErrorResult.h"
10 : #include "mozilla/dom/BindingDeclarations.h"
11 : #include "mozilla/dom/Notification.h"
12 : #include "mozilla/dom/Nullable.h"
13 :
14 : namespace mozilla {
15 : namespace dom {
16 :
17 : struct NativePropertyHooks;
18 : class Notification;
19 : struct NotificationEventInitAtoms;
20 : class ProtoAndIfaceCache;
21 :
22 : namespace workers {
23 :
24 : class NotificationEvent;
25 : struct NotificationEventAtoms;
26 :
27 : } // namespace workers
28 :
29 : } // namespace dom
30 : } // namespace mozilla
31 :
32 : namespace mozilla {
33 : namespace dom {
34 :
35 0 : struct NotificationEventInit : public ExtendableEventInit
36 : {
37 : MOZ_INIT_OUTSIDE_CTOR OwningNonNull<mozilla::dom::Notification> mNotification;
38 :
39 : NotificationEventInit();
40 :
41 0 : explicit inline NotificationEventInit(const FastDictionaryInitializer& )
42 0 : : ExtendableEventInit(FastDictionaryInitializer())
43 : {
44 : // Do nothing here; this is used by our "Fast" subclass
45 0 : }
46 :
47 : explicit inline NotificationEventInit(const NotificationEventInit& aOther)
48 : {
49 : *this = aOther;
50 : }
51 :
52 : bool
53 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
54 :
55 : bool
56 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
57 :
58 : void
59 : TraceDictionary(JSTracer* trc);
60 :
61 : NotificationEventInit&
62 : operator=(const NotificationEventInit& aOther);
63 :
64 : private:
65 : static bool
66 : InitIds(JSContext* cx, NotificationEventInitAtoms* atomsCache);
67 : };
68 :
69 : namespace binding_detail {
70 0 : struct FastNotificationEventInit : public NotificationEventInit
71 : {
72 0 : inline FastNotificationEventInit()
73 0 : : NotificationEventInit(FastDictionaryInitializer())
74 : {
75 : // Doesn't matter what int we pass to the parent constructor
76 0 : }
77 : };
78 : } // namespace binding_detail
79 :
80 :
81 : namespace NotificationEventBinding {
82 :
83 : typedef mozilla::dom::workers::NotificationEvent NativeType;
84 :
85 : bool
86 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
87 :
88 : const JSClass*
89 : GetJSClass();
90 :
91 : bool
92 : Wrap(JSContext* aCx, mozilla::dom::workers::NotificationEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
93 :
94 : template <class T>
95 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
96 : {
97 0 : JS::Rooted<JSObject*> reflector(aCx);
98 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
99 : }
100 :
101 : void
102 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
103 :
104 : JS::Handle<JSObject*>
105 : GetProtoObjectHandle(JSContext* aCx);
106 :
107 : JS::Handle<JSObject*>
108 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
109 :
110 : JSObject*
111 : GetConstructorObject(JSContext* aCx);
112 :
113 : } // namespace NotificationEventBinding
114 :
115 :
116 :
117 : } // namespace dom
118 : } // namespace mozilla
119 :
120 : #endif // mozilla_dom_NotificationEventBinding_h
|