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

Unified Diff: third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScopeProxy.cpp

Issue 2171973002: [WIP][worklets] ThreadedWorkletGlobalScope + AnimationWorkletGlobalScope Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ...... 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/compositorworker/AnimationWorkletGlobalScopeProxy.cpp
diff --git a/third_party/WebKit/public/platform/WebMemoryPressureLevel.h b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScopeProxy.cpp
similarity index 29%
copy from third_party/WebKit/public/platform/WebMemoryPressureLevel.h
copy to third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScopeProxy.cpp
index f80aa3d8667db000a9551894414e14b5b5e8ffc9..de86f0d6334e297ecafea4dc803726c1469c30f6 100644
--- a/third_party/WebKit/public/platform/WebMemoryPressureLevel.h
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletGlobalScopeProxy.cpp
@@ -2,19 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WebMemoryPressureLevel_h
-#define WebMemoryPressureLevel_h
+#include "modules/compositorworker/AnimationWorkletGlobalScopeProxy.h"
+
+#include "core/workers/ThreadedWorkletMessagingProxy.h"
+#include "core/workers/ThreadedWorkletObjectProxy.h"
+#include "modules/compositorworker/AnimationWorkletThread.h"
namespace blink {
-// These number must correspond to
-// base::MemoryPressureListener::MemoryPressureLevel.
-enum WebMemoryPressureLevel {
- WebMemoryPressureLevelNone,
- WebMemoryPressureLevelModerate,
- WebMemoryPressureLevelCritical,
-};
+AnimationWorkletGlobalScopeProxy::AnimationWorkletGlobalScopeProxy(LocalFrame* frame)
+ : ThreadedWorkletMessagingProxy(frame)
+{
+}
-} // namespace blink
+AnimationWorkletGlobalScopeProxy::~AnimationWorkletGlobalScopeProxy()
+{
+}
-#endif
+std::unique_ptr<WorkerThread> AnimationWorkletGlobalScopeProxy::createWorkerThread()
+{
+ return AnimationWorkletThread::create(loaderProxy(), workerObjectProxy());
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698