Index: third_party/WebKit/public/web/WebLocalFrame.h |
diff --git a/third_party/WebKit/public/web/WebLocalFrame.h b/third_party/WebKit/public/web/WebLocalFrame.h |
index 0e7ac509b37c9af1e6e7ed4a096fc5fb367d95a6..1a526cfd0997c66e0ebd05784d171e5d4943ff5f 100644 |
--- a/third_party/WebKit/public/web/WebLocalFrame.h |
+++ b/third_party/WebKit/public/web/WebLocalFrame.h |
@@ -19,6 +19,14 @@ namespace base { |
class SingleThreadTaskRunner; |
} |
+namespace v8 { |
+class Context; |
+class Function; |
dcheng
2017/06/06 19:57:17
I think we only need v8::Local and Context for now
Łukasz Anforowicz
2017/06/07 20:35:07
Done (here and also in WebFrame.h which would othe
|
+class Value; |
+template <class T> |
+class Local; |
+} |
+ |
namespace blink { |
class InterfaceProvider; |
@@ -270,6 +278,13 @@ class WebLocalFrame : public WebFrame { |
// Executes script in the context of the current page. |
virtual void ExecuteScript(const WebScriptSource&) = 0; |
+ // Returns the V8 context for associated with the main world and this |
+ // frame. There can be many V8 contexts associated with this frame, one for |
+ // each isolated world and one for the main world. If you don't know what |
+ // the "main world" or an "isolated world" is, then you probably shouldn't |
+ // be calling this API. |
+ virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0; |
+ |
// Executes script in the context of the current page and returns the value |
// that the script evaluated to with callback. Script execution can be |
// suspend. |