|
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 #include "config.h" |
|
22 |
|
23 #if ENABLE(VIDEO) |
|
24 |
|
25 #include "JSHTMLAudioElement.h" |
|
26 |
|
27 #include "HTMLAudioElement.h" |
|
28 #include <wtf/GetPtr.h> |
|
29 |
|
30 using namespace JSC; |
|
31 |
|
32 namespace WebCore { |
|
33 |
|
34 ASSERT_CLASS_FITS_IN_CELL(JSHTMLAudioElement); |
|
35 |
|
36 /* Hash table */ |
|
37 #if ENABLE(JIT) |
|
38 #define THUNK_GENERATOR(generator) , generator |
|
39 #else |
|
40 #define THUNK_GENERATOR(generator) |
|
41 #endif |
|
42 |
|
43 static const HashTableValue JSHTMLAudioElementTableValues[2] = |
|
44 { |
|
45 { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsHTMLAudioElementConstructor), (intptr_t)0 THUNK_GENERATOR(0) }, |
|
46 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
47 }; |
|
48 |
|
49 #undef THUNK_GENERATOR |
|
50 static JSC_CONST_HASHTABLE HashTable JSHTMLAudioElementTable = { 2, 1, JSHTMLAudioElementTableValues, 0 }; |
|
51 /* Hash table for constructor */ |
|
52 #if ENABLE(JIT) |
|
53 #define THUNK_GENERATOR(generator) , generator |
|
54 #else |
|
55 #define THUNK_GENERATOR(generator) |
|
56 #endif |
|
57 |
|
58 static const HashTableValue JSHTMLAudioElementConstructorTableValues[1] = |
|
59 { |
|
60 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
61 }; |
|
62 |
|
63 #undef THUNK_GENERATOR |
|
64 static JSC_CONST_HASHTABLE HashTable JSHTMLAudioElementConstructorTable = { 1, 0, JSHTMLAudioElementConstructorTableValues, 0 }; |
|
65 class JSHTMLAudioElementConstructor : public DOMConstructorObject { |
|
66 public: |
|
67 JSHTMLAudioElementConstructor(JSC::ExecState*, JSDOMGlobalObject*); |
|
68 |
|
69 virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&); |
|
70 virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&); |
|
71 virtual const JSC::ClassInfo* classInfo() const { return &s_info; } |
|
72 static const JSC::ClassInfo s_info; |
|
73 static PassRefPtr<JSC::Structure> createStructure(JSC::JSValue prototype) |
|
74 { |
|
75 return JSC::Structure::create(prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount); |
|
76 } |
|
77 protected: |
|
78 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; |
|
79 }; |
|
80 |
|
81 const ClassInfo JSHTMLAudioElementConstructor::s_info = { "HTMLAudioElementConstructor", 0, &JSHTMLAudioElementConstructorTable, 0 }; |
|
82 |
|
83 JSHTMLAudioElementConstructor::JSHTMLAudioElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject) |
|
84 : DOMConstructorObject(JSHTMLAudioElementConstructor::createStructure(globalObject->objectPrototype()), globalObject) |
|
85 { |
|
86 putDirect(exec->propertyNames().prototype, JSHTMLAudioElementPrototype::self(exec, globalObject), DontDelete | ReadOnly); |
|
87 } |
|
88 |
|
89 bool JSHTMLAudioElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
90 { |
|
91 return getStaticValueSlot<JSHTMLAudioElementConstructor, DOMObject>(exec, &JSHTMLAudioElementConstructorTable, this, propertyName, slot); |
|
92 } |
|
93 |
|
94 bool JSHTMLAudioElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
95 { |
|
96 return getStaticValueDescriptor<JSHTMLAudioElementConstructor, DOMObject>(exec, &JSHTMLAudioElementConstructorTable, this, propertyName, descriptor); |
|
97 } |
|
98 |
|
99 /* Hash table for prototype */ |
|
100 #if ENABLE(JIT) |
|
101 #define THUNK_GENERATOR(generator) , generator |
|
102 #else |
|
103 #define THUNK_GENERATOR(generator) |
|
104 #endif |
|
105 |
|
106 static const HashTableValue JSHTMLAudioElementPrototypeTableValues[1] = |
|
107 { |
|
108 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
109 }; |
|
110 |
|
111 #undef THUNK_GENERATOR |
|
112 static JSC_CONST_HASHTABLE HashTable JSHTMLAudioElementPrototypeTable = { 1, 0, JSHTMLAudioElementPrototypeTableValues, 0 }; |
|
113 const ClassInfo JSHTMLAudioElementPrototype::s_info = { "HTMLAudioElementPrototype", 0, &JSHTMLAudioElementPrototypeTable, 0 }; |
|
114 |
|
115 JSObject* JSHTMLAudioElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
116 { |
|
117 return getDOMPrototype<JSHTMLAudioElement>(exec, globalObject); |
|
118 } |
|
119 |
|
120 const ClassInfo JSHTMLAudioElement::s_info = { "HTMLAudioElement", &JSHTMLMediaElement::s_info, &JSHTMLAudioElementTable, 0 }; |
|
121 |
|
122 JSHTMLAudioElement::JSHTMLAudioElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLAudioElement> impl) |
|
123 : JSHTMLMediaElement(structure, globalObject, impl) |
|
124 { |
|
125 } |
|
126 |
|
127 JSObject* JSHTMLAudioElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
128 { |
|
129 return new (exec) JSHTMLAudioElementPrototype(globalObject, JSHTMLAudioElementPrototype::createStructure(JSHTMLMediaElementPrototype::self(exec, globalObject))); |
|
130 } |
|
131 |
|
132 bool JSHTMLAudioElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
133 { |
|
134 return getStaticValueSlot<JSHTMLAudioElement, Base>(exec, &JSHTMLAudioElementTable, this, propertyName, slot); |
|
135 } |
|
136 |
|
137 bool JSHTMLAudioElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
|
138 { |
|
139 return getStaticValueDescriptor<JSHTMLAudioElement, Base>(exec, &JSHTMLAudioElementTable, this, propertyName, descriptor); |
|
140 } |
|
141 |
|
142 JSValue jsHTMLAudioElementConstructor(ExecState* exec, JSValue slotBase, const Identifier&) |
|
143 { |
|
144 JSHTMLAudioElement* domObject = static_cast<JSHTMLAudioElement*>(asObject(slotBase)); |
|
145 return JSHTMLAudioElement::getConstructor(exec, domObject->globalObject()); |
|
146 } |
|
147 JSValue JSHTMLAudioElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject) |
|
148 { |
|
149 return getDOMConstructor<JSHTMLAudioElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject)); |
|
150 } |
|
151 |
|
152 |
|
153 } |
|
154 |
|
155 #endif // ENABLE(VIDEO) |