Index: third_party/WebKit/Source/modules/worklet/Worklet.h |
diff --git a/third_party/WebKit/Source/modules/worklet/Worklet.h b/third_party/WebKit/Source/modules/worklet/Worklet.h |
index 7af0832648811b65bfc114b8a6ba4bca7b785f06..9df5d8237a367f437a68fd5c4a9e0f752305c5c3 100644 |
--- a/third_party/WebKit/Source/modules/worklet/Worklet.h |
+++ b/third_party/WebKit/Source/modules/worklet/Worklet.h |
@@ -5,28 +5,46 @@ |
#ifndef Worklet_h |
#define Worklet_h |
+#include "bindings/core/v8/ScriptPromise.h" |
#include "bindings/core/v8/ScriptWrappable.h" |
+#include "core/dom/ActiveDOMObject.h" |
+#include "core/frame/csp/ContentSecurityPolicy.h" |
+#include "core/workers/WorkerScriptLoader.h" |
#include "modules/worklet/WorkletGlobalScope.h" |
#include "platform/heap/Handle.h" |
namespace blink { |
class ExecutionContext; |
+class ScriptPromiseResolver; |
+class WorkerScriptLoader; |
-class Worklet final : public GarbageCollectedFinalized<Worklet>, public ScriptWrappable { |
- WTF_MAKE_NONCOPYABLE(Worklet); |
+class Worklet final : public GarbageCollectedFinalized<Worklet>, public ScriptWrappable, public ActiveDOMObject { |
DEFINE_WRAPPERTYPEINFO(); |
+ USING_GARBAGE_COLLECTED_MIXIN(Worklet); |
+ WTF_MAKE_NONCOPYABLE(Worklet); |
public: |
// The ExecutionContext argument is the parent document of the Worklet. The |
// Worklet inherits the url and userAgent, from the document. |
static Worklet* create(ExecutionContext*); |
+ ScriptPromise import(ScriptState*, const String& url); |
+ |
+ // ActiveDOMObject |
+ void stop() final; |
+ bool hasPendingActivity() const final; |
kinuko
2016/02/12 07:25:45
nit: this method is now moved to ScriptWrappable a
ikilpatrick
2016/02/12 22:59:57
I'm unsure as well. I had a hunch that this wasn't
kinuko
2016/02/15 04:58:27
I _think_ we should be fine without implementing h
ikilpatrick
2016/02/16 19:34:14
Makes sense, removed hasPendingActivity.
I can th
|
+ |
DECLARE_TRACE(); |
private: |
explicit Worklet(ExecutionContext*); |
+ void onResponse(); |
+ void onFinished(WorkerScriptLoader*, ScriptPromiseResolver*); |
+ |
RefPtrWillBeMember<WorkletGlobalScope> m_workletGlobalScope; |
+ Vector<RefPtr<WorkerScriptLoader>> m_scriptLoaders; |
+ HeapVector<Member<ScriptPromiseResolver>> m_resolvers; |
}; |
} // namespace blink |