OLD | NEW |
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 private: | 48 private: |
49 // Worklet | 49 // Worklet |
50 void FetchAndInvokeScript(const KURL& module_url_record, | 50 void FetchAndInvokeScript(const KURL& module_url_record, |
51 const WorkletOptions&, | 51 const WorkletOptions&, |
52 ScriptPromiseResolver*) override; | 52 ScriptPromiseResolver*) override; |
53 | 53 |
54 // Called when addModule() is called for the first time. | 54 // Called when addModule() is called for the first time. |
55 virtual void Initialize() = 0; | 55 virtual void Initialize() = 0; |
56 virtual bool IsInitialized() const = 0; | 56 virtual bool IsInitialized() const = 0; |
57 | 57 |
58 Member<LocalFrame> frame_; | |
59 | |
60 HeapHashMap<Member<WorkletScriptLoader>, Member<ScriptPromiseResolver>> | 58 HeapHashMap<Member<WorkletScriptLoader>, Member<ScriptPromiseResolver>> |
61 loader_to_resolver_map_; | 59 loader_to_resolver_map_; |
62 }; | 60 }; |
63 | 61 |
64 } // namespace blink | 62 } // namespace blink |
65 | 63 |
66 #endif // ThreadedWorklet_h | 64 #endif // ThreadedWorklet_h |
OLD | NEW |