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

@@ -15,7 +15,6 @@
class ClientApp : public CefApp,
public CefBrowserProcessHandler,
public CefProxyHandler,
public CefRenderProcessHandler {
public:
// Interface for browser delegates. All BrowserDelegates must be returned via
@@ -118,13 +117,6 @@ class ClientApp : public CefApp,
ClientApp();
// Set the proxy configuration. Should only be called during initialization.
void SetProxyConfig(cef_proxy_type_t proxy_type,
const CefString& proxy_config) {
proxy_type_ = proxy_type;
proxy_config_ = proxy_config;
}
// Set a JavaScript callback for the specified |message_name| and |browser_id|
// combination. Will automatically be removed when the associated context is
// released. Callbacks can also be set in JavaScript using the
@@ -165,17 +157,12 @@ class ClientApp : public CefApp,
OVERRIDE { return this; }
// CefBrowserProcessHandler methods.
virtual CefRefPtr<CefProxyHandler> GetProxyHandler() OVERRIDE { return this; }
virtual void OnContextInitialized() OVERRIDE;
virtual void OnBeforeChildProcessLaunch(
CefRefPtr<CefCommandLine> command_line) OVERRIDE;
virtual void OnRenderProcessThreadCreated(CefRefPtr<CefListValue> extra_info)
OVERRIDE;
// CefProxyHandler methods.
virtual void GetProxyForUrl(const CefString& url,
CefProxyInfo& proxy_info) OVERRIDE;
// CefRenderProcessHandler methods.
virtual void OnRenderThreadCreated(CefRefPtr<CefListValue> extra_info)
OVERRIDE;
@@ -222,10 +209,6 @@ class ClientApp : public CefApp,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) OVERRIDE;
// Proxy configuration.
cef_proxy_type_t proxy_type_;
CefString proxy_config_;
// Map of message callbacks.
typedef std::map<std::pair<std::string, int>,
std::pair<CefRefPtr<CefV8Context>, CefRefPtr<CefV8Value> > >