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

Unified Diff: headless/public/headless_browser.h

Issue 2626823003: [headless] Add default browser context to HeadlessBrowser. (Closed)
Patch Set: Created 3 years, 11 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_browser.h
diff --git a/headless/public/headless_browser.h b/headless/public/headless_browser.h
index 021e91064fbc4e099945b7cc782d1b430afc5a7a..2965c9a378ad608f8a3422c2092a4bac6c580fee 100644
--- a/headless/public/headless_browser.h
+++ b/headless/public/headless_browser.h
@@ -56,6 +56,12 @@ class HEADLESS_EXPORT HeadlessBrowser {
virtual HeadlessBrowserContext* GetBrowserContextForId(
const std::string& id) = 0;
+ // Allows setting and getting the browser context that DevTools will create
+ // new targets in by default.
+ virtual void SetDefaultBrowserContext(
+ HeadlessBrowserContext* browser_context);
+ virtual HeadlessBrowserContext* GetDefaultBrowserContext();
+
// Returns a task runner for submitting work to the browser file thread.
virtual scoped_refptr<base::SingleThreadTaskRunner> BrowserFileThread()
const = 0;

Powered by Google App Engine
This is Rietveld 408576698