Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM CacheStorage.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_CacheStorageBinding_h
4 : #define mozilla_dom_CacheStorageBinding_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 NativePropertyHooks;
16 : class ProtoAndIfaceCache;
17 :
18 : namespace cache {
19 :
20 : class CacheStorage;
21 : struct CacheStorageAtoms;
22 :
23 : } // namespace cache
24 :
25 : } // namespace dom
26 : } // namespace mozilla
27 :
28 : namespace mozilla {
29 : namespace dom {
30 :
31 : enum class CacheStorageNamespace : uint8_t {
32 : Content,
33 : Chrome,
34 : EndGuard_
35 : };
36 :
37 : namespace CacheStorageNamespaceValues {
38 : extern const EnumEntry strings[3];
39 : } // namespace CacheStorageNamespaceValues
40 :
41 : bool
42 : ToJSValue(JSContext* aCx, CacheStorageNamespace aArgument, JS::MutableHandle<JS::Value> aValue);
43 :
44 :
45 : namespace CacheStorageBinding {
46 :
47 : typedef mozilla::dom::cache::CacheStorage NativeType;
48 :
49 : bool
50 : ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
51 :
52 : JSObject*
53 : DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
54 :
55 : const JSClass*
56 : GetJSClass();
57 :
58 : bool
59 : Wrap(JSContext* aCx, mozilla::dom::cache::CacheStorage* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
60 :
61 : template <class T>
62 0 : inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
63 : {
64 0 : JS::Rooted<JSObject*> reflector(aCx);
65 0 : return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
66 : }
67 :
68 : // We declare this as an array so that retrieving a pointer to this
69 : // binding's property hooks only requires compile/link-time resolvable
70 : // address arithmetic. Declaring it as a pointer instead would require
71 : // doing a run-time load to fetch a pointer to this binding's property
72 : // hooks. And then structures which embedded a pointer to this structure
73 : // would require a run-time load for proper initialization, which would
74 : // then induce static constructors. Lots of static constructors.
75 : extern const NativePropertyHooks sNativePropertyHooks[];
76 :
77 : void
78 : CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
79 :
80 : JS::Handle<JSObject*>
81 : GetProtoObjectHandle(JSContext* aCx);
82 :
83 : JS::Handle<JSObject*>
84 : GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
85 :
86 : JSObject*
87 : GetConstructorObject(JSContext* aCx);
88 :
89 : } // namespace CacheStorageBinding
90 :
91 :
92 :
93 : } // namespace dom
94 : } // namespace mozilla
95 :
96 : #endif // mozilla_dom_CacheStorageBinding_h
|