| Index: Source/WebCore/bindings/dart/DartApplicationLoader.h
|
| diff --git a/Source/WebCore/bindings/dart/DartApplicationLoader.h b/Source/WebCore/bindings/dart/DartApplicationLoader.h
|
| deleted file mode 100644
|
| index 7abdab6c2aa3771d61dc159359b5442d532fcad4..0000000000000000000000000000000000000000
|
| --- a/Source/WebCore/bindings/dart/DartApplicationLoader.h
|
| +++ /dev/null
|
| @@ -1,102 +0,0 @@
|
| -// Copyright 2011, Google Inc.
|
| -// All rights reserved.
|
| -//
|
| -// Redistribution and use in source and binary forms, with or without
|
| -// modification, are permitted provided that the following conditions are
|
| -// met:
|
| -//
|
| -// * Redistributions of source code must retain the above copyright
|
| -// notice, this list of conditions and the following disclaimer.
|
| -// * Redistributions in binary form must reproduce the above
|
| -// copyright notice, this list of conditions and the following disclaimer
|
| -// in the documentation and/or other materials provided with the
|
| -// distribution.
|
| -// * Neither the name of Google Inc. nor the names of its
|
| -// contributors may be used to endorse or promote products derived from
|
| -// this software without specific prior written permission.
|
| -//
|
| -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| -
|
| -#ifndef DartApplicationLoader_h
|
| -#define DartApplicationLoader_h
|
| -
|
| -#include "ScriptSourceCode.h"
|
| -
|
| -#include <dart_api.h>
|
| -#include <wtf/HashMap.h>
|
| -#include <wtf/HashSet.h>
|
| -#include <wtf/text/StringHash.h>
|
| -
|
| -namespace WebCore {
|
| -
|
| -class Document;
|
| -class KURL;
|
| -class ScriptSourceCode;
|
| -
|
| -// FIXME: move into a file on its own when source reinjection is implemented.
|
| -class DartApplicationLoader : public ThreadSafeRefCounted<DartApplicationLoader> {
|
| -public:
|
| - DartApplicationLoader(Document*);
|
| - void loadScriptResource(const String& url);
|
| - void load(const String& url, const String& source);
|
| - void triggerImport(const String& libraryUrl, const String& importedUrl, Dart_LibraryTag);
|
| - Dart_Handle reinject(Dart_Handle library, const String& libraryUrl, const String& importedUrl, Dart_LibraryTag);
|
| - void reinjectSources();
|
| - bool isLoadingMainIsolate() const { return m_libraryUrl.isNull(); }
|
| - const String& mainLibraryURL() const { return m_libraryUrl; }
|
| -
|
| -private:
|
| -
|
| - void importBuiltinLibrary(const String& url, const String& source);
|
| - void reinjectLibrary(const ScriptSourceCode&);
|
| - void scriptLoadError(const KURL&);
|
| -
|
| - static Dart_Handle reinjectTagHandler(Dart_LibraryTag, Dart_Handle, Dart_Handle);
|
| -
|
| - // Client must ensure that DartApplicationLoader doesn't outlive corresponding document.
|
| - Document* m_document;
|
| - String m_libraryUrl;
|
| -
|
| - void loadScript(const String& url, const String& source);
|
| - void loadLibrary(const String& url, const String& source);
|
| - void loadSource(const String& url, const String& source);
|
| - void callEntryPoint();
|
| -
|
| - Dart_Handle topLevelLibrary();
|
| - Dart_Handle domLibrary();
|
| -
|
| - typedef HashSet<String> UrlSet;
|
| - typedef HashMap<String, UrlSet*> UrlMultiMap;
|
| -
|
| - void add(UrlMultiMap&, const String& key, const String& value);
|
| -
|
| - UrlSet m_importedLibraries;
|
| - UrlMultiMap m_importersForSource;
|
| -
|
| - // Sources of resources loaded from the URL.
|
| - // We save them verbatim to be able to reinject them later.
|
| - HashMap<String, String> m_sources;
|
| -
|
| - bool m_mainScriptHasBeenLoaded;
|
| -
|
| - friend class ScriptLoadCallback;
|
| -};
|
| -
|
| -// FIXME: consolidate when we have multiple isolates.
|
| -// FIXME: merge with DartUtilities' per isolate data.
|
| -typedef HashMap<Dart_Isolate, DartApplicationLoader*> IsolateToDartApplicationLoaderMap;
|
| -
|
| -IsolateToDartApplicationLoaderMap& isolateToDartApplicationLoaderMap();
|
| -}
|
| -
|
| -#endif // DartApplicationLoader_h
|
|
|