OLD | NEW |
1 // Copyright 2013, Google Inc. | 1 // Copyright 2013, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 void process(const String& url, const String& source, intptr_t lineNumber); | 126 void process(const String& url, const String& source, intptr_t lineNumber); |
127 void fetchScriptResource(const String& url); | 127 void fetchScriptResource(const String& url); |
128 | 128 |
129 // The main script has been processed. The top-level source and lineNumber a
re valid. | 129 // The main script has been processed. The top-level source and lineNumber a
re valid. |
130 bool mainScriptFetched() const { return m_mainScriptFetched; } | 130 bool mainScriptFetched() const { return m_mainScriptFetched; } |
131 | 131 |
132 // All dependences are available. | 132 // All dependences are available. |
133 bool ready() const { return mainScriptFetched() && m_pendingLibraries.isEmpt
y() && m_pendingSource.isEmpty() && !m_error; } | 133 bool ready() const { return mainScriptFetched() && m_pendingLibraries.isEmpt
y() && m_pendingSource.isEmpty() && !m_error; } |
134 | 134 |
135 void findDependences(const String& url, const String& source, intptr_t lineN
umber); | 135 void findDependences(const String& url, const String& source, intptr_t lineN
umber); |
136 void processLibrary(const String& url, const String& source); | 136 void processLibrary(const String& url, const String& source, intptr_t lineNu
mber); |
137 void processSource(const String& url, const String& source); | 137 void processSource(const String& url, const String& source, intptr_t lineNum
ber); |
138 void reportError(Dart_Handle error, const String& url); | 138 void reportError(Dart_Handle error, const String& url); |
139 void reportError(const String& error, const String& url); | 139 void reportError(const String& error, const String& url); |
140 static Dart_Handle libraryTagHandlerCallback(Dart_LibraryTag, Dart_Handle li
brary, Dart_Handle urlHandle); | 140 static Dart_Handle libraryTagHandlerCallback(Dart_LibraryTag, Dart_Handle li
brary, Dart_Handle urlHandle); |
141 | 141 |
142 RefPtr<LoadCallback> m_loadCallback; | 142 RefPtr<LoadCallback> m_loadCallback; |
143 | 143 |
144 typedef Vector<RefPtr<DartScriptInfo> > ScriptList; | 144 typedef Vector<RefPtr<DartScriptInfo> > ScriptList; |
145 ScriptList m_scriptsToLoad; | 145 ScriptList m_scriptsToLoad; |
146 UrlSet m_pendingLibraries; | 146 UrlSet m_pendingLibraries; |
147 UrlHandleMap m_pendingSource; | 147 UrlHandleMap m_pendingSource; |
148 bool m_mainScriptFetched; | 148 bool m_mainScriptFetched; |
149 bool m_rootLoaded; | 149 bool m_rootLoaded; |
150 KURL m_topUrl; | 150 KURL m_topUrl; |
151 bool m_error; | 151 bool m_error; |
152 | 152 |
153 // Private isolate for parsing and processing Dart files. | 153 // Private isolate for parsing and processing Dart files. |
154 Dart_Isolate m_isolate; | 154 Dart_Isolate m_isolate; |
155 | 155 |
156 friend class ScriptLoadedCallback; | 156 friend class ScriptLoadedCallback; |
157 }; | 157 }; |
158 | 158 |
159 } | 159 } |
160 #endif // DartAsyncLoader_h | 160 #endif // DartAsyncLoader_h |
OLD | NEW |