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

Unified Diff: headless/public/headless_web_contents.h

Issue 2873283002: [Reland] Allow headless TabSocket in isolated worlds & remove obsolete logic (Closed)
Patch Set: More tests Created 3 years, 7 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
Index: headless/public/headless_web_contents.h
diff --git a/headless/public/headless_web_contents.h b/headless/public/headless_web_contents.h
index 166c197945d4abd41137a4e0feff8efda6e6f103..4df2c32de93e5883a8a1c01d56df5fe4059e30d7 100644
--- a/headless/public/headless_web_contents.h
+++ b/headless/public/headless_web_contents.h
@@ -113,8 +113,10 @@ class HEADLESS_EXPORT HeadlessWebContents::Builder {
Builder& SetWindowSize(const gfx::Size& size);
// Whether or not a headless tab socket should be created, to allow JS -> C++
- // embedder communications.
- Builder& CreateTabSocket(bool create_tab_socket);
+ // embedder communications. If |in_isolated_worlds| is true the bindings will
+ // will be available only in isolated worlds, otherwise they will be available
+ // only in the main world.
+ Builder& CreateTabSocket(bool create_tab_socket, bool in_isolated_worlds);
Sami 2017/05/12 17:18:02 Maybe it would be good to be explicit at this leve
alex clarke (OOO till 29th) 2017/05/15 09:50:57 Done.
// The returned object is owned by HeadlessBrowser. Call
// HeadlessWebContents::Close() to dispose it.
@@ -155,6 +157,7 @@ class HEADLESS_EXPORT HeadlessWebContents::Builder {
gfx::Size window_size_;
std::list<MojoService> mojo_services_;
bool create_tab_socket_ = false;
+ bool create_tab_socket_in_isolated_worlds_ = false;
DISALLOW_COPY_AND_ASSIGN(Builder);
};

Powered by Google App Engine
This is Rietveld 408576698