|
1 /* |
|
2 This file is part of the WebKit open source project. |
|
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
|
4 |
|
5 This library is free software; you can redistribute it and/or |
|
6 modify it under the terms of the GNU Library General Public |
|
7 License as published by the Free Software Foundation; either |
|
8 version 2 of the License, or (at your option) any later version. |
|
9 |
|
10 This library is distributed in the hope that it will be useful, |
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 Library General Public License for more details. |
|
14 |
|
15 You should have received a copy of the GNU Library General Public License |
|
16 along with this library; see the file COPYING.LIB. If not, write to |
|
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
18 Boston, MA 02110-1301, USA. |
|
19 */ |
|
20 |
|
21 #ifndef JSHistory_h |
|
22 #define JSHistory_h |
|
23 |
|
24 #include "JSDOMBinding.h" |
|
25 #include <runtime/JSGlobalObject.h> |
|
26 #include <runtime/JSObjectWithGlobalObject.h> |
|
27 #include <runtime/ObjectPrototype.h> |
|
28 |
|
29 namespace WebCore { |
|
30 |
|
31 class History; |
|
32 |
|
33 class JSHistory : public DOMObjectWithGlobalPointer { |
|
34 typedef DOMObjectWithGlobalPointer Base; |
|
35 public: |
|
36 JSHistory(NonNullPassRefPtr<JSC::Structure>, JSDOMGlobalObject*, PassRefPtr<History>); |
|
37 virtual ~JSHistory(); |
|
38 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); |
|
39 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&); |
|
40 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&); |
|
41 bool getOwnPropertySlotDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
42 bool getOwnPropertyDescriptorDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
43 virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); |
|
44 bool putDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::JSValue, JSC::PutPropertySlot&); |
|
45 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
46 static const JSC::ClassInfo s_info; |
|
47 |
|
48 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
49 { |
|
50 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
51 } |
|
52 |
|
53 virtual bool deleteProperty(JSC::ExecState*, const JSC::Identifier&); |
|
54 virtual void getOwnPropertyNames(JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties); |
|
55 |
|
56 // Custom functions |
|
57 JSC::JSValue pushState(JSC::ExecState*); |
|
58 JSC::JSValue replaceState(JSC::ExecState*); |
|
59 History* impl() const { return m_impl.get(); } |
|
60 |
|
61 private: |
|
62 RefPtr<History> m_impl; |
|
63 protected: |
|
64 static const unsigned StructureFlags = JSC::OverridesGetPropertyNames | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; |
|
65 }; |
|
66 |
|
67 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, History*); |
|
68 History* toHistory(JSC::JSValue); |
|
69 |
|
70 class JSHistoryPrototype : public JSC::JSObjectWithGlobalObject { |
|
71 typedef JSC::JSObjectWithGlobalObject Base; |
|
72 public: |
|
73 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); |
|
74 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
75 static const JSC::ClassInfo s_info; |
|
76 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
77 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
78 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
79 { |
|
80 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
81 } |
|
82 JSHistoryPrototype(JSC::JSGlobalObject* globalObject, NonNullPassRefPtr<JSC::Structure> structure) : JSC::JSObjectWithGlobalObject(globalObject, structure) { } |
|
83 protected: |
|
84 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; |
|
85 }; |
|
86 |
|
87 // Functions |
|
88 |
|
89 JSC::EncodedJSValue JSC_HOST_CALL jsHistoryPrototypeFunctionBack(JSC::ExecState*); |
|
90 JSC::EncodedJSValue JSC_HOST_CALL jsHistoryPrototypeFunctionForward(JSC::ExecState*); |
|
91 JSC::EncodedJSValue JSC_HOST_CALL jsHistoryPrototypeFunctionGo(JSC::ExecState*); |
|
92 JSC::EncodedJSValue JSC_HOST_CALL jsHistoryPrototypeFunctionPushState(JSC::ExecState*); |
|
93 JSC::EncodedJSValue JSC_HOST_CALL jsHistoryPrototypeFunctionReplaceState(JSC::ExecState*); |
|
94 // Attributes |
|
95 |
|
96 JSC::JSValue jsHistoryLength(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&); |
|
97 |
|
98 } // namespace WebCore |
|
99 |
|
100 #endif |