/work/obj-fuzz/dist/include/mozilla/dom/HTMLMediaElementBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM HTMLMediaElement.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_HTMLMediaElementBinding_h |
4 | | #define mozilla_dom_HTMLMediaElementBinding_h |
5 | | |
6 | | #include "GeckoProfiler.h" |
7 | | #include "TextTrackBinding.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/Nullable.h" |
13 | | #include "mozilla/dom/PrototypeList.h" |
14 | | |
15 | | namespace mozilla { |
16 | | namespace dom { |
17 | | |
18 | | class HTMLMediaElement; |
19 | | struct HTMLMediaElementAtoms; |
20 | | struct NativePropertyHooks; |
21 | | class ProtoAndIfaceCache; |
22 | | |
23 | | } // namespace dom |
24 | | } // namespace mozilla |
25 | | |
26 | | namespace mozilla { |
27 | | namespace dom { |
28 | | |
29 | | namespace HTMLMediaElement_Binding { |
30 | | |
31 | | typedef mozilla::dom::HTMLMediaElement NativeType; |
32 | | |
33 | | static const uint16_t NETWORK_EMPTY = 0; |
34 | | static const uint16_t NETWORK_IDLE = 1; |
35 | | static const uint16_t NETWORK_LOADING = 2; |
36 | | static const uint16_t NETWORK_NO_SOURCE = 3; |
37 | | static const uint16_t HAVE_NOTHING = 0; |
38 | | static const uint16_t HAVE_METADATA = 1; |
39 | | static const uint16_t HAVE_CURRENT_DATA = 2; |
40 | | static const uint16_t HAVE_FUTURE_DATA = 3; |
41 | | static const uint16_t HAVE_ENOUGH_DATA = 4; |
42 | | // We declare this as an array so that retrieving a pointer to this |
43 | | // binding's property hooks only requires compile/link-time resolvable |
44 | | // address arithmetic. Declaring it as a pointer instead would require |
45 | | // doing a run-time load to fetch a pointer to this binding's property |
46 | | // hooks. And then structures which embedded a pointer to this structure |
47 | | // would require a run-time load for proper initialization, which would |
48 | | // then induce static constructors. Lots of static constructors. |
49 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
50 | | |
51 | | void |
52 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
53 | | |
54 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
55 | 0 | { |
56 | 0 | /* Get the interface prototype object for this class. This will create the |
57 | 0 | object as needed. */ |
58 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::HTMLMediaElement, |
59 | 0 | &CreateInterfaceObjects, |
60 | 0 | /* aDefineOnGlobal = */ true); |
61 | 0 |
|
62 | 0 | } |
63 | | |
64 | | JSObject* |
65 | | GetProtoObject(JSContext* aCx); |
66 | | |
67 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
68 | 0 | { |
69 | 0 | /* Get the interface object for this class. This will create the object as |
70 | 0 | needed. */ |
71 | 0 |
|
72 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::HTMLMediaElement, |
73 | 0 | &CreateInterfaceObjects, |
74 | 0 | aDefineOnGlobal); |
75 | 0 | } |
76 | | |
77 | | JSObject* |
78 | | GetConstructorObject(JSContext* aCx); |
79 | | |
80 | | } // namespace HTMLMediaElement_Binding |
81 | | |
82 | | |
83 | | |
84 | | } // namespace dom |
85 | | } // namespace mozilla |
86 | | |
87 | | #endif // mozilla_dom_HTMLMediaElementBinding_h |