| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // implementantion is selected by default. Setting this to an empty | 121 // implementantion is selected by default. Setting this to an empty |
| 122 // string can be used to disable GL rendering (e.g., WebGL support). | 122 // string can be used to disable GL rendering (e.g., WebGL support). |
| 123 std::string gl_implementation; | 123 std::string gl_implementation; |
| 124 | 124 |
| 125 // Names of mojo services exposed by the browser to the renderer. These | 125 // Names of mojo services exposed by the browser to the renderer. These |
| 126 // services will be added to the browser's service manifest. | 126 // services will be added to the browser's service manifest. |
| 127 std::unordered_set<std::string> mojo_service_names; | 127 std::unordered_set<std::string> mojo_service_names; |
| 128 | 128 |
| 129 // Default per-context options, can be specialized on per-context basis. | 129 // Default per-context options, can be specialized on per-context basis. |
| 130 | 130 |
| 131 std::string product_name_and_version; |
| 131 std::string user_agent; | 132 std::string user_agent; |
| 132 | 133 |
| 133 // Address of the HTTP/HTTPS proxy server to use. The system proxy settings | 134 // Address of the HTTP/HTTPS proxy server to use. The system proxy settings |
| 134 // are used by default. | 135 // are used by default. |
| 135 net::HostPortPair proxy_server; | 136 net::HostPortPair proxy_server; |
| 136 | 137 |
| 137 // Comma-separated list of rules that control how hostnames are mapped. See | 138 // Comma-separated list of rules that control how hostnames are mapped. See |
| 138 // chrome::switches::kHostRules for a description for the format. | 139 // chrome::switches::kHostRules for a description for the format. |
| 139 std::string host_resolver_rules; | 140 std::string host_resolver_rules; |
| 140 | 141 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 | 182 |
| 182 Builder& EnableDevToolsServer(const net::IPEndPoint& endpoint); | 183 Builder& EnableDevToolsServer(const net::IPEndPoint& endpoint); |
| 183 Builder& SetMessagePump(base::MessagePump* message_pump); | 184 Builder& SetMessagePump(base::MessagePump* message_pump); |
| 184 Builder& SetSingleProcessMode(bool single_process_mode); | 185 Builder& SetSingleProcessMode(bool single_process_mode); |
| 185 Builder& SetDisableSandbox(bool disable_sandbox); | 186 Builder& SetDisableSandbox(bool disable_sandbox); |
| 186 Builder& SetGLImplementation(const std::string& gl_implementation); | 187 Builder& SetGLImplementation(const std::string& gl_implementation); |
| 187 Builder& AddMojoServiceName(const std::string& mojo_service_name); | 188 Builder& AddMojoServiceName(const std::string& mojo_service_name); |
| 188 | 189 |
| 189 // Per-context settings. | 190 // Per-context settings. |
| 190 | 191 |
| 192 Builder& SetProductNameAndVersion( |
| 193 const std::string& product_name_and_version); |
| 191 Builder& SetUserAgent(const std::string& user_agent); | 194 Builder& SetUserAgent(const std::string& user_agent); |
| 192 Builder& SetProxyServer(const net::HostPortPair& proxy_server); | 195 Builder& SetProxyServer(const net::HostPortPair& proxy_server); |
| 193 Builder& SetHostResolverRules(const std::string& host_resolver_rules); | 196 Builder& SetHostResolverRules(const std::string& host_resolver_rules); |
| 194 Builder& SetWindowSize(const gfx::Size& window_size); | 197 Builder& SetWindowSize(const gfx::Size& window_size); |
| 195 Builder& SetUserDataDir(const base::FilePath& user_data_dir); | 198 Builder& SetUserDataDir(const base::FilePath& user_data_dir); |
| 196 Builder& SetIncognitoMode(bool incognito_mode); | 199 Builder& SetIncognitoMode(bool incognito_mode); |
| 197 Builder& SetOverrideWebPreferencesCallback( | 200 Builder& SetOverrideWebPreferencesCallback( |
| 198 base::Callback<void(WebPreferences*)> callback); | 201 base::Callback<void(WebPreferences*)> callback); |
| 199 Builder& SetCrashReporterEnabled(bool enabled); | 202 Builder& SetCrashReporterEnabled(bool enabled); |
| 200 Builder& SetCrashDumpsDir(const base::FilePath& dir); | 203 Builder& SetCrashDumpsDir(const base::FilePath& dir); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // the main loop, it will only return after HeadlessBrowser::Shutdown() is | 237 // the main loop, it will only return after HeadlessBrowser::Shutdown() is |
| 235 // called, returning the exit code for the process. It is not possible to | 238 // called, returning the exit code for the process. It is not possible to |
| 236 // initialize the browser again after it has been torn down. | 239 // initialize the browser again after it has been torn down. |
| 237 int HeadlessBrowserMain( | 240 int HeadlessBrowserMain( |
| 238 HeadlessBrowser::Options options, | 241 HeadlessBrowser::Options options, |
| 239 const base::Callback<void(HeadlessBrowser*)>& on_browser_start_callback); | 242 const base::Callback<void(HeadlessBrowser*)>& on_browser_start_callback); |
| 240 | 243 |
| 241 } // namespace headless | 244 } // namespace headless |
| 242 | 245 |
| 243 #endif // HEADLESS_PUBLIC_HEADLESS_BROWSER_H_ | 246 #endif // HEADLESS_PUBLIC_HEADLESS_BROWSER_H_ |
| OLD | NEW |