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