mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Add a new CefApp interface that provides global handlers and gets passed to CefInitialize() (issue #399).
- Add a new CefProxyHandler interface to allow applications to resolve proxy information (issue #389). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@394 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -51,10 +51,12 @@ extern "C" {
|
||||
|
||||
///
|
||||
// This function should be called on the main application thread to initialize
|
||||
// CEF when the application is started. A return value of true (1) indicates
|
||||
// that it succeeded and false (0) indicates that it failed.
|
||||
// CEF when the application is started. The |application| parameter may be NULL.
|
||||
// A return value of true (1) indicates that it succeeded and false (0)
|
||||
// indicates that it failed.
|
||||
///
|
||||
CEF_EXPORT int cef_initialize(const struct _cef_settings_t* settings);
|
||||
CEF_EXPORT int cef_initialize(const struct _cef_settings_t* settings,
|
||||
struct _cef_app_t* application);
|
||||
|
||||
///
|
||||
// This function should be called on the main application thread to shut down
|
||||
@@ -896,6 +898,41 @@ typedef struct _cef_frame_t
|
||||
} cef_frame_t;
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle proxy resolution events.
|
||||
///
|
||||
typedef struct _cef_proxy_handler_t
|
||||
{
|
||||
// Base structure.
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Called to retrieve proxy information for the specified |url|.
|
||||
///
|
||||
void (CEF_CALLBACK *get_proxy_for_url)(struct _cef_proxy_handler_t* self,
|
||||
const cef_string_t* url, struct _cef_proxy_info_t* proxy_info);
|
||||
|
||||
} cef_proxy_handler_t;
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to provide handler implementations.
|
||||
///
|
||||
typedef struct _cef_app_t
|
||||
{
|
||||
// Base structure.
|
||||
cef_base_t base;
|
||||
|
||||
///
|
||||
// Return the handler for proxy events. If not handler is returned the default
|
||||
// system handler will be used.
|
||||
///
|
||||
struct _cef_proxy_handler_t* (CEF_CALLBACK *get_proxy_handler)(
|
||||
struct _cef_app_t* self);
|
||||
|
||||
} cef_app_t;
|
||||
|
||||
|
||||
///
|
||||
// Implement this structure to handle events related to browser life span. The
|
||||
// functions of this structure will be called on the UI thread.
|
||||
|
||||
Reference in New Issue
Block a user