Index: Source/modules/compositorworker/CompositorWorkerThread.cpp |
diff --git a/Source/modules/compositorworker/CompositorWorkerThread.cpp b/Source/modules/compositorworker/CompositorWorkerThread.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..28a300f262e83b59d729999ee5dc924078102dac |
--- /dev/null |
+++ b/Source/modules/compositorworker/CompositorWorkerThread.cpp |
@@ -0,0 +1,73 @@ |
+// Copyright 2015 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. |
+ |
+#include "config.h" |
+#include "modules/compositorworker/CompositorWorkerThread.h" |
+ |
+#include "bindings/core/v8/V8Initializer.h" |
+#include "core/workers/WorkerObjectProxy.h" |
+#include "core/workers/WorkerThreadStartupData.h" |
+#include "modules/compositorworker/CompositorWorkerGlobalScope.h" |
+#include "public/platform/Platform.h" |
+ |
+namespace blink { |
+ |
+PassRefPtr<CompositorWorkerThread> CompositorWorkerThread::create(PassRefPtr<WorkerLoaderProxy> workerLoaderProxy, WorkerObjectProxy& workerObjectProxy, double timeOrigin, PassOwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData) |
+{ |
+ ASSERT(isMainThread()); |
+ return adoptRef(new CompositorWorkerThread(workerLoaderProxy, workerObjectProxy, timeOrigin, startupData)); |
+} |
+ |
+CompositorWorkerThread::CompositorWorkerThread(PassRefPtr<WorkerLoaderProxy> workerLoaderProxy, WorkerObjectProxy& workerObjectProxy, double timeOrigin, PassOwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData) |
+ : WorkerThread(workerLoaderProxy, workerObjectProxy, startupData) |
+ , m_workerObjectProxy(workerObjectProxy) |
+ , m_timeOrigin(timeOrigin) |
+{ |
+} |
+ |
+CompositorWorkerThread::~CompositorWorkerThread() |
+{ |
+} |
+ |
+v8::Isolate* CompositorWorkerThread::initializeIsolate() |
tkent
2015/03/26 04:22:10
Do you still need these override?
sadrul
2015/03/26 04:36:39
We still need to override these for CompositorWork
tkent
2015/03/26 05:33:12
ok, it makes sense. lgtm
|
+{ |
+ return WorkerThread::initializeIsolate(); |
+} |
+ |
+void CompositorWorkerThread::willDestroyIsolate() |
+{ |
+ WorkerThread::willDestroyIsolate(); |
+} |
+ |
+void CompositorWorkerThread::destroyIsolate() |
+{ |
+ WorkerThread::destroyIsolate(); |
+} |
+ |
+void CompositorWorkerThread::terminateV8Execution() |
+{ |
+ WorkerThread::terminateV8Execution(); |
+} |
+ |
+PassOwnPtr<WebThreadSupportingGC> CompositorWorkerThread::createWebThreadSupportingGC() |
+{ |
+ return WorkerThread::createWebThreadSupportingGC(); |
+} |
+ |
+void CompositorWorkerThread::didStartRunLoop() |
+{ |
+ WorkerThread::didStartRunLoop(); |
+} |
+ |
+void CompositorWorkerThread::didStopRunLoop() |
+{ |
+ WorkerThread::didStopRunLoop(); |
+} |
+ |
+PassRefPtrWillBeRawPtr<WorkerGlobalScope> CompositorWorkerThread::createWorkerGlobalScope(PassOwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData) |
+{ |
+ return CompositorWorkerGlobalScope::create(this, startupData, m_timeOrigin); |
+} |
+ |
+} // namespace blink |