mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Allow clients to clear certificate exceptions and close connections (issue #1793)
This commit is contained in:
@@ -350,6 +350,34 @@ int CEF_CALLBACK request_context_set_preference(
|
||||
return _retval;
|
||||
}
|
||||
|
||||
void CEF_CALLBACK request_context_clear_certificate_exceptions(
|
||||
struct _cef_request_context_t* self, cef_completion_callback_t* callback) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Unverified params: callback
|
||||
|
||||
// Execute
|
||||
CefRequestContextCppToC::Get(self)->ClearCertificateExceptions(
|
||||
CefCompletionCallbackCToCpp::Wrap(callback));
|
||||
}
|
||||
|
||||
void CEF_CALLBACK request_context_close_all_connections(
|
||||
struct _cef_request_context_t* self, cef_completion_callback_t* callback) {
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
DCHECK(self);
|
||||
if (!self)
|
||||
return;
|
||||
// Unverified params: callback
|
||||
|
||||
// Execute
|
||||
CefRequestContextCppToC::Get(self)->CloseAllConnections(
|
||||
CefCompletionCallbackCToCpp::Wrap(callback));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -374,6 +402,9 @@ CefRequestContextCppToC::CefRequestContextCppToC() {
|
||||
GetStruct()->get_all_preferences = request_context_get_all_preferences;
|
||||
GetStruct()->can_set_preference = request_context_can_set_preference;
|
||||
GetStruct()->set_preference = request_context_set_preference;
|
||||
GetStruct()->clear_certificate_exceptions =
|
||||
request_context_clear_certificate_exceptions;
|
||||
GetStruct()->close_all_connections = request_context_close_all_connections;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefRequestContext> CefCppToC<CefRequestContextCppToC,
|
||||
|
@@ -325,6 +325,36 @@ bool CefRequestContextCToCpp::SetPreference(const CefString& name,
|
||||
return _retval?true:false;
|
||||
}
|
||||
|
||||
void CefRequestContextCToCpp::ClearCertificateExceptions(
|
||||
CefRefPtr<CefCompletionCallback> callback) {
|
||||
cef_request_context_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, clear_certificate_exceptions))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: callback
|
||||
|
||||
// Execute
|
||||
_struct->clear_certificate_exceptions(_struct,
|
||||
CefCompletionCallbackCppToC::Wrap(callback));
|
||||
}
|
||||
|
||||
void CefRequestContextCToCpp::CloseAllConnections(
|
||||
CefRefPtr<CefCompletionCallback> callback) {
|
||||
cef_request_context_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, close_all_connections))
|
||||
return;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Unverified params: callback
|
||||
|
||||
// Execute
|
||||
_struct->close_all_connections(_struct,
|
||||
CefCompletionCallbackCppToC::Wrap(callback));
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
|
@@ -52,6 +52,9 @@ class CefRequestContextCToCpp
|
||||
bool CanSetPreference(const CefString& name) OVERRIDE;
|
||||
bool SetPreference(const CefString& name, CefRefPtr<CefValue> value,
|
||||
CefString& error) OVERRIDE;
|
||||
void ClearCertificateExceptions(
|
||||
CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
|
||||
void CloseAllConnections(CefRefPtr<CefCompletionCallback> callback) OVERRIDE;
|
||||
};
|
||||
|
||||
#endif // USING_CEF_SHARED
|
||||
|
Reference in New Issue
Block a user