Allow clients to clear certificate exceptions and close connections (issue #1793)

This commit is contained in:
Marshall Greenblatt
2016-02-23 14:29:18 -05:00
parent e601e76445
commit fabd3db33e
8 changed files with 308 additions and 0 deletions

View File

@@ -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,

View File

@@ -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.

View File

@@ -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