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

Unified Diff: Source/modules/compositorworker/CompositorWorkerThread.cpp

Issue 1018863002: compositor-worker: Introduce CompositorWorker. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 9 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
« no previous file with comments | « Source/modules/compositorworker/CompositorWorkerThread.h ('k') | Source/modules/compositorworker/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d9c00413f46017af15bc04ecc390450b1e18ca38
--- /dev/null
+++ b/Source/modules/compositorworker/CompositorWorkerThread.cpp
@@ -0,0 +1,38 @@
+// 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()
+{
+}
+
+PassRefPtrWillBeRawPtr<WorkerGlobalScope> CompositorWorkerThread::createWorkerGlobalScope(PassOwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData)
+{
+ return CompositorWorkerGlobalScope::create(this, startupData, m_timeOrigin);
+}
+
+} // namespace blink
« no previous file with comments | « Source/modules/compositorworker/CompositorWorkerThread.h ('k') | Source/modules/compositorworker/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698