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

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

Issue 2839123003: Worklet: Introduce "pending tasks struct" concept defined in the Worklet spec (Closed)
Patch Set: address review comments Created 3 years, 7 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 ThreadedWorklet_h 5 #ifndef ThreadedWorklet_h
6 #define ThreadedWorklet_h 6 #define ThreadedWorklet_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 16 matching lines...) Expand all
27 WTF_MAKE_NONCOPYABLE(ThreadedWorklet); 27 WTF_MAKE_NONCOPYABLE(ThreadedWorklet);
28 28
29 public: 29 public:
30 virtual ~ThreadedWorklet() = default; 30 virtual ~ThreadedWorklet() = default;
31 31
32 // Called when addModule() is called for the first time. 32 // Called when addModule() is called for the first time.
33 virtual void Initialize() = 0; 33 virtual void Initialize() = 0;
34 virtual bool IsInitialized() const = 0; 34 virtual bool IsInitialized() const = 0;
35 35
36 // Worklet 36 // Worklet
37 ScriptPromise addModule(ScriptState*, const String& url) final; 37 ScriptPromise addModule(ScriptState*, const String& module_url) final;
38 38
39 // WorkletScriptLoader::Client 39 // WorkletScriptLoader::Client
40 void NotifyWorkletScriptLoadingFinished(WorkletScriptLoader*, 40 void NotifyWorkletScriptLoadingFinished(WorkletScriptLoader*,
41 const ScriptSourceCode&) final; 41 const ScriptSourceCode&) final;
42 42
43 // ContextLifecycleObserver 43 // ContextLifecycleObserver
44 void ContextDestroyed(ExecutionContext*) final; 44 void ContextDestroyed(ExecutionContext*) final;
45 45
46 DECLARE_VIRTUAL_TRACE(); 46 DECLARE_VIRTUAL_TRACE();
47 47
48 protected: 48 protected:
49 explicit ThreadedWorklet(LocalFrame*); 49 explicit ThreadedWorklet(LocalFrame*);
50 50
51 private: 51 private:
52 HeapHashMap<Member<WorkletScriptLoader>, Member<ScriptPromiseResolver>> 52 HeapHashMap<Member<WorkletScriptLoader>, Member<ScriptPromiseResolver>>
53 loader_to_resolver_map_; 53 loader_to_resolver_map_;
54 }; 54 };
55 55
56 } // namespace blink 56 } // namespace blink
57 57
58 #endif // ThreadedWorklet_h 58 #endif // ThreadedWorklet_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/workers/MainThreadWorkletTest.cpp ('k') | third_party/WebKit/Source/core/workers/Worklet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698