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

Unified Diff: headless/public/headless_browser.cc

Issue 2181413002: [headless] Remove default browser context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 4 years, 4 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.cc
diff --git a/headless/public/headless_browser.cc b/headless/public/headless_browser.cc
index 994df72d2ae7a5f19af072371e532dd930ddb1f2..3a9e2f23bc9d5b557416b570c1f49f64a43e14cc 100644
--- a/headless/public/headless_browser.cc
+++ b/headless/public/headless_browser.cc
@@ -2,9 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/public/common/user_agent.h"
#include "headless/public/headless_browser.h"
+#include <utility>
+
+#include "content/public/common/user_agent.h"
+
using Options = headless::HeadlessBrowser::Options;
using Builder = headless::HeadlessBrowser::Options::Builder;
@@ -19,11 +22,11 @@ constexpr gfx::Size kDefaultWindowSize(800, 600);
Options::Options(int argc, const char** argv)
: argc(argc),
argv(argv),
- user_agent(content::BuildUserAgentFromProduct(kProductName)),
message_pump(nullptr),
single_process_mode(false),
disable_sandbox(false),
gl_implementation("osmesa"),
+ user_agent(content::BuildUserAgentFromProduct(kProductName)),
window_size(kDefaultWindowSize) {}
Options::Options(Options&& options) = default;
@@ -73,13 +76,13 @@ Builder& Builder::SetDisableSandbox(bool disable_sandbox) {
return *this;
}
-Builder& Builder::SetProtocolHandlers(ProtocolHandlerMap protocol_handlers) {
- options_.protocol_handlers = std::move(protocol_handlers);
+Builder& Builder::SetGLImplementation(const std::string& gl_implementation) {
+ options_.gl_implementation = gl_implementation;
return *this;
}
-Builder& Builder::SetGLImplementation(const std::string& gl_implementation) {
- options_.gl_implementation = gl_implementation;
+Builder& Builder::SetUserDataDir(const base::FilePath& user_data_dir) {
+ options_.user_data_dir = user_data_dir;
return *this;
}

Powered by Google App Engine
This is Rietveld 408576698