| 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 21 matching lines...) Expand all Loading... |
| 32 #define WebFrame_h | 32 #define WebFrame_h |
| 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/WebFeaturePolicy.h" | 38 #include "public/platform/WebFeaturePolicy.h" |
| 39 #include "public/platform/WebInsecureRequestPolicy.h" | 39 #include "public/platform/WebInsecureRequestPolicy.h" |
| 40 #include "public/web/WebFrameLoadType.h" | 40 #include "public/web/WebFrameLoadType.h" |
| 41 #include "public/web/WebTreeScopeType.h" | 41 #include "public/web/WebTreeScopeType.h" |
| 42 | 42 #include "v8/include/v8.h" |
| 43 namespace v8 { | |
| 44 class Context; | |
| 45 class Function; | |
| 46 class Value; | |
| 47 template <class T> | |
| 48 class Local; | |
| 49 } | |
| 50 | 43 |
| 51 namespace blink { | 44 namespace blink { |
| 52 | 45 |
| 53 class Frame; | 46 class Frame; |
| 54 class OpenedFrameTracker; | 47 class OpenedFrameTracker; |
| 55 class Page; | 48 class Page; |
| 56 class Visitor; | 49 class Visitor; |
| 57 class WebAssociatedURLLoader; | 50 class WebAssociatedURLLoader; |
| 58 struct WebAssociatedURLLoaderOptions; | 51 struct WebAssociatedURLLoaderOptions; |
| 59 class WebDOMEvent; | 52 class WebDOMEvent; |
| (...skipping 152 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 BLINK_EXPORT static bool ScriptCanAccess(WebFrame*); | 273 BLINK_EXPORT 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 WebFrame* first_child_; | 422 WebFrame* first_child_; |
| 434 WebFrame* last_child_; | 423 WebFrame* last_child_; |
| 435 | 424 |
| 436 WebFrame* opener_; | 425 WebFrame* opener_; |
| 437 std::unique_ptr<OpenedFrameTracker> opened_frame_tracker_; | 426 std::unique_ptr<OpenedFrameTracker> opened_frame_tracker_; |
| 438 }; | 427 }; |
| 439 | 428 |
| 440 } // namespace blink | 429 } // namespace blink |
| 441 | 430 |
| 442 #endif | 431 #endif |
| OLD | NEW |