diff options
Diffstat (limited to 'Source/WebCore/workers/DedicatedWorkerThread.h')
-rw-r--r-- | Source/WebCore/workers/DedicatedWorkerThread.h | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/Source/WebCore/workers/DedicatedWorkerThread.h b/Source/WebCore/workers/DedicatedWorkerThread.h index 4f8750130..7cabd58fd 100644 --- a/Source/WebCore/workers/DedicatedWorkerThread.h +++ b/Source/WebCore/workers/DedicatedWorkerThread.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2009 Google Inc. All rights reserved. + * Copyright (C) 2016 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -27,31 +28,34 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef DedicatedWorkerThread_h -#define DedicatedWorkerThread_h -#include "ContentSecurityPolicy.h" +#pragma once + #include "WorkerThread.h" namespace WebCore { - class WorkerObjectProxy; +class ContentSecurityPolicyResponseHeaders; +class WorkerObjectProxy; - class DedicatedWorkerThread : public WorkerThread { - public: - static PassRefPtr<DedicatedWorkerThread> create(const URL& scriptURL, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, const SecurityOrigin* topOrigin); - WorkerObjectProxy& workerObjectProxy() const { return m_workerObjectProxy; } - virtual ~DedicatedWorkerThread(); +class DedicatedWorkerThread : public WorkerThread { +public: + template<typename... Args> static Ref<DedicatedWorkerThread> create(Args&&... args) + { + return adoptRef(*new DedicatedWorkerThread(std::forward<Args>(args)...)); + } + virtual ~DedicatedWorkerThread(); - protected: - virtual PassRefPtr<WorkerGlobalScope> createWorkerGlobalScope(const URL&, const String& userAgent, std::unique_ptr<GroupSettings>, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, PassRefPtr<SecurityOrigin> topOrigin) override; - virtual void runEventLoop() override; + WorkerObjectProxy& workerObjectProxy() const { return m_workerObjectProxy; } - private: - DedicatedWorkerThread(const URL&, const String& userAgent, const GroupSettings*, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const String& contentSecurityPolicy, ContentSecurityPolicy::HeaderType, const SecurityOrigin* topOrigin); +protected: + Ref<WorkerGlobalScope> createWorkerGlobalScope(const URL&, const String& identifier, const String& userAgent, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin) override; + void runEventLoop() override; - WorkerObjectProxy& m_workerObjectProxy; - }; -} // namespace WebCore +private: + DedicatedWorkerThread(const URL&, const String& identifier, const String& userAgent, const String& sourceCode, WorkerLoaderProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, JSC::RuntimeFlags); -#endif // DedicatedWorkerThread_h + WorkerObjectProxy& m_workerObjectProxy; +}; + +} // namespace WebCore |