OLD | NEW |
1 // Copyright 2011, Google Inc. | 1 // Copyright 2011, 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 | 88 |
89 private: | 89 private: |
90 static void initVMIfNeeded(); | 90 static void initVMIfNeeded(); |
91 | 91 |
92 static Dart_Isolate createIsolate(const char* scriptURL, const char* entryPo
int, Document*, bool isDOMEnabled, char** errorMessage); | 92 static Dart_Isolate createIsolate(const char* scriptURL, const char* entryPo
int, Document*, bool isDOMEnabled, char** errorMessage); |
93 static void shutdownIsolate(Dart_Isolate); | 93 static void shutdownIsolate(Dart_Isolate); |
94 | 94 |
95 void createDOMEnabledIsolateIfNeeded(const String& scriptURL, const String&
entryPoint, Document*); | 95 void createDOMEnabledIsolateIfNeeded(const String& scriptURL, const String&
entryPoint, Document*); |
96 void scheduleScriptExecution(const String&, PassRefPtr<DartAsyncLoader>, Pas
sRefPtr<DartScriptInfo>); | 96 void scheduleScriptExecution(const String&, PassRefPtr<DartAsyncLoader>, Pas
sRefPtr<DartScriptInfo>); |
97 void loadAndRunScript(const String&, PassRefPtr<DartAsyncLoader>, PassRefPtr
<DartScriptInfo>); | 97 void loadAndRunScript(const String&, PassRefPtr<DartAsyncLoader>, PassRefPtr
<DartScriptInfo>); |
98 | 98 static void shutdownIsolateCallback(void* data); |
| 99 static Dart_Isolate createServiceIsolateCallback(void* callbackData, char**
error); |
99 static Dart_Isolate createPureIsolateCallback(const char* prefix, const char
* main, void* callbackData, char** errorMsg); | 100 static Dart_Isolate createPureIsolateCallback(const char* prefix, const char
* main, void* callbackData, char** errorMsg); |
100 | 101 |
101 HashSet<Document*> m_documentsWithDart; | 102 HashSet<Document*> m_documentsWithDart; |
102 | 103 |
103 LibraryIdMap* libraryIdMapForIsolate(Dart_Isolate); | 104 LibraryIdMap* libraryIdMapForIsolate(Dart_Isolate); |
104 DartScriptState* lookupScriptStateFromLibraryIdMap(Dart_Isolate, v8::Handle<
v8::Context>, LibraryIdMap*, intptr_t libraryId); | 105 DartScriptState* lookupScriptStateFromLibraryIdMap(Dart_Isolate, v8::Handle<
v8::Context>, LibraryIdMap*, intptr_t libraryId); |
105 | 106 |
106 // The frame that owns this controller. | 107 // The frame that owns this controller. |
107 Frame* m_frame; | 108 Frame* m_frame; |
108 | 109 |
109 // Isolate associated with scripts in this document. | 110 // Isolate associated with scripts in this document. |
110 Dart_Isolate m_isolate; | 111 Dart_Isolate m_isolate; |
111 DartAsyncLoader* m_asyncLoader; | 112 DartAsyncLoader* m_asyncLoader; |
112 RefPtr<DartApplicationLoader> m_loader; | 113 RefPtr<DartApplicationLoader> m_loader; |
113 | 114 |
114 ScriptStatesMap m_scriptStates; | 115 ScriptStatesMap m_scriptStates; |
115 | 116 |
116 typedef HashMap<String, NPObject*> NPObjectMap; | 117 typedef HashMap<String, NPObject*> NPObjectMap; |
117 NPObjectMap m_npObjectMap; | 118 NPObjectMap m_npObjectMap; |
118 | 119 |
119 friend class DartDomLoadCallback; | 120 friend class DartDomLoadCallback; |
120 friend class DartScriptRunner; | 121 friend class DartScriptRunner; |
121 friend class DartService; | 122 friend class DartService; |
122 }; | 123 }; |
123 | 124 |
124 } | 125 } |
125 | 126 |
126 #endif // DartController_h | 127 #endif // DartController_h |
OLD | NEW |