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