mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Introduce chrome proxy implementation based on command-line flags (issue #600).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1080 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -76,32 +76,6 @@ void AppGetSettings(CefSettings& settings, CefRefPtr<ClientApp> app) {
|
||||
|
||||
CefString(&settings.cache_path) =
|
||||
g_command_line->GetSwitchValue(cefclient::kCachePath);
|
||||
|
||||
// Retrieve command-line proxy configuration, if any.
|
||||
bool has_proxy = false;
|
||||
cef_proxy_type_t proxy_type = CEF_PROXY_TYPE_DIRECT;
|
||||
CefString proxy_config;
|
||||
|
||||
if (g_command_line->HasSwitch(cefclient::kProxyType)) {
|
||||
std::string str = g_command_line->GetSwitchValue(cefclient::kProxyType);
|
||||
if (str == cefclient::kProxyType_Direct) {
|
||||
has_proxy = true;
|
||||
proxy_type = CEF_PROXY_TYPE_DIRECT;
|
||||
} else if (str == cefclient::kProxyType_Named ||
|
||||
str == cefclient::kProxyType_Pac) {
|
||||
proxy_config = g_command_line->GetSwitchValue(cefclient::kProxyConfig);
|
||||
if (!proxy_config.empty()) {
|
||||
has_proxy = true;
|
||||
proxy_type = (str == cefclient::kProxyType_Named?
|
||||
CEF_PROXY_TYPE_NAMED:CEF_PROXY_TYPE_PAC_STRING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (has_proxy) {
|
||||
// Provide a ClientApp instance to handle proxy resolution.
|
||||
app->SetProxyConfig(proxy_type, proxy_config);
|
||||
}
|
||||
}
|
||||
|
||||
bool AppIsOffScreenRenderingEnabled() {
|
||||
|
Reference in New Issue
Block a user