DedicatedWorkerGlobalScope.h [plain text]
#pragma once
#include "WorkerGlobalScope.h"
namespace JSC {
class ExecState;
class JSObject;
class JSValue;
}
namespace WebCore {
class ContentSecurityPolicyResponseHeaders;
class DedicatedWorkerThread;
class MessagePort;
class SerializedScriptValue;
class DedicatedWorkerGlobalScope final : public WorkerGlobalScope {
public:
static Ref<DedicatedWorkerGlobalScope> create(const URL&, Ref<SecurityOrigin>&&, const String& name, const String& identifier, const String& userAgent, bool isOnline, DedicatedWorkerThread&, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, PAL::SessionID);
virtual ~DedicatedWorkerGlobalScope();
const String& name() const { return m_name; }
ExceptionOr<void> postMessage(JSC::ExecState&, JSC::JSValue message, Vector<JSC::Strong<JSC::JSObject>>&&);
DedicatedWorkerThread& thread();
private:
using Base = WorkerGlobalScope;
DedicatedWorkerGlobalScope(const URL&, Ref<SecurityOrigin>&&, const String& name, const String& identifier, const String& userAgent, bool isOnline, DedicatedWorkerThread&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, PAL::SessionID);
bool isDedicatedWorkerGlobalScope() const final { return true; }
ExceptionOr<void> importScripts(const Vector<String>& urls) final;
EventTargetInterface eventTargetInterface() const final;
String m_name;
};
}