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:
Marshall Greenblatt
2013-02-06 20:41:54 +00:00
parent bccce6258f
commit 81d27df883
36 changed files with 165 additions and 672 deletions

View File

@@ -220,13 +220,6 @@ typedef struct _cef_settings_t {
///
cef_string_t javascript_flags;
///
// Set to true (1) to use the system proxy resolver on Windows when
// "Automatically detect settings" is checked. This setting is disabled
// by default for performance reasons.
///
bool auto_detect_proxy_settings_enabled;
///
// The fully qualified path for the resources directory. If this value is
// empty the cef.pak and/or devtools_resources.pak files must be located in
@@ -1277,23 +1270,6 @@ typedef struct _cef_popup_features_t {
cef_string_list_t additionalFeatures;
} cef_popup_features_t;
///
// Proxy types.
///
enum cef_proxy_type_t {
CEF_PROXY_TYPE_DIRECT = 0,
CEF_PROXY_TYPE_NAMED,
CEF_PROXY_TYPE_PAC_STRING,
};
///
// Proxy information.
///
typedef struct _cef_proxy_info_t {
enum cef_proxy_type_t proxyType;
cef_string_t proxyList;
} cef_proxy_info_t;
///
// DOM document types.
///

View File

@@ -311,9 +311,6 @@ struct CefSettingsTraits {
cef_string_set(src->javascript_flags.str, src->javascript_flags.length,
&target->javascript_flags, copy);
target->auto_detect_proxy_settings_enabled =
src->auto_detect_proxy_settings_enabled;
cef_string_set(src->resources_dir_path.str, src->resources_dir_path.length,
&target->resources_dir_path, copy);
cef_string_set(src->locales_dir_path.str, src->locales_dir_path.length,
@@ -561,65 +558,6 @@ struct CefCookieTraits {
typedef CefStructBase<CefCookieTraits> CefCookie;
struct CefProxyInfoTraits {
typedef cef_proxy_info_t struct_type;
static inline void init(struct_type* s) {}
static inline void clear(struct_type* s) {
cef_string_clear(&s->proxyList);
}
static inline void set(const struct_type* src, struct_type* target,
bool copy) {
target->proxyType = src->proxyType;
cef_string_set(src->proxyList.str, src->proxyList.length,
&target->proxyList, copy);
}
};
///
// Class representing the results of proxy resolution.
///
class CefProxyInfo : public CefStructBase<CefProxyInfoTraits> {
public:
///
// Use a direction connection instead of a proxy.
///
void UseDirect() {
proxyType = CEF_PROXY_TYPE_DIRECT;
}
///
// Use one or more named proxy servers specified in WinHTTP format. Each proxy
// server is of the form:
//
// [<scheme>"://"]<server>[":"<port>]
//
// Multiple values may be separated by semicolons or whitespace. For example,
// "foo1:80;foo2:80".
///
void UseNamedProxy(const CefString& proxy_uri_list) {
proxyType = CEF_PROXY_TYPE_NAMED;
(CefString(&proxyList)) = proxy_uri_list;
}
///
// Use one or more named proxy servers specified in PAC script format. For
// example, "PROXY foobar:99; SOCKS fml:2; DIRECT".
///
void UsePacString(const CefString& pac_string) {
proxyType = CEF_PROXY_TYPE_PAC_STRING;
(CefString(&proxyList)) = pac_string;
}
bool IsDirect() const { return proxyType == CEF_PROXY_TYPE_DIRECT; }
bool IsNamedProxy() const { return proxyType == CEF_PROXY_TYPE_NAMED; }
bool IsPacString() const { return proxyType == CEF_PROXY_TYPE_PAC_STRING; }
CefString ProxyList() const { return CefString(&proxyList); }
};
struct CefGeopositionTraits {
typedef cef_geoposition_t struct_type;