mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@ -91,11 +91,13 @@ class CefAllowCertificateErrorCallback : public virtual CefBase {
|
||||
/*--cef(source=client)--*/
|
||||
class CefRequestHandler : public virtual CefBase {
|
||||
public:
|
||||
typedef cef_termination_status_t TerminationStatus;
|
||||
|
||||
///
|
||||
// Called on the UI thread before browser navigation. Return true to cancel
|
||||
// the navigation or false to allow the navigation to proceed. The |request|
|
||||
// object cannot be modified in this callback.
|
||||
// CefDisplayHandler::OnLoadingStateChange will be called twice in all cases.
|
||||
// CefLoadHandler::OnLoadingStateChange will be called twice in all cases.
|
||||
// If the navigation is allowed CefLoadHandler::OnLoadStart and
|
||||
// CefLoadHandler::OnLoadEnd will be called. If the navigation is canceled
|
||||
// CefLoadHandler::OnLoadError will be called with an |errorCode| value of
|
||||
@ -193,18 +195,6 @@ class CefRequestHandler : public virtual CefBase {
|
||||
const CefString& url,
|
||||
bool& allow_os_execution) {}
|
||||
|
||||
///
|
||||
// Called on the browser process IO thread before a plugin is loaded. Return
|
||||
// true to block loading of the plugin.
|
||||
///
|
||||
/*--cef(optional_param=url,optional_param=policy_url)--*/
|
||||
virtual bool OnBeforePluginLoad(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& url,
|
||||
const CefString& policy_url,
|
||||
CefRefPtr<CefWebPluginInfo> info) {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
// Called on the UI thread to handle requests for URLs with an invalid
|
||||
// SSL certificate. Return true and call CefAllowCertificateErrorCallback::
|
||||
@ -221,6 +211,35 @@ class CefRequestHandler : public virtual CefBase {
|
||||
CefRefPtr<CefAllowCertificateErrorCallback> callback) {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
// Called on the browser process IO thread before a plugin is loaded. Return
|
||||
// true to block loading of the plugin.
|
||||
///
|
||||
/*--cef(optional_param=url,optional_param=policy_url)--*/
|
||||
virtual bool OnBeforePluginLoad(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& url,
|
||||
const CefString& policy_url,
|
||||
CefRefPtr<CefWebPluginInfo> info) {
|
||||
return false;
|
||||
}
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread 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) {}
|
||||
|
||||
///
|
||||
// Called on the browser process UI thread when the render process
|
||||
// terminates unexpectedly. |status| indicates how the process
|
||||
// terminated.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual void OnRenderProcessTerminated(CefRefPtr<CefBrowser> browser,
|
||||
TerminationStatus status) {}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_REQUEST_HANDLER_H_
|
||||
|
Reference in New Issue
Block a user