| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 bool initializeMainWorld(); | 65 bool initializeMainWorld(); |
| 66 WindowProxy* windowProxy(DOMWrapperWorld&); | 66 WindowProxy* windowProxy(DOMWrapperWorld&); |
| 67 WindowProxy* existingWindowProxy(DOMWrapperWorld&); | 67 WindowProxy* existingWindowProxy(DOMWrapperWorld&); |
| 68 | 68 |
| 69 // Evaluate JavaScript in the main world. | 69 // Evaluate JavaScript in the main world. |
| 70 void executeScriptInMainWorld(const String&); | 70 void executeScriptInMainWorld(const String&); |
| 71 void executeScriptInMainWorld(const ScriptSourceCode&); | 71 void executeScriptInMainWorld(const ScriptSourceCode&); |
| 72 v8::Local<v8::Value> executeScriptInMainWorldAndReturnValue(const ScriptSour
ceCode&); | 72 v8::Local<v8::Value> executeScriptInMainWorldAndReturnValue(const ScriptSour
ceCode&); |
| 73 v8::Local<v8::Value> executeScriptAndReturnValue(v8::Handle<v8::Context>, co
nst ScriptSourceCode&); | 73 v8::Local<v8::Value> executeScriptAndReturnValue(v8::Handle<v8::Context>, co
nst ScriptSourceCode&); |
| 74 | 74 |
| 75 void executeModuleScript(Document& document, const String& source); | 75 void executeModuleScript(Document& document, const String& source, const Tex
tPosition& textPosition); |
| 76 | 76 |
| 77 // Executes JavaScript in an isolated world. The script gets its own global
scope, | 77 // Executes JavaScript in an isolated world. The script gets its own global
scope, |
| 78 // its own prototypes for intrinsic JavaScript objects (String, Array, and s
o-on), | 78 // its own prototypes for intrinsic JavaScript objects (String, Array, and s
o-on), |
| 79 // and its own wrappers for all DOM nodes and DOM constructors. | 79 // and its own wrappers for all DOM nodes and DOM constructors. |
| 80 // | 80 // |
| 81 // If an isolated world with the specified ID already exists, it is reused. | 81 // If an isolated world with the specified ID already exists, it is reused. |
| 82 // Otherwise, a new world is created. | 82 // Otherwise, a new world is created. |
| 83 // | 83 // |
| 84 // FIXME: Get rid of extensionGroup here. | 84 // FIXME: Get rid of extensionGroup here. |
| 85 void executeScriptInIsolatedWorld(int worldID, const Vector<ScriptSourceCode
>& sources, int extensionGroup, Vector<v8::Local<v8::Value> >* results); | 85 void executeScriptInIsolatedWorld(int worldID, const Vector<ScriptSourceCode
>& sources, int extensionGroup, Vector<v8::Local<v8::Value> >* results); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 const String* m_sourceURL; | 117 const String* m_sourceURL; |
| 118 v8::Isolate* m_isolate; | 118 v8::Isolate* m_isolate; |
| 119 | 119 |
| 120 OwnPtr<WindowProxy> m_windowProxy; | 120 OwnPtr<WindowProxy> m_windowProxy; |
| 121 IsolatedWorldMap m_isolatedWorlds; | 121 IsolatedWorldMap m_isolatedWorlds; |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 } // namespace blink | 124 } // namespace blink |
| 125 | 125 |
| 126 #endif // ScriptController_h | 126 #endif // ScriptController_h |
| OLD | NEW |