Add OnRenderProcessTerminated and OnPluginCrashed notifications to CefLoadHandler (issue #633).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@710 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-06-25 19:49:17 +00:00
parent 6f2897cb50
commit 89c70a8b11
10 changed files with 179 additions and 0 deletions

View File

@@ -88,6 +88,21 @@ typedef struct _cef_load_handler_t {
struct _cef_browser_t* browser, struct _cef_frame_t* frame,
enum cef_errorcode_t errorCode, const cef_string_t* errorText,
const cef_string_t* failedUrl);
///
// Called when the render process terminates unexpectedly. |status| indicates
// how the process terminated.
///
void (CEF_CALLBACK *on_render_process_terminated)(
struct _cef_load_handler_t* self, struct _cef_browser_t* browser,
enum cef_termination_status_t status);
///
// Called when a plugin has crashed. |plugin_path| is the path of the plugin
// that crashed.
///
void (CEF_CALLBACK *on_plugin_crashed)(struct _cef_load_handler_t* self,
struct _cef_browser_t* browser, const cef_string_t* plugin_path);
} cef_load_handler_t;

View File

@@ -50,6 +50,7 @@
class CefLoadHandler : public virtual CefBase {
public:
typedef cef_errorcode_t ErrorCode;
typedef cef_termination_status_t TerminationStatus;
///
// Called when the browser begins loading a frame. The |frame| value will
@@ -88,6 +89,22 @@ class CefLoadHandler : public virtual CefBase {
ErrorCode errorCode,
const CefString& errorText,
const CefString& failedUrl) {}
///
// Called when the render process terminates unexpectedly. |status| indicates
// how the process terminated.
///
/*--cef()--*/
virtual void OnRenderProcessTerminated(CefRefPtr<CefBrowser> browser,
TerminationStatus status) {}
///
// Called when a plugin has crashed. |plugin_path| is the path of the plugin
// that crashed.
///
/*--cef()--*/
virtual void OnPluginCrashed(CefRefPtr<CefBrowser> browser,
const CefString& plugin_path) {}
};
#endif // CEF_INCLUDE_CEF_LOAD_HANDLER_H_

View File

@@ -580,6 +580,26 @@ typedef struct _cef_cookie_t {
cef_time_t expires;
} cef_cookie_t;
///
// Process termination status values.
///
enum cef_termination_status_t {
///
// Non-zero exit status.
///
TS_ABNORMAL_TERMINATION,
///
// SIGKILL or task manager kill.
///
TS_PROCESS_WAS_KILLED,
///
// Segmentation fault.
///
TS_PROCESS_CRASHED,
};
///
// Storage types.
///