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 "content/public/common/user_agent.h" | 5 #include "content/public/common/user_agent.h" |
6 #include "headless/public/headless_browser.h" | 6 #include "headless/public/headless_browser.h" |
7 #include "net/url_request/url_request_context_getter.h" | 7 #include "net/url_request/url_request_context_getter.h" |
8 | 8 |
9 using Options = headless::HeadlessBrowser::Options; | 9 using Options = headless::HeadlessBrowser::Options; |
10 using Builder = headless::HeadlessBrowser::Options::Builder; | 10 using Builder = headless::HeadlessBrowser::Options::Builder; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 Builder& Builder::SetHostResolverRules(const std::string& host_resolver_rules) { | 58 Builder& Builder::SetHostResolverRules(const std::string& host_resolver_rules) { |
59 options_.host_resolver_rules = host_resolver_rules; | 59 options_.host_resolver_rules = host_resolver_rules; |
60 return *this; | 60 return *this; |
61 } | 61 } |
62 | 62 |
63 Builder& Builder::SetSingleProcessMode(bool single_process_mode) { | 63 Builder& Builder::SetSingleProcessMode(bool single_process_mode) { |
64 options_.single_process_mode = single_process_mode; | 64 options_.single_process_mode = single_process_mode; |
65 return *this; | 65 return *this; |
66 } | 66 } |
67 | 67 |
68 Builder& Builder::SetProtocolHandlers(ProtocolHandlerMap protocol_handlers) { | |
69 options_.protocol_handlers = std::move(protocol_handlers); | |
70 return *this; | |
71 } | |
72 | |
73 Options Builder::Build() { | 68 Options Builder::Build() { |
74 return std::move(options_); | 69 return std::move(options_); |
75 } | 70 } |
76 | 71 |
77 } // namespace headless | 72 } // namespace headless |
OLD | NEW |