| Index: Source/bindings/dart/DartApplicationLoader.h
|
| diff --git a/Source/bindings/dart/DartApplicationLoader.h b/Source/bindings/dart/DartApplicationLoader.h
|
| index 6c59502f8d0c90ff9a2d3702500d9a0d8a7165d5..a6333d4da313d505701f68fe05125f3267a26bfe 100644
|
| --- a/Source/bindings/dart/DartApplicationLoader.h
|
| +++ b/Source/bindings/dart/DartApplicationLoader.h
|
| @@ -30,6 +30,7 @@
|
| #ifndef DartApplicationLoader_h
|
| #define DartApplicationLoader_h
|
|
|
| +#include "bindings/dart/DartAsyncLoader.h"
|
| #include "bindings/v8/ScriptSourceCode.h"
|
| #include "core/html/HTMLScriptElement.h"
|
| #include "core/html/VoidCallback.h"
|
| @@ -50,10 +51,9 @@ public:
|
| virtual void dispatchErrorEvent() = 0;
|
| };
|
|
|
| - DartApplicationLoader(Dart_Isolate, Document*, PassRefPtr<ErrorEventDispatcher>, PassRefPtr<VoidCallback> = 0, bool domEnabled = true);
|
| + DartApplicationLoader(Dart_Isolate, Document*, PassRefPtr<ErrorEventDispatcher>, PassRefPtr<DartAsyncLoader>, bool domEnabled = true);
|
|
|
| - void loadScriptResource(const String& url);
|
| - void load(const String& url, const String& source, WTF::OrdinalNumber startLineNumber);
|
| + void load(const String& url, const String& source, int startLineNumber);
|
| const String& mainLibraryURL() const { return m_libraryUrl; }
|
|
|
| Document* document() { return m_originDocument; }
|
| @@ -62,10 +62,9 @@ public:
|
|
|
| private:
|
| void scriptLoadError(String failedUrl);
|
| - void loadMainScript(const String& url, const String& source, WTF::OrdinalNumber startLineNumber);
|
| + void loadMainScript(const String& url, const String& source, int startLineNumber);
|
|
|
| static Dart_Handle libraryTagHandlerCallback(Dart_LibraryTag, Dart_Handle library, Dart_Handle urlHandle);
|
| - static Dart_Handle CanonicalizeUrl(Dart_Handle library, Dart_Handle urlHandle, String url);
|
| Dart_Handle libraryTagHandler(Dart_LibraryTag, Dart_Handle library, Dart_Handle urlHandle, String url);
|
|
|
| Dart_Isolate m_isolate;
|
| @@ -76,30 +75,16 @@ private:
|
|
|
| void loadScriptFromSnapshot(const String& url, const uint8_t* snapshot, intptr_t snapshotSize);
|
| void loadLibrary(const String& url, const String& source);
|
| - void loadSource(const String& url, const String& source);
|
| void callEntryPoint();
|
|
|
| Dart_Handle topLevelLibrary();
|
|
|
| void reportDartError(Dart_Handle);
|
|
|
| - typedef HashSet<String> UrlSet;
|
| - typedef HashMap<String, UrlSet*> UrlMultiMap;
|
| -
|
| - void add(UrlMultiMap&, const String& key, const String& value);
|
| -
|
| - // FIXME: we can get rid of imported libs and sources map.
|
| - UrlSet m_importedLibraries;
|
| - UrlMultiMap m_importersForSource;
|
| -
|
| - bool m_mainScriptHasBeenLoaded;
|
| -
|
| bool m_scriptHasError;
|
| -
|
| - RefPtr<VoidCallback> m_applicationLoadedCallback;
|
| bool m_domEnabled;
|
|
|
| - friend class ScriptLoadCallback;
|
| + RefPtr<DartAsyncLoader> m_asyncLoader;
|
| };
|
|
|
| }
|
|
|