| 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 | #pragma once |
| 22 | |
| 23 | #include "DedicatedWorkerGlobalScope.h" |
| 24 | #include "JSDOMWrapper.h" |
| 25 | #include "JSWorkerGlobalScope.h" |
| 26 | |
| 27 | namespace WebCore { |
| 28 | |
| 29 | class DedicatedWorkerGlobalScope; |
| 30 | |
| 31 | class JSDedicatedWorkerGlobalScope : public JSWorkerGlobalScope { |
| 32 | public: |
| 33 | using Base = JSWorkerGlobalScope; |
| 34 | using DOMWrapped = DedicatedWorkerGlobalScope; |
| 35 | static JSDedicatedWorkerGlobalScope* create(JSC::VM& vm, JSC::Structure* structure, Ref<DedicatedWorkerGlobalScope>&& impl, JSC::JSProxy* proxy) |
| 36 | { |
| 37 | JSDedicatedWorkerGlobalScope* ptr = new (NotNull, JSC::allocateCell<JSDedicatedWorkerGlobalScope>(vm.heap)) JSDedicatedWorkerGlobalScope(vm, structure, WTFMove(impl)); |
| 38 | ptr->finishCreation(vm, proxy); |
| 39 | return ptr; |
| 40 | } |
| 41 | |
| 42 | static const bool needsDestruction = false; |
| 43 | |
| 44 | static DedicatedWorkerGlobalScope* toWrapped(JSC::VM&, JSC::JSValue); |
| 45 | |
| 46 | DECLARE_INFO; |
| 47 | |
| 48 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
| 49 | { |
| 50 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::GlobalObjectType, StructureFlags), info()); |
| 51 | } |
| 52 | |
| 53 | static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); |
| 54 | static void heapSnapshot(JSCell*, JSC::HeapSnapshotBuilder&); |
| 55 | DedicatedWorkerGlobalScope& wrapped() const |
| 56 | { |
| 57 | return static_cast<DedicatedWorkerGlobalScope&>(Base::wrapped()); |
| 58 | } |
| 59 | public: |
| 60 | static const unsigned StructureFlags = Base::StructureFlags | JSC::HasStaticPropertyTable | JSC::IsImmutablePrototypeExoticObject; |
| 61 | protected: |
| 62 | JSDedicatedWorkerGlobalScope(JSC::VM&, JSC::Structure*, Ref<DedicatedWorkerGlobalScope>&&); |
| 63 | void finishCreation(JSC::VM&, JSC::JSProxy*); |
| 64 | }; |
| 65 | |
| 66 | |
| 67 | class JSDedicatedWorkerGlobalScopePrototype : public JSC::JSNonFinalObject { |
| 68 | public: |
| 69 | using Base = JSC::JSNonFinalObject; |
| 70 | static JSDedicatedWorkerGlobalScopePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
| 71 | { |
| 72 | JSDedicatedWorkerGlobalScopePrototype* ptr = new (NotNull, JSC::allocateCell<JSDedicatedWorkerGlobalScopePrototype>(vm.heap)) JSDedicatedWorkerGlobalScopePrototype(vm, globalObject, structure); |
| 73 | ptr->finishCreation(vm); |
| 74 | return ptr; |
| 75 | } |
| 76 | |
| 77 | DECLARE_INFO; |
| 78 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
| 79 | { |
| 80 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
| 81 | } |
| 82 | |
| 83 | private: |
| 84 | JSDedicatedWorkerGlobalScopePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
| 85 | : JSC::JSNonFinalObject(vm, structure) |
| 86 | { |
| 87 | } |
| 88 | public: |
| 89 | static const unsigned StructureFlags = Base::StructureFlags | JSC::HasStaticPropertyTable | JSC::IsImmutablePrototypeExoticObject; |
| 90 | }; |
| 91 | |
| 92 | template<> struct JSDOMWrapperConverterTraits<DedicatedWorkerGlobalScope> { |
| 93 | using WrapperClass = JSDedicatedWorkerGlobalScope; |
| 94 | using ToWrappedReturnType = DedicatedWorkerGlobalScope*; |
| 95 | }; |
| 96 | |
| 97 | } // namespace WebCore |
| 98 | |