mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Improve inheritance support in the CEF API (issue #1623).
- Support single parent inheritance in CEF API classes. - Support non-virtual inheritance in CEF API classes. - Support translation of CEF API sub-directories. - Add test sub-directories for testing-only functionality that will be available to unit tests but not exposed via the binary distribution. - Add unit tests for the translator tool. - Fix parsing of template parameter types that include commas.
This commit is contained in:
@ -14,6 +14,8 @@
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_string_userfree_t CEF_CALLBACK sslcert_principal_get_display_name(
|
||||
@ -192,25 +194,31 @@ void CEF_CALLBACK sslcert_principal_get_domain_components(
|
||||
transfer_string_list_contents(componentsList, components);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefSSLCertPrincipalCppToC::CefSSLCertPrincipalCppToC(CefSSLCertPrincipal* cls)
|
||||
: CefCppToC<CefSSLCertPrincipalCppToC, CefSSLCertPrincipal,
|
||||
cef_sslcert_principal_t>(cls) {
|
||||
struct_.struct_.get_display_name = sslcert_principal_get_display_name;
|
||||
struct_.struct_.get_common_name = sslcert_principal_get_common_name;
|
||||
struct_.struct_.get_locality_name = sslcert_principal_get_locality_name;
|
||||
struct_.struct_.get_state_or_province_name =
|
||||
CefSSLCertPrincipalCppToC::CefSSLCertPrincipalCppToC() {
|
||||
GetStruct()->get_display_name = sslcert_principal_get_display_name;
|
||||
GetStruct()->get_common_name = sslcert_principal_get_common_name;
|
||||
GetStruct()->get_locality_name = sslcert_principal_get_locality_name;
|
||||
GetStruct()->get_state_or_province_name =
|
||||
sslcert_principal_get_state_or_province_name;
|
||||
struct_.struct_.get_country_name = sslcert_principal_get_country_name;
|
||||
struct_.struct_.get_street_addresses = sslcert_principal_get_street_addresses;
|
||||
struct_.struct_.get_organization_names =
|
||||
GetStruct()->get_country_name = sslcert_principal_get_country_name;
|
||||
GetStruct()->get_street_addresses = sslcert_principal_get_street_addresses;
|
||||
GetStruct()->get_organization_names =
|
||||
sslcert_principal_get_organization_names;
|
||||
struct_.struct_.get_organization_unit_names =
|
||||
GetStruct()->get_organization_unit_names =
|
||||
sslcert_principal_get_organization_unit_names;
|
||||
struct_.struct_.get_domain_components =
|
||||
sslcert_principal_get_domain_components;
|
||||
GetStruct()->get_domain_components = sslcert_principal_get_domain_components;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefSSLCertPrincipal> CefCppToC<CefSSLCertPrincipalCppToC,
|
||||
CefSSLCertPrincipal, cef_sslcert_principal_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_sslcert_principal_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@ -218,3 +226,6 @@ template<> base::AtomicRefCount CefCppToC<CefSSLCertPrincipalCppToC,
|
||||
CefSSLCertPrincipal, cef_sslcert_principal_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefSSLCertPrincipalCppToC,
|
||||
CefSSLCertPrincipal, cef_sslcert_principal_t>::kWrapperType =
|
||||
WT_SSLCERT_PRINCIPAL;
|
||||
|
Reference in New Issue
Block a user