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