| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 Dart_Handle spawnDomIsolate(DOMWindow* targetWindow, const String& entryPoin
t); | 74 Dart_Handle spawnDomIsolate(DOMWindow* targetWindow, const String& entryPoin
t); |
| 75 | 75 |
| 76 static DartController* retrieve(Frame*); | 76 static DartController* retrieve(Frame*); |
| 77 static DartController* retrieve(ScriptExecutionContext*); | 77 static DartController* retrieve(ScriptExecutionContext*); |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 static void initVMIfNeeded(); | 80 static void initVMIfNeeded(); |
| 81 | 81 |
| 82 static PassRefPtr<DartIsolate> createIsolate(Document*, PassRefPtr<DartAppli
cationLoader>); | 82 static PassRefPtr<DartIsolate> createIsolate(Document*, PassRefPtr<DartAppli
cationLoader>); |
| 83 static void shutdownIsolate(DartIsolate* isolate); | |
| 84 | 83 |
| 85 static bool createPureIsolateCallback(const char* prefix, void*, char** erro
rMsg); | 84 static bool createPureIsolateCallback(const char* prefix, void*, char** erro
rMsg); |
| 86 void installDartExtensions(v8::Handle<v8::Context>); | 85 void installDartExtensions(v8::Handle<v8::Context>); |
| 87 | 86 |
| 88 bool isDartMimeType(const String& mimeType); | 87 bool isDartMimeType(const String& mimeType); |
| 89 void loadScripts(); | 88 void loadScripts(); |
| 90 | 89 |
| 91 void didLeaveScriptContext(int recursion); | 90 void didLeaveScriptContext(int recursion); |
| 92 | 91 |
| 93 // The frame that owns this controller. | 92 // The frame that owns this controller. |
| 94 Frame* m_frame; | 93 Frame* m_frame; |
| 95 | 94 |
| 96 bool m_scriptsLoaded; | 95 bool m_scriptsLoaded; |
| 97 | 96 |
| 98 // Isolates associated with scripts in this document. | 97 // Isolates associated with scripts in this document. |
| 99 Vector< RefPtr<DartIsolate> > m_isolates; | 98 Vector< RefPtr<DartIsolate> > m_isolates; |
| 100 | 99 |
| 101 typedef HashMap<String, NPObject*> NPObjectMap; | 100 typedef HashMap<String, NPObject*> NPObjectMap; |
| 102 NPObjectMap m_npObjectMap; | 101 NPObjectMap m_npObjectMap; |
| 103 | 102 |
| 104 friend class DartIsolate; | 103 friend class DartIsolate; |
| 105 friend class DartScriptRunner; | 104 friend class DartScriptRunner; |
| 106 }; | 105 }; |
| 107 | 106 |
| 108 } | 107 } |
| 109 | 108 |
| 110 #endif // DartController_h | 109 #endif // DartController_h |
| OLD | NEW |