| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 NPObject* windowScriptNPObject(); | 148 NPObject* windowScriptNPObject(); |
| 149 | 149 |
| 150 // Registers a v8 extension to be available on webpages. Will only | 150 // Registers a v8 extension to be available on webpages. Will only |
| 151 // affect v8 contexts initialized after this call. Takes ownership of | 151 // affect v8 contexts initialized after this call. Takes ownership of |
| 152 // the v8::Extension object passed. | 152 // the v8::Extension object passed. |
| 153 static void registerExtensionIfNeeded(v8::Extension*); | 153 static void registerExtensionIfNeeded(v8::Extension*); |
| 154 static V8Extensions& registeredExtensions(); | 154 static V8Extensions& registeredExtensions(); |
| 155 | 155 |
| 156 v8::Isolate* isolate() const { return m_windowProxyManager->isolate(); } | 156 v8::Isolate* isolate() const { return m_windowProxyManager->isolate(); } |
| 157 | 157 |
| 158 WindowProxyManager* windowProxyManager() const { return m_windowProxyManager
.get(); } | 158 WindowProxyManager* getWindowProxyManager() const { return m_windowProxyMana
ger.get(); } |
| 159 | 159 |
| 160 private: | 160 private: |
| 161 explicit ScriptController(LocalFrame*); | 161 explicit ScriptController(LocalFrame*); |
| 162 | 162 |
| 163 LocalFrame* frame() const { return toLocalFrame(m_windowProxyManager->frame(
)); } | 163 LocalFrame* frame() const { return toLocalFrame(m_windowProxyManager->frame(
)); } |
| 164 | 164 |
| 165 typedef WillBeHeapHashMap<RawPtrWillBeMember<Widget>, NPObject*> PluginObjec
tMap; | 165 typedef WillBeHeapHashMap<RawPtrWillBeMember<Widget>, NPObject*> PluginObjec
tMap; |
| 166 | 166 |
| 167 v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&, Acce
ssControlStatus, ExecuteScriptPolicy, double* compilationFinishTime = 0); | 167 v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&, Acce
ssControlStatus, ExecuteScriptPolicy, double* compilationFinishTime = 0); |
| 168 | 168 |
| 169 OwnPtrWillBeMember<WindowProxyManager> m_windowProxyManager; | 169 OwnPtrWillBeMember<WindowProxyManager> m_windowProxyManager; |
| 170 const String* m_sourceURL; | 170 const String* m_sourceURL; |
| 171 | 171 |
| 172 // A mapping between Widgets and their corresponding script object. | 172 // A mapping between Widgets and their corresponding script object. |
| 173 // This list is used so that when the plugin dies, we can immediately | 173 // This list is used so that when the plugin dies, we can immediately |
| 174 // invalidate all sub-objects which are associated with that plugin. | 174 // invalidate all sub-objects which are associated with that plugin. |
| 175 // The frame keeps a NPObject reference for each item on the list. | 175 // The frame keeps a NPObject reference for each item on the list. |
| 176 PluginObjectMap m_pluginObjects; | 176 PluginObjectMap m_pluginObjects; |
| 177 | 177 |
| 178 NPObject* m_windowScriptNPObject; | 178 NPObject* m_windowScriptNPObject; |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace blink | 181 } // namespace blink |
| 182 | 182 |
| 183 #endif // ScriptController_h | 183 #endif // ScriptController_h |
| OLD | NEW |