OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WorkletMessagingProxy_h |
| 6 #define WorkletMessagingProxy_h |
| 7 |
| 8 #include "platform/heap/Handle.h" |
| 9 #include "wtf/Noncopyable.h" |
| 10 #include "wtf/text/WTFString.h" |
| 11 |
| 12 namespace blink { |
| 13 |
| 14 class CompositorWorkletThread; |
| 15 class ExecutionContext; |
| 16 class Worklet; |
| 17 |
| 18 // XXX subclasses may expose a handle on this directly to call from the particul
ar thread (sync). |
| 19 class WorkletMessagingProxy { |
| 20 WTF_MAKE_NONCOPYABLE(WorkletMessagingProxy); |
| 21 public: |
| 22 static WorkletMessagingProxy* create(Worklet*); |
| 23 virtual ~WorkletMessagingProxy(); |
| 24 |
| 25 void loadScript(const String& sourceCode); |
| 26 private: |
| 27 explicit WorkletMessagingProxy(Worklet*); |
| 28 |
| 29 RefPtrWillBePersistent<ExecutionContext> m_executionContext; |
| 30 WeakPersistent<Worklet> m_worklet; |
| 31 RefPtr<CompositorWorkletThread> m_thread; |
| 32 }; |
| 33 |
| 34 } // namespace blink |
| 35 |
| 36 #endif // WorkletMessagingProxy_h |
OLD | NEW |