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