OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 // Executes script in the context of the current page. | 230 // Executes script in the context of the current page. |
231 virtual void executeScript(const WebScriptSource&) = 0; | 231 virtual void executeScript(const WebScriptSource&) = 0; |
232 | 232 |
233 // Executes JavaScript in a new world associated with the web frame. | 233 // Executes JavaScript in a new world associated with the web frame. |
234 // The script gets its own global scope and its own prototypes for | 234 // The script gets its own global scope and its own prototypes for |
235 // intrinsic JavaScript objects (String, Array, and so-on). It also | 235 // intrinsic JavaScript objects (String, Array, and so-on). It also |
236 // gets its own wrappers for all DOM nodes and DOM constructors. | 236 // gets its own wrappers for all DOM nodes and DOM constructors. |
237 // extensionGroup is an embedder-provided specifier that controls which | 237 // extensionGroup is an embedder-provided specifier that controls which |
238 // v8 extensions are loaded into the new context - see | 238 // v8 extensions are loaded into the new context - see |
239 // WebKit::registerExtension for the corresponding specifier. | 239 // WebKit::registerExtension for the corresponding specifier. |
| 240 // |
| 241 // worldID must be > 0 (as 0 represents the main world). |
240 virtual void executeScriptInIsolatedWorld( | 242 virtual void executeScriptInIsolatedWorld( |
241 int worldID, const WebScriptSource* sources, unsigned numSources, | 243 int worldID, const WebScriptSource* sources, unsigned numSources, |
242 int extensionGroup) = 0; | 244 int extensionGroup) = 0; |
243 | 245 |
244 // Associates an isolated world (see above for description) with a security | 246 // Associates an isolated world (see above for description) with a security |
245 // origin. XMLHttpRequest instances used in that world will be considered | 247 // origin. XMLHttpRequest instances used in that world will be considered |
246 // to come from that origin, not the frame's. | 248 // to come from that origin, not the frame's. |
247 virtual void setIsolatedWorldSecurityOrigin( | 249 virtual void setIsolatedWorldSecurityOrigin( |
248 int worldID, const WebSecurityOrigin&) = 0; | 250 int worldID, const WebSecurityOrigin&) = 0; |
249 | 251 |
(...skipping 15 matching lines...) Expand all Loading... |
265 | 267 |
266 // Check if the scripting URL represents a mixed content condition relative | 268 // Check if the scripting URL represents a mixed content condition relative |
267 // to this frame. | 269 // to this frame. |
268 virtual bool checkIfRunInsecureContent(const WebURL&) const = 0; | 270 virtual bool checkIfRunInsecureContent(const WebURL&) const = 0; |
269 | 271 |
270 // Executes script in the context of the current page and returns the value | 272 // Executes script in the context of the current page and returns the value |
271 // that the script evaluated to. | 273 // that the script evaluated to. |
272 virtual v8::Handle<v8::Value> executeScriptAndReturnValue( | 274 virtual v8::Handle<v8::Value> executeScriptAndReturnValue( |
273 const WebScriptSource&) = 0; | 275 const WebScriptSource&) = 0; |
274 | 276 |
| 277 // worldID must be > 0 (as 0 represents the main world). |
275 virtual void executeScriptInIsolatedWorld( | 278 virtual void executeScriptInIsolatedWorld( |
276 int worldID, const WebScriptSource* sourcesIn, unsigned numSources, | 279 int worldID, const WebScriptSource* sourcesIn, unsigned numSources, |
277 int extensionGroup, WebVector<v8::Local<v8::Value> >* results) = 0; | 280 int extensionGroup, WebVector<v8::Local<v8::Value> >* results) = 0; |
278 | 281 |
279 // Call the function with the given receiver and arguments, bypassing | 282 // Call the function with the given receiver and arguments, bypassing |
280 // canExecute(). | 283 // canExecute(). |
281 virtual v8::Handle<v8::Value> callFunctionEvenIfScriptDisabled( | 284 virtual v8::Handle<v8::Value> callFunctionEvenIfScriptDisabled( |
282 v8::Handle<v8::Function>, | 285 v8::Handle<v8::Function>, |
283 v8::Handle<v8::Object>, | 286 v8::Handle<v8::Object>, |
284 int argc, | 287 int argc, |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 // text form. This is used only by layout tests. | 653 // text form. This is used only by layout tests. |
651 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; | 654 virtual WebString layerTreeAsText(bool showDebugInfo = false) const = 0; |
652 | 655 |
653 protected: | 656 protected: |
654 ~WebFrame() { } | 657 ~WebFrame() { } |
655 }; | 658 }; |
656 | 659 |
657 } // namespace WebKit | 660 } // namespace WebKit |
658 | 661 |
659 #endif | 662 #endif |
OLD | NEW |