blob: 9e27ef2a3c4b16d53af960614b0dec085cbb44d0 [file] [log] [blame]
/*
This file is part of the WebKit open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#pragma once
#include "JSWorkerGlobalScopeBase.h"
namespace WebCore {
class WorkerGlobalScope;
class JSWorkerGlobalScope : public JSWorkerGlobalScopeBase {
public:
typedef JSWorkerGlobalScopeBase Base;
typedef WorkerGlobalScope DOMWrapped;
static JSWorkerGlobalScope* create(JSC::VM& vm, JSC::Structure* structure, Ref<WorkerGlobalScope>&& impl, JSC::JSProxy* proxy)
{
JSWorkerGlobalScope* ptr = new (NotNull, JSC::allocateCell<JSWorkerGlobalScope>(vm.heap)) JSWorkerGlobalScope(vm, structure, WTFMove(impl));
ptr->finishCreation(vm, proxy);
vm.heap.addFinalizer(ptr, destroy);
return ptr;
}
static const bool needsDestruction = false;
static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
static JSC::JSObject* prototype(JSC::VM&, JSC::JSGlobalObject*);
static WorkerGlobalScope* toWrapped(JSC::JSValue);
DECLARE_INFO;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
{
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::GlobalObjectType, StructureFlags), info());
}
static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
static void visitChildren(JSCell*, JSC::SlotVisitor&);
void visitAdditionalChildren(JSC::SlotVisitor&);
// Custom functions
JSC::JSValue importScripts(JSC::ExecState&);
JSC::JSValue setTimeout(JSC::ExecState&);
JSC::JSValue setInterval(JSC::ExecState&);
WorkerGlobalScope& wrapped() const
{
return static_cast<WorkerGlobalScope&>(Base::wrapped());
}
public:
static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
protected:
JSWorkerGlobalScope(JSC::VM&, JSC::Structure*, Ref<WorkerGlobalScope>&&);
void finishCreation(JSC::VM&, JSC::JSProxy*);
};
class JSWorkerGlobalScopePrototype : public JSC::JSNonFinalObject {
public:
typedef JSC::JSNonFinalObject Base;
static JSWorkerGlobalScopePrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
{
JSWorkerGlobalScopePrototype* ptr = new (NotNull, JSC::allocateCell<JSWorkerGlobalScopePrototype>(vm.heap)) JSWorkerGlobalScopePrototype(vm, globalObject, structure);
ptr->finishCreation(vm);
return ptr;
}
DECLARE_INFO;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
{
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
}
private:
JSWorkerGlobalScopePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
: JSC::JSNonFinalObject(vm, structure)
{
}
public:
static const unsigned StructureFlags = JSC::HasStaticPropertyTable | Base::StructureFlags;
};
template<> struct JSDOMWrapperConverterTraits<WorkerGlobalScope> {
using WrapperClass = JSWorkerGlobalScope;
};
} // namespace WebCore