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

Side by Side Diff: third_party/WebKit/Source/modules/worklet/WorkletScriptLoader.h

Issue 2178223002: Refactor Worklet class to use ScriptResource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed comments & synced to the HEAD Created 4 years, 4 months 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 unified diff | Download patch
OLDNEW
(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/ScriptResource.h"
11
12 namespace blink {
13
14 class ScriptPromiseResolver;
15 class Worklet;
16
17 class WorkletScriptLoader final : public GarbageCollectedFinalized<WorkletScript Loader>, public ScriptResourceClient {
18 USING_GARBAGE_COLLECTED_MIXIN(WorkletScriptLoader);
19 WTF_MAKE_NONCOPYABLE(WorkletScriptLoader);
20 public:
21 static WorkletScriptLoader* create(ScriptPromiseResolver* scriptPromiseResol ver, Worklet* worklet)
22 {
23 return new WorkletScriptLoader(scriptPromiseResolver, worklet);
24 }
25
26 ~WorkletScriptLoader() override = default;
27
28 DECLARE_TRACE();
29
30 private:
31 WorkletScriptLoader(ScriptPromiseResolver*, Worklet* host);
32
33 // ResourceClient
34 void notifyFinished(Resource*) final;
35 String debugName() const final { return "WorkletLoader"; }
36
37 Member<ScriptPromiseResolver> m_resolver;
38 Member<Worklet> m_host;
39 };
40
41 } // namespace blink
42
43 #endif // WorkletScriptLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698