| 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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include <memory> | 34 #include <memory> |
| 35 #include "WebIconURL.h" | 35 #include "WebIconURL.h" |
| 36 #include "WebNode.h" | 36 #include "WebNode.h" |
| 37 #include "public/platform/WebCanvas.h" | 37 #include "public/platform/WebCanvas.h" |
| 38 #include "public/platform/WebCommon.h" | 38 #include "public/platform/WebCommon.h" |
| 39 #include "public/platform/WebFeaturePolicy.h" | 39 #include "public/platform/WebFeaturePolicy.h" |
| 40 #include "public/platform/WebInsecureRequestPolicy.h" | 40 #include "public/platform/WebInsecureRequestPolicy.h" |
| 41 #include "public/web/WebFrameLoadType.h" | 41 #include "public/web/WebFrameLoadType.h" |
| 42 #include "public/web/WebTreeScopeType.h" | 42 #include "public/web/WebTreeScopeType.h" |
| 43 | 43 #include "v8/include/v8.h" |
| 44 namespace v8 { | |
| 45 class Context; | |
| 46 class Function; | |
| 47 class Value; | |
| 48 template <class T> | |
| 49 class Local; | |
| 50 } | |
| 51 | 44 |
| 52 namespace blink { | 45 namespace blink { |
| 53 | 46 |
| 54 class Frame; | 47 class Frame; |
| 55 class OpenedFrameTracker; | 48 class OpenedFrameTracker; |
| 56 class Page; | 49 class Page; |
| 57 class Visitor; | 50 class Visitor; |
| 58 class WebAssociatedURLLoader; | 51 class WebAssociatedURLLoader; |
| 59 struct WebAssociatedURLLoaderOptions; | 52 struct WebAssociatedURLLoaderOptions; |
| 60 class WebDocument; | 53 class WebDocument; |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 205 |
| 213 virtual WebPerformance Performance() const = 0; | 206 virtual WebPerformance Performance() const = 0; |
| 214 | 207 |
| 215 // Closing ------------------------------------------------------------- | 208 // Closing ------------------------------------------------------------- |
| 216 | 209 |
| 217 // Runs unload handlers for this frame. | 210 // Runs unload handlers for this frame. |
| 218 virtual void DispatchUnloadEvent() = 0; | 211 virtual void DispatchUnloadEvent() = 0; |
| 219 | 212 |
| 220 // Scripting ---------------------------------------------------------- | 213 // Scripting ---------------------------------------------------------- |
| 221 | 214 |
| 215 // Returns the global proxy object. |
| 216 virtual v8::Local<v8::Object> GlobalProxy() const = 0; |
| 217 |
| 222 // Executes JavaScript in a new world associated with the web frame. | 218 // Executes JavaScript in a new world associated with the web frame. |
| 223 // The script gets its own global scope and its own prototypes for | 219 // The script gets its own global scope and its own prototypes for |
| 224 // intrinsic JavaScript objects (String, Array, and so-on). It also | 220 // intrinsic JavaScript objects (String, Array, and so-on). It also |
| 225 // gets its own wrappers for all DOM nodes and DOM constructors. | 221 // gets its own wrappers for all DOM nodes and DOM constructors. |
| 226 // | 222 // |
| 227 // worldID must be > 0 (as 0 represents the main world). | 223 // worldID must be > 0 (as 0 represents the main world). |
| 228 // worldID must be < EmbedderWorldIdLimit, high number used internally. | 224 // worldID must be < EmbedderWorldIdLimit, high number used internally. |
| 229 virtual void ExecuteScriptInIsolatedWorld(int world_id, | 225 virtual void ExecuteScriptInIsolatedWorld(int world_id, |
| 230 const WebScriptSource* sources, | 226 const WebScriptSource* sources, |
| 231 unsigned num_sources) = 0; | 227 unsigned num_sources) = 0; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 WebVector<v8::Local<v8::Value>>* results) = 0; | 261 WebVector<v8::Local<v8::Value>>* results) = 0; |
| 266 | 262 |
| 267 // Call the function with the given receiver and arguments, bypassing | 263 // Call the function with the given receiver and arguments, bypassing |
| 268 // canExecute(). | 264 // canExecute(). |
| 269 virtual v8::Local<v8::Value> CallFunctionEvenIfScriptDisabled( | 265 virtual v8::Local<v8::Value> CallFunctionEvenIfScriptDisabled( |
| 270 v8::Local<v8::Function>, | 266 v8::Local<v8::Function>, |
| 271 v8::Local<v8::Value>, | 267 v8::Local<v8::Value>, |
| 272 int argc, | 268 int argc, |
| 273 v8::Local<v8::Value> argv[]) = 0; | 269 v8::Local<v8::Value> argv[]) = 0; |
| 274 | 270 |
| 275 // Returns the V8 context for associated with the main world and this | |
| 276 // frame. There can be many V8 contexts associated with this frame, one for | |
| 277 // each isolated world and one for the main world. If you don't know what | |
| 278 // the "main world" or an "isolated world" is, then you probably shouldn't | |
| 279 // be calling this API. | |
| 280 virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0; | |
| 281 | |
| 282 // Returns true if the WebFrame currently executing JavaScript has access | 271 // Returns true if the WebFrame currently executing JavaScript has access |
| 283 // to the given WebFrame, or false otherwise. | 272 // to the given WebFrame, or false otherwise. |
| 284 static bool ScriptCanAccess(WebFrame*); | 273 static bool ScriptCanAccess(WebFrame*); |
| 285 | 274 |
| 286 // Navigation ---------------------------------------------------------- | 275 // Navigation ---------------------------------------------------------- |
| 287 // TODO(clamy): Remove the reload, reloadWithOverrideURL, and loadRequest | 276 // TODO(clamy): Remove the reload, reloadWithOverrideURL, and loadRequest |
| 288 // functions once RenderFrame only calls WebLoadFrame::load. | 277 // functions once RenderFrame only calls WebLoadFrame::load. |
| 289 | 278 |
| 290 // Reload the current document. | 279 // Reload the current document. |
| 291 // Note: reload() and reloadWithOverrideURL() will be deprecated. | 280 // Note: reload() and reloadWithOverrideURL() will be deprecated. |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 WebFrame* first_child_; | 415 WebFrame* first_child_; |
| 427 WebFrame* last_child_; | 416 WebFrame* last_child_; |
| 428 | 417 |
| 429 WebFrame* opener_; | 418 WebFrame* opener_; |
| 430 std::unique_ptr<OpenedFrameTracker> opened_frame_tracker_; | 419 std::unique_ptr<OpenedFrameTracker> opened_frame_tracker_; |
| 431 }; | 420 }; |
| 432 | 421 |
| 433 } // namespace blink | 422 } // namespace blink |
| 434 | 423 |
| 435 #endif | 424 #endif |
| OLD | NEW |