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

Unified Diff: headless/public/headless_browser.h

Issue 2642143002: [headless] Make --hide-scrollbars affect all BrowserContexts. (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
« no previous file with comments | « headless/lib/browser/headless_browser_context_options.cc ('k') | headless/public/headless_browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/public/headless_browser.h
diff --git a/headless/public/headless_browser.h b/headless/public/headless_browser.h
index c3043f006ad40216b6313cac3bfbd416898492e1..a1ebc5a67c772b7aa0c8898eda5ef8eeef0684d1 100644
--- a/headless/public/headless_browser.h
+++ b/headless/public/headless_browser.h
@@ -149,6 +149,14 @@ struct HeadlessBrowser::Options {
// Run a browser context in an incognito mode. Enabled by default.
bool incognito_mode;
+ // Set a callback that is invoked to override WebPreferences for RenderViews
+ // created within the HeadlessBrowser. Called whenever the WebPreferences of a
+ // RenderView change. Executed on the browser main thread.
+ //
+ // WARNING: We cannot provide any guarantees about the stability of the
+ // exposed WebPreferences API, so use with care.
+ base::Callback<void(WebPreferences*)> override_web_preferences_callback;
+
// Reminder: when adding a new field here, do not forget to add it to
// HeadlessBrowserContextOptions (where appropriate).
private:
@@ -180,6 +188,8 @@ class HeadlessBrowser::Options::Builder {
Builder& SetWindowSize(const gfx::Size& window_size);
Builder& SetUserDataDir(const base::FilePath& user_data_dir);
Builder& SetIncognitoMode(bool incognito_mode);
+ Builder& SetOverrideWebPreferencesCallback(
+ base::Callback<void(WebPreferences*)> callback);
Options Build();
« no previous file with comments | « headless/lib/browser/headless_browser_context_options.cc ('k') | headless/public/headless_browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698