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