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

@ -11,29 +11,12 @@
//
#include "libcef_dll/cpptoc/browser_process_handler_cpptoc.h"
#include "libcef_dll/cpptoc/proxy_handler_cpptoc.h"
#include "libcef_dll/ctocpp/command_line_ctocpp.h"
#include "libcef_dll/ctocpp/list_value_ctocpp.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
struct _cef_proxy_handler_t* CEF_CALLBACK browser_process_handler_get_proxy_handler(
struct _cef_browser_process_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefProxyHandler> _retval = CefBrowserProcessHandlerCppToC::Get(
self)->GetProxyHandler();
// Return type: refptr_same
return CefProxyHandlerCppToC::Wrap(_retval);
}
void CEF_CALLBACK browser_process_handler_on_context_initialized(
struct _cef_browser_process_handler_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@ -89,7 +72,6 @@ CefBrowserProcessHandlerCppToC::CefBrowserProcessHandlerCppToC(
CefBrowserProcessHandler* cls)
: CefCppToC<CefBrowserProcessHandlerCppToC, CefBrowserProcessHandler,
cef_browser_process_handler_t>(cls) {
struct_.struct_.get_proxy_handler = browser_process_handler_get_proxy_handler;
struct_.struct_.on_context_initialized =
browser_process_handler_on_context_initialized;
struct_.struct_.on_before_child_process_launch =

View File

@ -1,63 +0,0 @@
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#include "libcef_dll/cpptoc/proxy_handler_cpptoc.h"
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK proxy_handler_get_proxy_for_url(
struct _cef_proxy_handler_t* self, const cef_string_t* url,
struct _cef_proxy_info_t* proxy_info) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: url; type: string_byref_const
DCHECK(url);
if (!url)
return;
// Verify param: proxy_info; type: struct_byref
DCHECK(proxy_info);
if (!proxy_info)
return;
// Translate param: proxy_info; type: struct_byref
CefProxyInfo proxy_infoObj;
if (proxy_info)
proxy_infoObj.AttachTo(*proxy_info);
// Execute
CefProxyHandlerCppToC::Get(self)->GetProxyForUrl(
CefString(url),
proxy_infoObj);
// Restore param: proxy_info; type: struct_byref
if (proxy_info)
proxy_infoObj.DetachTo(*proxy_info);
}
// CONSTRUCTOR - Do not edit by hand.
CefProxyHandlerCppToC::CefProxyHandlerCppToC(CefProxyHandler* cls)
: CefCppToC<CefProxyHandlerCppToC, CefProxyHandler, cef_proxy_handler_t>(
cls) {
struct_.struct_.get_proxy_for_url = proxy_handler_get_proxy_for_url;
}
#ifndef NDEBUG
template<> long CefCppToC<CefProxyHandlerCppToC, CefProxyHandler,
cef_proxy_handler_t>::DebugObjCt = 0;
#endif

View File

@ -1,37 +0,0 @@
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_
#pragma once
#ifndef USING_CEF_SHARED
#pragma message("Warning: "__FILE__" may be accessed wrapper-side only")
#else // USING_CEF_SHARED
#include "include/cef_proxy_handler.h"
#include "include/capi/cef_proxy_handler_capi.h"
#include "libcef_dll/cpptoc/cpptoc.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefProxyHandlerCppToC
: public CefCppToC<CefProxyHandlerCppToC, CefProxyHandler,
cef_proxy_handler_t> {
public:
explicit CefProxyHandlerCppToC(CefProxyHandler* cls);
virtual ~CefProxyHandlerCppToC() {}
};
#endif // USING_CEF_SHARED
#endif // CEF_LIBCEF_DLL_CPPTOC_PROXY_HANDLER_CPPTOC_H_