Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/TextTrackBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM TextTrack.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_TextTrackBinding_h
4
#define mozilla_dom_TextTrackBinding_h
5
6
#include "GeckoProfiler.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/Nullable.h"
12
#include "mozilla/dom/PrototypeList.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
struct NativePropertyHooks;
18
class ProtoAndIfaceCache;
19
class TextTrack;
20
struct TextTrackAtoms;
21
22
} // namespace dom
23
} // namespace mozilla
24
25
namespace mozilla {
26
namespace dom {
27
28
enum class TextTrackKind : uint8_t {
29
  Subtitles,
30
  Captions,
31
  Descriptions,
32
  Chapters,
33
  Metadata,
34
  EndGuard_
35
};
36
37
namespace TextTrackKindValues {
38
extern const EnumEntry strings[6];
39
} // namespace TextTrackKindValues
40
41
bool
42
ToJSValue(JSContext* aCx, TextTrackKind aArgument, JS::MutableHandle<JS::Value> aValue);
43
44
45
enum class TextTrackMode : uint8_t {
46
  Disabled,
47
  Hidden,
48
  Showing,
49
  EndGuard_
50
};
51
52
namespace TextTrackModeValues {
53
extern const EnumEntry strings[4];
54
} // namespace TextTrackModeValues
55
56
bool
57
ToJSValue(JSContext* aCx, TextTrackMode aArgument, JS::MutableHandle<JS::Value> aValue);
58
59
60
namespace TextTrack_Binding {
61
62
  typedef mozilla::dom::TextTrack NativeType;
63
64
  const JSClass*
65
  GetJSClass();
66
67
  bool
68
  Wrap(JSContext* aCx, mozilla::dom::TextTrack* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
69
70
  template <class T>
71
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
72
0
  {
73
0
    JS::Rooted<JSObject*> reflector(aCx);
74
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
75
0
  }
76
77
  // We declare this as an array so that retrieving a pointer to this
78
  // binding's property hooks only requires compile/link-time resolvable
79
  // address arithmetic.  Declaring it as a pointer instead would require
80
  // doing a run-time load to fetch a pointer to this binding's property
81
  // hooks.  And then structures which embedded a pointer to this structure
82
  // would require a run-time load for proper initialization, which would
83
  // then induce static constructors.  Lots of static constructors.
84
  extern const NativePropertyHooks sNativePropertyHooks[];
85
86
  void
87
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
88
89
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
90
0
  {
91
0
    /* Get the interface prototype object for this class.  This will create the
92
0
       object as needed. */
93
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::TextTrack,
94
0
                                       &CreateInterfaceObjects,
95
0
                                       /* aDefineOnGlobal = */ true);
96
0
97
0
  }
98
99
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
100
0
  {
101
0
    /* Get the interface object for this class.  This will create the object as
102
0
       needed. */
103
0
104
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::TextTrack,
105
0
                                       &CreateInterfaceObjects,
106
0
                                       aDefineOnGlobal);
107
0
  }
108
109
  JSObject*
110
  GetConstructorObject(JSContext* aCx);
111
112
} // namespace TextTrack_Binding
113
114
115
116
} // namespace dom
117
} // namespace mozilla
118
119
#endif // mozilla_dom_TextTrackBinding_h