Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: third_party/WebKit/public/web/WebLocalFrame.h

Issue 2923053002: Move MainWorldScriptContext accessor/method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/public/web/WebFrame.h ('k') | third_party/WebKit/public/web/WebRemoteFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0196d82487f205c9580d8ad3168e860e68d6bc5d..8c1ae2d170ea757bd1f5d4ee4e16bf5643cd89d8 100644
--- a/third_party/WebKit/public/web/WebLocalFrame.h
+++ b/third_party/WebKit/public/web/WebLocalFrame.h
@@ -14,6 +14,7 @@
#include "public/platform/WebURLError.h"
#include "public/platform/WebURLRequest.h"
#include "public/platform/site_engagement.mojom-shared.h"
+#include "v8/include/v8.h"
namespace base {
class SingleThreadTaskRunner;
@@ -296,6 +297,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.
« no previous file with comments | « third_party/WebKit/public/web/WebFrame.h ('k') | third_party/WebKit/public/web/WebRemoteFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698