Index: sky/engine/core/app/AbstractModule.h |
diff --git a/sky/engine/core/app/AbstractModule.h b/sky/engine/core/app/AbstractModule.h |
index 0e8d7c772007c05bd1b36cfdc6fb9f498f609205..dcc6c77414b4bbf09ae11e70c6116f65e058e591 100644 |
--- a/sky/engine/core/app/AbstractModule.h |
+++ b/sky/engine/core/app/AbstractModule.h |
@@ -5,8 +5,6 @@ |
#ifndef SKY_ENGINE_CORE_APP_ABSTRACTMODULE_H_ |
#define SKY_ENGINE_CORE_APP_ABSTRACTMODULE_H_ |
-#include "sky/engine/bindings/core/v8/ScriptPromiseResolver.h" |
-#include "sky/engine/core/app/ModuleLoader.h" |
#include "sky/engine/core/dom/ContextLifecycleObserver.h" |
#include "sky/engine/core/dom/Document.h" |
#include "sky/engine/core/events/EventTarget.h" |
@@ -17,9 +15,7 @@ class Application; |
class AbstractModule : public RefCounted<AbstractModule>, |
public EventTargetWithInlineData, |
- public ContextLifecycleObserver, |
- public ModuleLoader::Client { |
- DEFINE_WRAPPERTYPEINFO(); |
+ public ContextLifecycleObserver { |
REFCOUNTED_EVENT_TARGET(AbstractModule); |
public: |
virtual ~AbstractModule(); |
@@ -27,7 +23,11 @@ class AbstractModule : public RefCounted<AbstractModule>, |
Document* document() const { return document_.get(); } |
const String& url() const { return url_; } |
- ScriptPromise import(ScriptState*, const String& url); |
+ virtual bool isApplication() const { return false; } |
+ |
+ void set_library(RefPtr<DartValue> library) { library_ = library; } |
+ |
+ DartValue* library() const { return library_.get(); } |
protected: |
AbstractModule(ExecutionContext*, PassRefPtr<Document>, const String& url); |
@@ -37,12 +37,9 @@ class AbstractModule : public RefCounted<AbstractModule>, |
private: |
ExecutionContext* executionContext() const override; |
- void OnModuleLoadComplete(ModuleLoader*, Module*) override; |
- |
RefPtr<Document> document_; |
String url_; |
- |
- HashMap<OwnPtr<ModuleLoader>, RefPtr<ScriptPromiseResolver>> loaders_; |
+ RefPtr<DartValue> library_; |
}; |
} // namespace blink |