Initial changes to allow use of CefLoadHandler in the render process (issue #1077).

- Move OnLoadingStateChange from CefDisplayHandler to CefLoadHandler.
- Move OnRenderProcessTerminated and OnPluginCrashed from CefLoadHandler to CefRequestHandler.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1441 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-09-12 20:34:18 +00:00
parent 4eafb2ea24
commit c577293d96
18 changed files with 286 additions and 308 deletions

View File

@ -100,8 +100,8 @@ typedef struct _cef_request_handler_t {
// Called on the UI thread before browser navigation. Return true (1) to
// cancel the navigation or false (0) to allow the navigation to proceed. The
// |request| object cannot be modified in this callback.
// cef_display_handler_t::OnLoadingStateChange will be called twice in all
// cases. If the navigation is allowed cef_load_handler_t::OnLoadStart and
// cef_load_handler_t::OnLoadingStateChange will be called twice in all cases.
// If the navigation is allowed cef_load_handler_t::OnLoadStart and
// cef_load_handler_t::OnLoadEnd will be called. If the navigation is canceled
// cef_load_handler_t::OnLoadError will be called with an |errorCode| value of
// ERR_ABORTED.
@ -173,14 +173,6 @@ typedef struct _cef_request_handler_t {
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
const cef_string_t* url, int* allow_os_execution);
///
// Called on the browser process IO thread before a plugin is loaded. Return
// true (1) to block loading of the plugin.
///
int (CEF_CALLBACK *on_before_plugin_load)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* url,
const cef_string_t* policy_url, struct _cef_web_plugin_info_t* info);
///
// Called on the UI thread to handle requests for URLs with an invalid SSL
// certificate. Return true (1) and call
@ -194,6 +186,29 @@ typedef struct _cef_request_handler_t {
int (CEF_CALLBACK *on_certificate_error)(struct _cef_request_handler_t* self,
enum cef_errorcode_t cert_error, const cef_string_t* request_url,
struct _cef_allow_certificate_error_callback_t* callback);
///
// Called on the browser process IO thread before a plugin is loaded. Return
// true (1) to block loading of the plugin.
///
int (CEF_CALLBACK *on_before_plugin_load)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* url,
const cef_string_t* policy_url, struct _cef_web_plugin_info_t* info);
///
// Called on the browser process UI thread when a plugin has crashed.
// |plugin_path| is the path of the plugin that crashed.
///
void (CEF_CALLBACK *on_plugin_crashed)(struct _cef_request_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* plugin_path);
///
// Called on the browser process UI thread when the render process terminates
// unexpectedly. |status| indicates how the process terminated.
///
void (CEF_CALLBACK *on_render_process_terminated)(
struct _cef_request_handler_t* self, struct _cef_browser_t* browser,
enum cef_termination_status_t status);
} cef_request_handler_t;