OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 Worklet_h | 5 #ifndef Worklet_h |
6 #define Worklet_h | 6 #define Worklet_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
10 #include "core/dom/ActiveDOMObject.h" | 10 #include "core/dom/ActiveDOMObject.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 void stop() final; | 34 void stop() final; |
35 | 35 |
36 DECLARE_VIRTUAL_TRACE(); | 36 DECLARE_VIRTUAL_TRACE(); |
37 | 37 |
38 protected: | 38 protected: |
39 // The ExecutionContext argument is the parent document of the Worklet. The | 39 // The ExecutionContext argument is the parent document of the Worklet. The |
40 // Worklet inherits the url and userAgent from the document. | 40 // Worklet inherits the url and userAgent from the document. |
41 explicit Worklet(ExecutionContext*); | 41 explicit Worklet(ExecutionContext*); |
42 | 42 |
43 private: | 43 private: |
44 void onResponse(); | 44 void onResponse(WorkerScriptLoader*); |
45 void onFinished(WorkerScriptLoader*, ScriptPromiseResolver*); | 45 void onFinished(WorkerScriptLoader*, ScriptPromiseResolver*); |
46 | 46 |
47 Vector<RefPtr<WorkerScriptLoader>> m_scriptLoaders; | 47 Vector<RefPtr<WorkerScriptLoader>> m_scriptLoaders; |
48 HeapVector<Member<ScriptPromiseResolver>> m_resolvers; | 48 HeapVector<Member<ScriptPromiseResolver>> m_resolvers; |
49 }; | 49 }; |
50 | 50 |
51 } // namespace blink | 51 } // namespace blink |
52 | 52 |
53 #endif // Worklet_h | 53 #endif // Worklet_h |
OLD | NEW |