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