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

Unified Diff: third_party/WebKit/Source/web/CompositorProxyClientFactoryImpl.cpp

Issue 2515363002: Introduce AnimationWorkletProxyClient and necessary plumbing to get it in worklet messaging proxy. (Closed)
Patch Set: address feedback Created 4 years, 1 month 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/web/CompositorProxyClientFactoryImpl.cpp
diff --git a/third_party/WebKit/Source/web/CompositorProxyClientFactoryImpl.cpp b/third_party/WebKit/Source/web/CompositorProxyClientFactoryImpl.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..5d5821fae3510eea983d88a61a96da118500b02f
--- /dev/null
+++ b/third_party/WebKit/Source/web/CompositorProxyClientFactoryImpl.cpp
@@ -0,0 +1,31 @@
+// 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.
+
+#include "web/CompositorProxyClientFactoryImpl.h"
+
+#include "core/dom/CompositorProxyClient.h"
+#include "web/AnimationWorkletProxyClientImpl.h"
+#include "web/CompositorMutatorImpl.h"
+#include "web/CompositorWorkerProxyClientImpl.h"
+
+namespace blink {
+
+CompositorProxyClientFactoryImpl::CompositorProxyClientFactoryImpl(
+ CompositorMutatorImpl* mutator)
+ : m_mutator(mutator) {}
+
+CompositorProxyClient* CompositorProxyClientFactoryImpl::create(
+ CompositorProxyClient::Type type) {
+ switch (type) {
+ case CompositorProxyClient::kWorkerClient:
+ return new CompositorWorkerProxyClientImpl(m_mutator);
+ case CompositorProxyClient::kWorkletClient:
+ return new AnimationWorkletProxyClientImpl(m_mutator);
+ }
+
+ NOTREACHED() << "Unexpected CompositorProxyClient::Type: " << type;
+ return nullptr;
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698