| 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 Worklet_h | 5 #ifndef Worklet_h |
| 6 #define Worklet_h | 6 #define Worklet_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "modules/worklet/WorkletGlobalScope.h" | 9 #include "modules/worklet/WorkletGlobalScope.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 ExecutionContext; | 14 class ExecutionContext; |
| 15 | 15 |
| 16 class Worklet final : public GarbageCollectedFinalized<Worklet>, public ScriptWr
appable { | 16 class Worklet final : public GarbageCollectedFinalized<Worklet>, public ScriptWr
appable { |
| 17 WTF_MAKE_NONCOPYABLE(Worklet); | 17 WTF_MAKE_NONCOPYABLE(Worklet); |
| 18 DEFINE_WRAPPERTYPEINFO(); | 18 DEFINE_WRAPPERTYPEINFO(); |
| 19 public: | 19 public: |
| 20 // The ExecutionContext argument is the parent document of the Worklet. The | 20 // The ExecutionContext argument is the parent document of the Worklet. The |
| 21 // Worklet inherits the url and userAgent, from the document. | 21 // Worklet inherits the url and userAgent, from the document. |
| 22 static Worklet* create(ExecutionContext*); | 22 static Worklet* create(ExecutionContext*); |
| 23 | 23 |
| 24 DECLARE_TRACE(); | 24 DECLARE_TRACE(); |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 explicit Worklet(ExecutionContext*); | 27 explicit Worklet(ExecutionContext*); |
| 28 | 28 |
| 29 RefPtrWillBeMember<WorkletGlobalScope> m_workletGlobalScope; | 29 Member<WorkletGlobalScope> m_workletGlobalScope; |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 } // namespace blink | 32 } // namespace blink |
| 33 | 33 |
| 34 #endif // Worklet_h | 34 #endif // Worklet_h |
| OLD | NEW |