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

Side by Side Diff: third_party/WebKit/Source/core/workers/MainThreadWorklet.h

Issue 2826983002: Rename Worklet.import() to Worklet.addModule(). (Closed)
Patch Set: Fixing Layout Tests Created 3 years, 8 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 MainThreadWorklet_h 5 #ifndef MainThreadWorklet_h
6 #define MainThreadWorklet_h 6 #define MainThreadWorklet_h
7 7
8 #include "core/workers/Worklet.h" 8 #include "core/workers/Worklet.h"
9 9
10 #include "bindings/core/v8/ScriptPromiseResolver.h" 10 #include "bindings/core/v8/ScriptPromiseResolver.h"
(...skipping 11 matching lines...) Expand all
22 // Worklet class once threaded worklets are ready to use module loading. 22 // Worklet class once threaded worklets are ready to use module loading.
23 class CORE_EXPORT MainThreadWorklet : public Worklet, 23 class CORE_EXPORT MainThreadWorklet : public Worklet,
24 public WorkletScriptLoader::Client { 24 public WorkletScriptLoader::Client {
25 USING_GARBAGE_COLLECTED_MIXIN(MainThreadWorklet); 25 USING_GARBAGE_COLLECTED_MIXIN(MainThreadWorklet);
26 WTF_MAKE_NONCOPYABLE(MainThreadWorklet); 26 WTF_MAKE_NONCOPYABLE(MainThreadWorklet);
27 27
28 public: 28 public:
29 virtual ~MainThreadWorklet() = default; 29 virtual ~MainThreadWorklet() = default;
30 30
31 // Worklet 31 // Worklet
32 ScriptPromise import(ScriptState*, const String& url) final; 32 ScriptPromise addModule(ScriptState*, const String& url) final;
33 33
34 // WorkletScriptLoader::Client 34 // WorkletScriptLoader::Client
35 void NotifyWorkletScriptLoadingFinished(WorkletScriptLoader*, 35 void NotifyWorkletScriptLoadingFinished(WorkletScriptLoader*,
36 const ScriptSourceCode&) final; 36 const ScriptSourceCode&) final;
37 37
38 // ContextLifecycleObserver 38 // ContextLifecycleObserver
39 void ContextDestroyed(ExecutionContext*) final; 39 void ContextDestroyed(ExecutionContext*) final;
40 40
41 DECLARE_VIRTUAL_TRACE(); 41 DECLARE_VIRTUAL_TRACE();
42 42
43 protected: 43 protected:
44 explicit MainThreadWorklet(LocalFrame*); 44 explicit MainThreadWorklet(LocalFrame*);
45 45
46 private: 46 private:
47 HeapHashMap<Member<WorkletScriptLoader>, Member<ScriptPromiseResolver>> 47 HeapHashMap<Member<WorkletScriptLoader>, Member<ScriptPromiseResolver>>
48 loader_to_resolver_map_; 48 loader_to_resolver_map_;
49 }; 49 };
50 50
51 } // namespace blink 51 } // namespace blink
52 52
53 #endif // MainThreadWorklet_h 53 #endif // MainThreadWorklet_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698