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