mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add CefRequestHandler::OnCertificateError() callback (issue #345).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1176 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -90,6 +90,22 @@ class CefQuotaCallback : public virtual CefBase {
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Callback interface used for asynchronous continuation of url requests when
|
||||
// invalid SSL certificates are encountered.
|
||||
///
|
||||
/*--cef(source=library)--*/
|
||||
class CefAllowCertificateErrorCallback : public virtual CefBase {
|
||||
public:
|
||||
///
|
||||
// Continue the url request. If |allow| is true the request will be
|
||||
// continued. Otherwise, the request will be canceled.
|
||||
///
|
||||
/*--cef(capi_name=cont)--*/
|
||||
virtual void Continue(bool allow) =0;
|
||||
};
|
||||
|
||||
|
||||
///
|
||||
// Implement this interface to handle events related to browser requests. The
|
||||
// methods of this class will be called on the thread indicated.
|
||||
@ -158,7 +174,7 @@ class CefRequestHandler : public virtual CefBase {
|
||||
// size via the webkitStorageInfo.requestQuota function. |origin_url| is the
|
||||
// origin of the page making the request. |new_size| is the requested quota
|
||||
// size in bytes. Return true and call CefQuotaCallback::Continue() either in
|
||||
// this function or at a later time to grant or deny the request. Return false
|
||||
// this method or at a later time to grant or deny the request. Return false
|
||||
// to cancel the request.
|
||||
///
|
||||
/*--cef(optional_param=realm)--*/
|
||||
@ -203,6 +219,23 @@ class CefRequestHandler : public virtual CefBase {
|
||||
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::
|
||||
// Continue() either in this method or at a later time to continue or cancel
|
||||
// the request. Return false to cancel the request immediately. If |callback|
|
||||
// is empty the error cannot be recovered from and the request will be
|
||||
// canceled automatically. If CefSettings.ignore_certificate_errors is set
|
||||
// all invalid certificates will be accepted without calling this method.
|
||||
///
|
||||
/*--cef()--*/
|
||||
virtual bool OnCertificateError(
|
||||
cef_errorcode_t cert_error,
|
||||
const CefString& request_url,
|
||||
CefRefPtr<CefAllowCertificateErrorCallback> callback) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CEF_INCLUDE_CEF_REQUEST_HANDLER_H_
|
||||
|
Reference in New Issue
Block a user