| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009 Google Inc. 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 // Registers a v8 extension to be available on webpages. Will only | 153 // Registers a v8 extension to be available on webpages. Will only |
| 154 // affect v8 contexts initialized after this call. Takes ownership of | 154 // affect v8 contexts initialized after this call. Takes ownership of |
| 155 // the v8::Extension object passed. | 155 // the v8::Extension object passed. |
| 156 static void registerExtensionIfNeeded(v8::Extension*); | 156 static void registerExtensionIfNeeded(v8::Extension*); |
| 157 static V8Extensions& registeredExtensions(); | 157 static V8Extensions& registeredExtensions(); |
| 158 | 158 |
| 159 bool setContextDebugId(int); | 159 bool setContextDebugId(int); |
| 160 static int contextDebugId(v8::Handle<v8::Context>); | 160 static int contextDebugId(v8::Handle<v8::Context>); |
| 161 | 161 |
| 162 v8::Isolate* isolate() const { return m_isolate; } |
| 163 |
| 162 private: | 164 private: |
| 163 typedef HashMap<int, OwnPtr<V8WindowShell> > IsolatedWorldMap; | 165 typedef HashMap<int, OwnPtr<V8WindowShell> > IsolatedWorldMap; |
| 164 typedef HashMap<Widget*, NPObject*> PluginObjectMap; | 166 typedef HashMap<Widget*, NPObject*> PluginObjectMap; |
| 165 | 167 |
| 166 void clearForClose(bool destroyGlobal); | 168 void clearForClose(bool destroyGlobal); |
| 167 | 169 |
| 168 Frame* m_frame; | 170 Frame* m_frame; |
| 169 const String* m_sourceURL; | 171 const String* m_sourceURL; |
| 170 v8::Isolate* m_isolate; | 172 v8::Isolate* m_isolate; |
| 171 | 173 |
| 172 OwnPtr<V8WindowShell> m_windowShell; | 174 OwnPtr<V8WindowShell> m_windowShell; |
| 173 IsolatedWorldMap m_isolatedWorlds; | 175 IsolatedWorldMap m_isolatedWorlds; |
| 174 | 176 |
| 175 bool m_paused; | 177 bool m_paused; |
| 176 | 178 |
| 177 // A mapping between Widgets and their corresponding script object. | 179 // A mapping between Widgets and their corresponding script object. |
| 178 // This list is used so that when the plugin dies, we can immediately | 180 // This list is used so that when the plugin dies, we can immediately |
| 179 // invalidate all sub-objects which are associated with that plugin. | 181 // invalidate all sub-objects which are associated with that plugin. |
| 180 // The frame keeps a NPObject reference for each item on the list. | 182 // The frame keeps a NPObject reference for each item on the list. |
| 181 PluginObjectMap m_pluginObjects; | 183 PluginObjectMap m_pluginObjects; |
| 182 | 184 |
| 183 NPObject* m_windowScriptNPObject; | 185 NPObject* m_windowScriptNPObject; |
| 184 }; | 186 }; |
| 185 | 187 |
| 186 } // namespace WebCore | 188 } // namespace WebCore |
| 187 | 189 |
| 188 #endif // ScriptController_h | 190 #endif // ScriptController_h |
| OLD | NEW |