Chromium Code Reviews| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 bool executeIfJavaScriptURL(const KURL&, ShouldReplaceDocumentIfJavaScriptUR L shouldReplaceDocumentIfJavaScriptURL = ReplaceDocumentIfJavaScriptURL); | 89 bool executeIfJavaScriptURL(const KURL&, ShouldReplaceDocumentIfJavaScriptUR L shouldReplaceDocumentIfJavaScriptURL = ReplaceDocumentIfJavaScriptURL); |
| 90 | 90 |
| 91 // This function must be called from the main thread. It is safe to call it repeatedly. | 91 // This function must be called from the main thread. It is safe to call it repeatedly. |
| 92 static void initializeThreading(); | 92 static void initializeThreading(); |
| 93 | 93 |
| 94 v8::Local<v8::Value> compileAndRunScript(const ScriptSourceCode&); | 94 v8::Local<v8::Value> compileAndRunScript(const ScriptSourceCode&); |
| 95 | 95 |
| 96 // Evaluate JavaScript in the main world. | 96 // Evaluate JavaScript in the main world. |
| 97 // The caller must hold an execution context. | 97 // The caller must hold an execution context. |
| 98 ScriptValue evaluate(const ScriptSourceCode&); | 98 ScriptValue evaluate(const ScriptSourceCode&); |
| 99 // Evaluate Web-origin JavaScript in the main world. (Not for system uses) | |
|
pfeldman
2013/05/29 15:03:52
Insert blank line above the comment. I think this
| |
| 100 ScriptValue evaluateFromWebPage(const ScriptSourceCode&); | |
| 99 | 101 |
| 100 // Executes JavaScript in an isolated world. The script gets its own global scope, | 102 // Executes JavaScript in an isolated world. The script gets its own global scope, |
| 101 // its own prototypes for intrinsic JavaScript objects (String, Array, and s o-on), | 103 // its own prototypes for intrinsic JavaScript objects (String, Array, and s o-on), |
| 102 // and its own wrappers for all DOM nodes and DOM constructors. | 104 // and its own wrappers for all DOM nodes and DOM constructors. |
| 103 // | 105 // |
| 104 // If an isolated world with the specified ID already exists, it is reused. | 106 // If an isolated world with the specified ID already exists, it is reused. |
| 105 // Otherwise, a new world is created. | 107 // Otherwise, a new world is created. |
| 106 // | 108 // |
| 107 // FIXME: Get rid of extensionGroup here. | 109 // FIXME: Get rid of extensionGroup here. |
| 108 void evaluateInIsolatedWorld(int worldID, const Vector<ScriptSourceCode>& so urces, int extensionGroup, Vector<ScriptValue>* results); | 110 void evaluateInIsolatedWorld(int worldID, const Vector<ScriptSourceCode>& so urces, int extensionGroup, Vector<ScriptValue>* results); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 194 // to calls on the destroyed window object, we return a proxy NPObject | 196 // to calls on the destroyed window object, we return a proxy NPObject |
| 195 // which wraps the underlying window object. The wrapped window object | 197 // which wraps the underlying window object. The wrapped window object |
| 196 // pointer in this object is cleared out when the window object is | 198 // pointer in this object is cleared out when the window object is |
| 197 // destroyed. | 199 // destroyed. |
| 198 NPObject* m_wrappedWindowScriptNPObject; | 200 NPObject* m_wrappedWindowScriptNPObject; |
| 199 }; | 201 }; |
| 200 | 202 |
| 201 } // namespace WebCore | 203 } // namespace WebCore |
| 202 | 204 |
| 203 #endif // ScriptController_h | 205 #endif // ScriptController_h |
| OLD | NEW |