| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef AnimationWorklet_h | 5 #ifndef AnimationWorklet_h |
| 6 #define AnimationWorklet_h | 6 #define AnimationWorklet_h |
| 7 | 7 |
| 8 #include "core/workers/Worklet.h" | 8 #include "core/workers/Worklet.h" |
| 9 #include "modules/ModulesExport.h" | 9 #include "modules/ModulesExport.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class LocalFrame; | 14 class LocalFrame; |
| 15 class ThreadedWorkletMessagingProxy; | 15 class ThreadedWorkletGlobalScopeProxy; |
| 16 class WorkletGlobalScopeProxy; | 16 class WorkletGlobalScopeProxy; |
| 17 | 17 |
| 18 class MODULES_EXPORT AnimationWorklet final : public Worklet { | 18 class MODULES_EXPORT AnimationWorklet final : public Worklet { |
| 19 WTF_MAKE_NONCOPYABLE(AnimationWorklet); | 19 WTF_MAKE_NONCOPYABLE(AnimationWorklet); |
| 20 public: | 20 public: |
| 21 static AnimationWorklet* create(LocalFrame*); | 21 static AnimationWorklet* create(LocalFrame*); |
| 22 ~AnimationWorklet() override; | 22 ~AnimationWorklet() override; |
| 23 | 23 |
| 24 WorkletGlobalScopeProxy* workletGlobalScopeProxy() const final; | 24 WorkletGlobalScopeProxy* workletGlobalScopeProxy() const final; |
| 25 | 25 |
| 26 DECLARE_VIRTUAL_TRACE(); | 26 DECLARE_VIRTUAL_TRACE(); |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 explicit AnimationWorklet(LocalFrame*); | 29 explicit AnimationWorklet(LocalFrame*); |
| 30 | 30 |
| 31 // The proxy outlives the worklet as it is used to perform thread shutdown, | 31 // TODO(ikilpatrick): this will change to a raw ptr once we have a thread. |
| 32 // it deletes itself once this has occured. | 32 std::unique_ptr<ThreadedWorkletGlobalScopeProxy> m_workletGlobalScopeProxy; |
| 33 ThreadedWorkletMessagingProxy* const m_workletMessagingProxy; | |
| 34 }; | 33 }; |
| 35 | 34 |
| 36 } // namespace blink | 35 } // namespace blink |
| 37 | 36 |
| 38 #endif // AnimationWorklet_h | 37 #endif // AnimationWorklet_h |
| OLD | NEW |