Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WorkletScriptLoader_h | |
| 6 #define WorkletScriptLoader_h | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptPromiseResolver.h" | |
| 9 #include "core/fetch/ResourceClient.h" | |
| 10 #include "core/fetch/ResourceOwner.h" | |
| 11 #include "core/fetch/ScriptResource.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 class ScriptPromiseResolver; | |
|
yhirano
2016/08/01 10:56:28
Not needed as you are including the header file.
Gleb Lanbin
2016/08/01 19:49:51
Done.
| |
| 16 class Worklet; | |
| 17 | |
| 18 class WorkletScriptLoader final : public GarbageCollectedFinalized<WorkletScript Loader>, public ResourceOwner<ScriptResource, ScriptResourceClient> { | |
| 19 USING_GARBAGE_COLLECTED_MIXIN(WorkletScriptLoader); | |
| 20 WTF_MAKE_NONCOPYABLE(WorkletScriptLoader); | |
| 21 public: | |
| 22 static WorkletScriptLoader* create(ScriptPromiseResolver* scriptPromiseResol ver, Worklet* worklet, ScriptResource* resource) | |
| 23 { | |
| 24 return new WorkletScriptLoader(scriptPromiseResolver, worklet, resource) ; | |
| 25 } | |
| 26 | |
| 27 ~WorkletScriptLoader() override = default; | |
| 28 | |
| 29 DECLARE_TRACE(); | |
| 30 | |
| 31 private: | |
| 32 WorkletScriptLoader(ScriptPromiseResolver*, Worklet* host, ScriptResource*); | |
| 33 | |
| 34 // ResourceClient | |
| 35 void notifyFinished(Resource*) final; | |
| 36 String debugName() const final { return "WorkletLoader"; } | |
| 37 | |
| 38 Member<ScriptPromiseResolver> m_resolver; | |
| 39 Member<Worklet> m_host; | |
| 40 }; | |
| 41 | |
| 42 } // namespace blink | |
| 43 | |
| 44 #endif // WorkletScriptLoader_h | |
| OLD | NEW |