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

Side by Side Diff: headless/public/headless_browser_context.h

Issue 2720673003: [headless] Use version for product name and user agent. (Closed)
Patch Set: use headless/public/version.h instead. Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « headless/public/headless_browser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_CONTEXT_H_ 5 #ifndef HEADLESS_PUBLIC_HEADLESS_BROWSER_CONTEXT_H_
6 #define HEADLESS_PUBLIC_HEADLESS_BROWSER_CONTEXT_H_ 6 #define HEADLESS_PUBLIC_HEADLESS_BROWSER_CONTEXT_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // 99 //
100 // That said, best pratice is to add a ProtocolHandler to serve the 100 // That said, best pratice is to add a ProtocolHandler to serve the
101 // webcontent over a custom protocol. That way you can be sure that only the 101 // webcontent over a custom protocol. That way you can be sure that only the
102 // things you intend have access to mojo. 102 // things you intend have access to mojo.
103 Builder& EnableUnsafeNetworkAccessWithMojoBindings( 103 Builder& EnableUnsafeNetworkAccessWithMojoBindings(
104 bool enable_http_and_https_if_mojo_used); 104 bool enable_http_and_https_if_mojo_used);
105 105
106 // By default |HeadlessBrowserContext| inherits the following options from 106 // By default |HeadlessBrowserContext| inherits the following options from
107 // the browser instance. The methods below can be used to override these 107 // the browser instance. The methods below can be used to override these
108 // settings. See HeadlessBrowser::Options for their meaning. 108 // settings. See HeadlessBrowser::Options for their meaning.
109 Builder& SetProductNameAndVersion(
110 const std::string& product_name_and_version);
109 Builder& SetUserAgent(const std::string& user_agent); 111 Builder& SetUserAgent(const std::string& user_agent);
110 Builder& SetProxyServer(const net::HostPortPair& proxy_server); 112 Builder& SetProxyServer(const net::HostPortPair& proxy_server);
111 Builder& SetHostResolverRules(const std::string& host_resolver_rules); 113 Builder& SetHostResolverRules(const std::string& host_resolver_rules);
112 Builder& SetWindowSize(const gfx::Size& window_size); 114 Builder& SetWindowSize(const gfx::Size& window_size);
113 Builder& SetUserDataDir(const base::FilePath& user_data_dir); 115 Builder& SetUserDataDir(const base::FilePath& user_data_dir);
114 Builder& SetIncognitoMode(bool incognito_mode); 116 Builder& SetIncognitoMode(bool incognito_mode);
115 Builder& SetOverrideWebPreferencesCallback( 117 Builder& SetOverrideWebPreferencesCallback(
116 base::Callback<void(WebPreferences*)> callback); 118 base::Callback<void(WebPreferences*)> callback);
117 119
118 HeadlessBrowserContext* Build(); 120 HeadlessBrowserContext* Build();
(...skipping 21 matching lines...) Expand all
140 142
141 std::list<MojoBindings> mojo_bindings_; 143 std::list<MojoBindings> mojo_bindings_;
142 bool enable_http_and_https_if_mojo_used_; 144 bool enable_http_and_https_if_mojo_used_;
143 145
144 DISALLOW_COPY_AND_ASSIGN(Builder); 146 DISALLOW_COPY_AND_ASSIGN(Builder);
145 }; 147 };
146 148
147 } // namespace headless 149 } // namespace headless
148 150
149 #endif // HEADLESS_PUBLIC_HEADLESS_BROWSER_CONTEXT_H_ 151 #endif // HEADLESS_PUBLIC_HEADLESS_BROWSER_CONTEXT_H_
OLDNEW
« no previous file with comments | « headless/public/headless_browser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698