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(VIDEO_TRACK)
24
25#include "JSDOMConvertEnumeration.h"
26#include "JSDOMWrapper.h"
27#include "JSTextTrackCue.h"
28#include "VTTCue.h"
29
30namespace WebCore {
31
32class JSVTTCue : public JSTextTrackCue {
33public:
34 using Base = JSTextTrackCue;
35 using DOMWrapped = VTTCue;
36 static JSVTTCue* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<VTTCue>&& impl)
37 {
38 JSVTTCue* ptr = new (NotNull, JSC::allocateCell<JSVTTCue>(globalObject->vm().heap)) JSVTTCue(structure, *globalObject, WTFMove(impl));
39 ptr->finishCreation(globalObject->vm());
40 return ptr;
41 }
42
43 static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
44 static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
45 static VTTCue* toWrapped(JSC::VM&, JSC::JSValue);
46
47 DECLARE_INFO;
48
49 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
50 {
51 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
52 }
53
54 static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
55 static void heapSnapshot(JSCell*, JSC::HeapSnapshotBuilder&);
56 VTTCue& wrapped() const
57 {
58 return static_cast<VTTCue&>(Base::wrapped());
59 }
60protected:
61 JSVTTCue(JSC::Structure*, JSDOMGlobalObject&, Ref<VTTCue>&&);
62
63 void finishCreation(JSC::VM&);
64};
65
66JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, VTTCue&);
67inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, VTTCue* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
68JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref<VTTCue>&&);
69inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr<VTTCue>&& impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); }
70
71template<> struct JSDOMWrapperConverterTraits<VTTCue> {
72 using WrapperClass = JSVTTCue;
73 using ToWrappedReturnType = VTTCue*;
74};
75String convertEnumerationToString(VTTCue::AutoKeyword);
76template<> JSC::JSString* convertEnumerationToJS(JSC::ExecState&, VTTCue::AutoKeyword);
77
78template<> Optional<VTTCue::AutoKeyword> parseEnumeration<VTTCue::AutoKeyword>(JSC::ExecState&, JSC::JSValue);
79template<> const char* expectedEnumerationValues<VTTCue::AutoKeyword>();
80
81
82} // namespace WebCore
83
84#endif // ENABLE(VIDEO_TRACK)
85