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