mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Support configuration of user agent and locale (see issue #2969)
This change adds support for CefSettings and command-line configuration of user_agent, user_agent_product (formerly product_version) and locale.
This commit is contained in:
@@ -304,9 +304,9 @@ typedef struct _cef_settings_t {
|
||||
// Value that will be inserted as the product portion of the default
|
||||
// User-Agent string. If empty the Chromium product version will be used. If
|
||||
// |userAgent| is specified this value will be ignored. Also configurable
|
||||
// using the "product-version" command-line switch.
|
||||
// using the "user-agent-product" command-line switch.
|
||||
///
|
||||
cef_string_t product_version;
|
||||
cef_string_t user_agent_product;
|
||||
|
||||
///
|
||||
// The locale string that will be passed to WebKit. If empty the default
|
||||
|
@@ -548,7 +548,7 @@ struct CefSettingsTraits {
|
||||
cef_string_clear(&s->root_cache_path);
|
||||
cef_string_clear(&s->user_data_path);
|
||||
cef_string_clear(&s->user_agent);
|
||||
cef_string_clear(&s->product_version);
|
||||
cef_string_clear(&s->user_agent_product);
|
||||
cef_string_clear(&s->locale);
|
||||
cef_string_clear(&s->log_file);
|
||||
cef_string_clear(&s->javascript_flags);
|
||||
@@ -587,8 +587,8 @@ struct CefSettingsTraits {
|
||||
|
||||
cef_string_set(src->user_agent.str, src->user_agent.length,
|
||||
&target->user_agent, copy);
|
||||
cef_string_set(src->product_version.str, src->product_version.length,
|
||||
&target->product_version, copy);
|
||||
cef_string_set(src->user_agent_product.str, src->user_agent_product.length,
|
||||
&target->user_agent_product, copy);
|
||||
cef_string_set(src->locale.str, src->locale.length, &target->locale, copy);
|
||||
|
||||
cef_string_set(src->log_file.str, src->log_file.length, &target->log_file,
|
||||
|
Reference in New Issue
Block a user