OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "headless/public/headless_browser.h" | 5 #include "headless/public/headless_browser.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "content/public/common/user_agent.h" | 9 #include "content/public/common/user_agent.h" |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 Builder& Builder::SetDisableSandbox(bool disable_sandbox) { | 75 Builder& Builder::SetDisableSandbox(bool disable_sandbox) { |
76 options_.disable_sandbox = disable_sandbox; | 76 options_.disable_sandbox = disable_sandbox; |
77 return *this; | 77 return *this; |
78 } | 78 } |
79 | 79 |
80 Builder& Builder::SetGLImplementation(const std::string& gl_implementation) { | 80 Builder& Builder::SetGLImplementation(const std::string& gl_implementation) { |
81 options_.gl_implementation = gl_implementation; | 81 options_.gl_implementation = gl_implementation; |
82 return *this; | 82 return *this; |
83 } | 83 } |
84 | 84 |
| 85 Builder& Builder::AddMojoServiceName(const std::string& mojo_service_name) { |
| 86 options_.mojo_service_names.insert(mojo_service_name); |
| 87 return *this; |
| 88 } |
| 89 |
85 Builder& Builder::SetUserDataDir(const base::FilePath& user_data_dir) { | 90 Builder& Builder::SetUserDataDir(const base::FilePath& user_data_dir) { |
86 options_.user_data_dir = user_data_dir; | 91 options_.user_data_dir = user_data_dir; |
87 return *this; | 92 return *this; |
88 } | 93 } |
89 | 94 |
90 Builder& Builder::SetWindowSize(const gfx::Size& window_size) { | 95 Builder& Builder::SetWindowSize(const gfx::Size& window_size) { |
91 options_.window_size = window_size; | 96 options_.window_size = window_size; |
92 return *this; | 97 return *this; |
93 } | 98 } |
94 | 99 |
95 Builder& Builder::SetIncognitoMode(bool incognito_mode) { | 100 Builder& Builder::SetIncognitoMode(bool incognito_mode) { |
96 options_.incognito_mode = incognito_mode; | 101 options_.incognito_mode = incognito_mode; |
97 return *this; | 102 return *this; |
98 } | 103 } |
99 | 104 |
100 Options Builder::Build() { | 105 Options Builder::Build() { |
101 return std::move(options_); | 106 return std::move(options_); |
102 } | 107 } |
103 | 108 |
104 } // namespace headless | 109 } // namespace headless |
OLD | NEW |