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

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: removed redundant ExecutionContext parameter, changed WorkletScriptLoader to inherit from ResourceO… 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/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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698