Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM Client.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_ClientBinding_h
4 : #define mozilla_dom_ClientBinding_h
5 :
6 : #include "ClientsBinding.h"
7 : #include "DocumentBinding.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 :
14 : namespace mozilla {
15 : namespace dom {
16 :
17 : struct NativePropertyHooks;
18 : class ProtoAndIfaceCache;
19 :
20 : namespace workers {
21 :
22 : class ServiceWorkerClient;
23 : struct ServiceWorkerClientAtoms;
24 : class ServiceWorkerWindowClient;
25 : struct ServiceWorkerWindowClientAtoms;
26 :
27 : } // namespace workers
28 :
29 : } // namespace dom
30 : } // namespace mozilla
31 :
32 : namespace mozilla {
33 : namespace dom {
34 :
35 : enum class FrameType : uint8_t {
36 : Auxiliary,
37 : Top_level,
38 : Nested,
39 : None,
40 : EndGuard_
41 : };
42 :
43 : namespace FrameTypeValues {
44 : extern const EnumEntry strings[5];
45 : } // namespace FrameTypeValues
46 :
47 : bool
48 : ToJSValue(JSContext* aCx, FrameType aArgument, JS::MutableHandle<JS::Value> aValue);
49 :
50 :
51 : namespace ClientBinding {
52 :
53 : typedef mozilla::dom::workers::ServiceWorkerClient NativeType;
54 :
55 : bool
56 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
57 :
58 : const JSClass*
59 : GetJSClass();
60 :
61 : bool
62 : Wrap(JSContext* aCx, mozilla::dom::workers::ServiceWorkerClient* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
63 :
64 : template <class T>
65 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
66 : {
67 0 : JS::Rooted<JSObject*> reflector(aCx);
68 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
69 : }
70 :
71 : void
72 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
73 :
74 : JS::Handle<JSObject*>
75 : GetProtoObjectHandle(JSContext* aCx);
76 :
77 : JSObject*
78 : GetProtoObject(JSContext* aCx);
79 :
80 : JS::Handle<JSObject*>
81 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
82 :
83 : JSObject*
84 : GetConstructorObject(JSContext* aCx);
85 :
86 : } // namespace ClientBinding
87 :
88 :
89 :
90 : namespace WindowClientBinding {
91 :
92 : typedef mozilla::dom::workers::ServiceWorkerWindowClient NativeType;
93 :
94 : bool
95 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
96 :
97 : const JSClass*
98 : GetJSClass();
99 :
100 : bool
101 : Wrap(JSContext* aCx, mozilla::dom::workers::ServiceWorkerWindowClient* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
102 :
103 : template <class T>
104 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
105 : {
106 0 : JS::Rooted<JSObject*> reflector(aCx);
107 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
108 : }
109 :
110 : void
111 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
112 :
113 : JS::Handle<JSObject*>
114 : GetProtoObjectHandle(JSContext* aCx);
115 :
116 : JS::Handle<JSObject*>
117 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
118 :
119 : JSObject*
120 : GetConstructorObject(JSContext* aCx);
121 :
122 : } // namespace WindowClientBinding
123 :
124 :
125 :
126 : } // namespace dom
127 : } // namespace mozilla
128 :
129 : #endif // mozilla_dom_ClientBinding_h
|