/src/3rdparty/webkit/Source/WebCore/generated/JSXMLHttpRequestProgressEvent.cpp

https://bitbucket.org/ultra_iter/qt-vtl
C++ | 184 lines | 128 code | 34 blank | 22 comment | 0 complexity | 82ce486f46bb15d6c4f74c2c8084bf13 MD5 | raw file
  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. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License as published by the Free Software Foundation; either
  7. version 2 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public License
  13. along with this library; see the file COPYING.LIB. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  15. Boston, MA 02110-1301, USA.
  16. */
  17. #include "config.h"
  18. #include "JSXMLHttpRequestProgressEvent.h"
  19. #include "XMLHttpRequestProgressEvent.h"
  20. #include <wtf/GetPtr.h>
  21. using namespace JSC;
  22. namespace WebCore {
  23. ASSERT_CLASS_FITS_IN_CELL(JSXMLHttpRequestProgressEvent);
  24. /* Hash table */
  25. #if ENABLE(JIT)
  26. #define THUNK_GENERATOR(generator) , generator
  27. #else
  28. #define THUNK_GENERATOR(generator)
  29. #endif
  30. static const HashTableValue JSXMLHttpRequestProgressEventTableValues[4] =
  31. {
  32. { "position", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestProgressEventPosition), (intptr_t)0 THUNK_GENERATOR(0) },
  33. { "totalSize", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestProgressEventTotalSize), (intptr_t)0 THUNK_GENERATOR(0) },
  34. { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsXMLHttpRequestProgressEventConstructor), (intptr_t)0 THUNK_GENERATOR(0) },
  35. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  36. };
  37. #undef THUNK_GENERATOR
  38. static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventTable = { 9, 7, JSXMLHttpRequestProgressEventTableValues, 0 };
  39. /* Hash table for constructor */
  40. #if ENABLE(JIT)
  41. #define THUNK_GENERATOR(generator) , generator
  42. #else
  43. #define THUNK_GENERATOR(generator)
  44. #endif
  45. static const HashTableValue JSXMLHttpRequestProgressEventConstructorTableValues[1] =
  46. {
  47. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  48. };
  49. #undef THUNK_GENERATOR
  50. static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventConstructorTable = { 1, 0, JSXMLHttpRequestProgressEventConstructorTableValues, 0 };
  51. class JSXMLHttpRequestProgressEventConstructor : public DOMConstructorObject {
  52. public:
  53. JSXMLHttpRequestProgressEventConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
  54. virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
  55. virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
  56. static const JSC::ClassInfo s_info;
  57. static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
  58. {
  59. return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
  60. }
  61. protected:
  62. static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
  63. };
  64. const ClassInfo JSXMLHttpRequestProgressEventConstructor::s_info = { "XMLHttpRequestProgressEventConstructor", &DOMConstructorObject::s_info, &JSXMLHttpRequestProgressEventConstructorTable, 0 };
  65. JSXMLHttpRequestProgressEventConstructor::JSXMLHttpRequestProgressEventConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
  66. : DOMConstructorObject(structure, globalObject)
  67. {
  68. ASSERT(inherits(&s_info));
  69. putDirect(exec->globalData(), exec->propertyNames().prototype, JSXMLHttpRequestProgressEventPrototype::self(exec, globalObject), DontDelete | ReadOnly);
  70. }
  71. bool JSXMLHttpRequestProgressEventConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
  72. {
  73. return getStaticValueSlot<JSXMLHttpRequestProgressEventConstructor, JSDOMWrapper>(exec, &JSXMLHttpRequestProgressEventConstructorTable, this, propertyName, slot);
  74. }
  75. bool JSXMLHttpRequestProgressEventConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
  76. {
  77. return getStaticValueDescriptor<JSXMLHttpRequestProgressEventConstructor, JSDOMWrapper>(exec, &JSXMLHttpRequestProgressEventConstructorTable, this, propertyName, descriptor);
  78. }
  79. /* Hash table for prototype */
  80. #if ENABLE(JIT)
  81. #define THUNK_GENERATOR(generator) , generator
  82. #else
  83. #define THUNK_GENERATOR(generator)
  84. #endif
  85. static const HashTableValue JSXMLHttpRequestProgressEventPrototypeTableValues[1] =
  86. {
  87. { 0, 0, 0, 0 THUNK_GENERATOR(0) }
  88. };
  89. #undef THUNK_GENERATOR
  90. static JSC_CONST_HASHTABLE HashTable JSXMLHttpRequestProgressEventPrototypeTable = { 1, 0, JSXMLHttpRequestProgressEventPrototypeTableValues, 0 };
  91. static const HashTable* getJSXMLHttpRequestProgressEventPrototypeTable(ExecState* exec)
  92. {
  93. return getHashTableForGlobalData(exec->globalData(), &JSXMLHttpRequestProgressEventPrototypeTable);
  94. }
  95. const ClassInfo JSXMLHttpRequestProgressEventPrototype::s_info = { "XMLHttpRequestProgressEventPrototype", &JSC::JSObjectWithGlobalObject::s_info, 0, getJSXMLHttpRequestProgressEventPrototypeTable };
  96. JSObject* JSXMLHttpRequestProgressEventPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
  97. {
  98. return getDOMPrototype<JSXMLHttpRequestProgressEvent>(exec, globalObject);
  99. }
  100. static const HashTable* getJSXMLHttpRequestProgressEventTable(ExecState* exec)
  101. {
  102. return getHashTableForGlobalData(exec->globalData(), &JSXMLHttpRequestProgressEventTable);
  103. }
  104. const ClassInfo JSXMLHttpRequestProgressEvent::s_info = { "XMLHttpRequestProgressEvent", &JSProgressEvent::s_info, 0, getJSXMLHttpRequestProgressEventTable };
  105. JSXMLHttpRequestProgressEvent::JSXMLHttpRequestProgressEvent(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<XMLHttpRequestProgressEvent> impl)
  106. : JSProgressEvent(structure, globalObject, impl)
  107. {
  108. ASSERT(inherits(&s_info));
  109. }
  110. JSObject* JSXMLHttpRequestProgressEvent::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
  111. {
  112. return new (exec) JSXMLHttpRequestProgressEventPrototype(exec->globalData(), globalObject, JSXMLHttpRequestProgressEventPrototype::createStructure(exec->globalData(), JSProgressEventPrototype::self(exec, globalObject)));
  113. }
  114. bool JSXMLHttpRequestProgressEvent::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
  115. {
  116. return getStaticValueSlot<JSXMLHttpRequestProgressEvent, Base>(exec, getJSXMLHttpRequestProgressEventTable(exec), this, propertyName, slot);
  117. }
  118. bool JSXMLHttpRequestProgressEvent::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
  119. {
  120. return getStaticValueDescriptor<JSXMLHttpRequestProgressEvent, Base>(exec, getJSXMLHttpRequestProgressEventTable(exec), this, propertyName, descriptor);
  121. }
  122. JSValue jsXMLHttpRequestProgressEventPosition(ExecState* exec, JSValue slotBase, const Identifier&)
  123. {
  124. JSXMLHttpRequestProgressEvent* castedThis = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slotBase));
  125. UNUSED_PARAM(exec);
  126. XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(castedThis->impl());
  127. JSValue result = jsNumber(imp->position());
  128. return result;
  129. }
  130. JSValue jsXMLHttpRequestProgressEventTotalSize(ExecState* exec, JSValue slotBase, const Identifier&)
  131. {
  132. JSXMLHttpRequestProgressEvent* castedThis = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slotBase));
  133. UNUSED_PARAM(exec);
  134. XMLHttpRequestProgressEvent* imp = static_cast<XMLHttpRequestProgressEvent*>(castedThis->impl());
  135. JSValue result = jsNumber(imp->totalSize());
  136. return result;
  137. }
  138. JSValue jsXMLHttpRequestProgressEventConstructor(ExecState* exec, JSValue slotBase, const Identifier&)
  139. {
  140. JSXMLHttpRequestProgressEvent* domObject = static_cast<JSXMLHttpRequestProgressEvent*>(asObject(slotBase));
  141. return JSXMLHttpRequestProgressEvent::getConstructor(exec, domObject->globalObject());
  142. }
  143. JSValue JSXMLHttpRequestProgressEvent::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
  144. {
  145. return getDOMConstructor<JSXMLHttpRequestProgressEventConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
  146. }
  147. }