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

Unified Diff: third_party/WebKit/Source/modules/worklet/WorkletMessagingProxy.h

Issue 1510603005: [Do not submit] Worklet implementation. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: A basic CompositorWorklet implementation. Created 5 years 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/worklet/WorkletMessagingProxy.h
diff --git a/third_party/WebKit/Source/modules/worklet/WorkletMessagingProxy.h b/third_party/WebKit/Source/modules/worklet/WorkletMessagingProxy.h
new file mode 100644
index 0000000000000000000000000000000000000000..82a9217fc1888be081b734808ee23b060bd60ec3
--- /dev/null
+++ b/third_party/WebKit/Source/modules/worklet/WorkletMessagingProxy.h
@@ -0,0 +1,36 @@
+// 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.
+
+#ifndef WorkletMessagingProxy_h
+#define WorkletMessagingProxy_h
+
+#include "platform/heap/Handle.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class CompositorWorkletThread;
+class ExecutionContext;
+class Worklet;
+
+// XXX subclasses may expose a handle on this directly to call from the particular thread (sync).
+class WorkletMessagingProxy {
+ WTF_MAKE_NONCOPYABLE(WorkletMessagingProxy);
+public:
+ static WorkletMessagingProxy* create(Worklet*);
+ virtual ~WorkletMessagingProxy();
+
+ void loadScript(const String& sourceCode);
+private:
+ explicit WorkletMessagingProxy(Worklet*);
+
+ RefPtrWillBePersistent<ExecutionContext> m_executionContext;
+ WeakPersistent<Worklet> m_worklet;
+ RefPtr<CompositorWorkletThread> m_thread;
+};
+
+} // namespace blink
+
+#endif // WorkletMessagingProxy_h

Powered by Google App Engine
This is Rietveld 408576698