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

Unified Diff: headless/lib/browser/headless_browser_context_options.h

Issue 2374063002: Headless: expose WebPreferences to embedder, add --hide-scrollbars. (Closed)
Patch Set: Address comments, add test. Created 4 years, 3 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/lib/browser/headless_browser_context_options.h
diff --git a/headless/lib/browser/headless_browser_context_options.h b/headless/lib/browser/headless_browser_context_options.h
index af9b8939c6e4c754c4daf2c35cbb42de0e0ee0fb..4c6601757f4d25c6fa90cf2fc29b9419d58a935c 100644
--- a/headless/lib/browser/headless_browser_context_options.h
+++ b/headless/lib/browser/headless_browser_context_options.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/optional.h"
#include "headless/public/headless_browser.h"
@@ -47,6 +48,11 @@ class HeadlessBrowserContextOptions {
// Since ProtocolHandlerMap is move-only, this method takes ownership of them.
ProtocolHandlerMap TakeProtocolHandlers();
+ // Callback that is invoked to override WebPreferences for RenderViews
+ // created within this HeadlessBrowserContext.
+ const base::Callback<void(WebPreferences*)>&
+ override_web_preferences_callback() const;
+
private:
friend class HeadlessBrowserContext::Builder;
@@ -62,6 +68,7 @@ class HeadlessBrowserContextOptions {
base::Optional<bool> incognito_mode_;
ProtocolHandlerMap protocol_handlers_;
+ base::Callback<void(WebPreferences*)> override_web_preferences_callback_;
DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserContextOptions);
};
« no previous file with comments | « headless/lib/browser/headless_browser_context_impl.cc ('k') | headless/lib/browser/headless_browser_context_options.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698