Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(868)

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/IsolatedWorkerThread.h

Issue 2118243002: [proof-of-concept] SW thread independent of the main thread Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/serviceworkers/IsolatedWorkerThread.h
diff --git a/third_party/WebKit/Source/modules/serviceworkers/IsolatedWorkerThread.h b/third_party/WebKit/Source/modules/serviceworkers/IsolatedWorkerThread.h
new file mode 100644
index 0000000000000000000000000000000000000000..57cf707a9152be80c0acb02858bbb35393d668c2
--- /dev/null
+++ b/third_party/WebKit/Source/modules/serviceworkers/IsolatedWorkerThread.h
@@ -0,0 +1,32 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IsolatedWorkerThread_h
+#define IsolatedWorkerThread_h
+
+#include "core/workers/WorkerThread.h"
+
+namespace blink {
+
+class WorkerBackingThread;
+
+class IsolatedWorkerThread final : public WorkerThread {
+public:
+ static std::unique_ptr<IsolatedWorkerThread> create(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&);
+ ~IsolatedWorkerThread() override;
+
+ WorkerBackingThread& workerBackingThread() override { return *m_workerBackingThread; }
+
+protected:
+ void clearWorkerBackingThread() override;
+ WorkerOrWorkletGlobalScope* createWorkerGlobalScope(std::unique_ptr<WorkerThreadStartupData>) override;
+
+private:
+ IsolatedWorkerThread(PassRefPtr<WorkerLoaderProxy>, WorkerReportingProxy&);
+ std::unique_ptr<WorkerBackingThread> m_workerBackingThread;
+};
+
+} // namespace blink
+
+#endif // IsolatedWorkerThread_h

Powered by Google App Engine
This is Rietveld 408576698