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 #ifndef HEADLESS_PUBLIC_HEADLESS_BROWSER_H_ | 5 #ifndef HEADLESS_PUBLIC_HEADLESS_BROWSER_H_ |
6 #define HEADLESS_PUBLIC_HEADLESS_BROWSER_H_ | 6 #define HEADLESS_PUBLIC_HEADLESS_BROWSER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <unordered_map> | 10 #include <unordered_map> |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 std::string user_agent; | 157 std::string user_agent; |
158 | 158 |
159 // Address of the HTTP/HTTPS proxy server to use. The system proxy settings | 159 // Address of the HTTP/HTTPS proxy server to use. The system proxy settings |
160 // are used by default. | 160 // are used by default. |
161 net::HostPortPair proxy_server; | 161 net::HostPortPair proxy_server; |
162 | 162 |
163 // Comma-separated list of rules that control how hostnames are mapped. See | 163 // Comma-separated list of rules that control how hostnames are mapped. See |
164 // chrome::switches::kHostRules for a description for the format. | 164 // chrome::switches::kHostRules for a description for the format. |
165 std::string host_resolver_rules; | 165 std::string host_resolver_rules; |
166 | 166 |
167 // Default window size. This is also used to create the window tree host and | 167 // Default window size. This is also used to create the window tree host. |
168 // as initial screen size. Defaults to 800x600. | 168 // Defaults to 800x600. |
169 gfx::Size window_size; | 169 gfx::Size window_size; |
170 | 170 |
171 // Screen size. This is used to initialize screen size for web_contents and | |
172 // support window management devtools commands. Defaults to 1,920x1,080. | |
Sami
2017/05/22 16:30:57
This isn't reflected to JavaScript (i.e., screen.w
| |
173 gfx::Size screen_size; | |
174 | |
171 // Path to user data directory, where browser will look for its state. | 175 // Path to user data directory, where browser will look for its state. |
172 // If empty, default directory (where the binary is located) will be used. | 176 // If empty, default directory (where the binary is located) will be used. |
173 base::FilePath user_data_dir; | 177 base::FilePath user_data_dir; |
174 | 178 |
175 // Run a browser context in an incognito mode. Enabled by default. | 179 // Run a browser context in an incognito mode. Enabled by default. |
176 bool incognito_mode; | 180 bool incognito_mode; |
177 | 181 |
178 // Set a callback that is invoked to override WebPreferences for RenderViews | 182 // Set a callback that is invoked to override WebPreferences for RenderViews |
179 // created within the HeadlessBrowser. Called whenever the WebPreferences of a | 183 // created within the HeadlessBrowser. Called whenever the WebPreferences of a |
180 // RenderView change. Executed on the browser main thread. | 184 // RenderView change. Executed on the browser main thread. |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
278 // the main loop, it will only return after HeadlessBrowser::Shutdown() is | 282 // the main loop, it will only return after HeadlessBrowser::Shutdown() is |
279 // called, returning the exit code for the process. It is not possible to | 283 // called, returning the exit code for the process. It is not possible to |
280 // initialize the browser again after it has been torn down. | 284 // initialize the browser again after it has been torn down. |
281 HEADLESS_EXPORT int HeadlessBrowserMain( | 285 HEADLESS_EXPORT int HeadlessBrowserMain( |
282 HeadlessBrowser::Options options, | 286 HeadlessBrowser::Options options, |
283 const base::Callback<void(HeadlessBrowser*)>& on_browser_start_callback); | 287 const base::Callback<void(HeadlessBrowser*)>& on_browser_start_callback); |
284 | 288 |
285 } // namespace headless | 289 } // namespace headless |
286 | 290 |
287 #endif // HEADLESS_PUBLIC_HEADLESS_BROWSER_H_ | 291 #endif // HEADLESS_PUBLIC_HEADLESS_BROWSER_H_ |
OLD | NEW |