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:
Marshall Greenblatt
2015-04-26 21:40:01 +03:00
parent 4715a1644e
commit 616fdbf3ff
408 changed files with 13269 additions and 4680 deletions

View File

@@ -69,7 +69,8 @@ CefRefPtr<CefRequestContext> CefRequestContext::CreateContext(
// VIRTUAL METHODS - Body may be edited by hand.
bool CefRequestContextCToCpp::IsSame(CefRefPtr<CefRequestContext> other) {
if (CEF_MEMBER_MISSING(struct_, is_same))
cef_request_context_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_same))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -80,7 +81,7 @@ bool CefRequestContextCToCpp::IsSame(CefRefPtr<CefRequestContext> other) {
return false;
// Execute
int _retval = struct_->is_same(struct_,
int _retval = _struct->is_same(_struct,
CefRequestContextCToCpp::Unwrap(other));
// Return type: bool
@@ -89,7 +90,8 @@ bool CefRequestContextCToCpp::IsSame(CefRefPtr<CefRequestContext> other) {
bool CefRequestContextCToCpp::IsSharingWith(
CefRefPtr<CefRequestContext> other) {
if (CEF_MEMBER_MISSING(struct_, is_sharing_with))
cef_request_context_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_sharing_with))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -100,7 +102,7 @@ bool CefRequestContextCToCpp::IsSharingWith(
return false;
// Execute
int _retval = struct_->is_sharing_with(struct_,
int _retval = _struct->is_sharing_with(_struct,
CefRequestContextCToCpp::Unwrap(other));
// Return type: bool
@@ -108,39 +110,42 @@ bool CefRequestContextCToCpp::IsSharingWith(
}
bool CefRequestContextCToCpp::IsGlobal() {
if (CEF_MEMBER_MISSING(struct_, is_global))
cef_request_context_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, is_global))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->is_global(struct_);
int _retval = _struct->is_global(_struct);
// Return type: bool
return _retval?true:false;
}
CefRefPtr<CefRequestContextHandler> CefRequestContextCToCpp::GetHandler() {
if (CEF_MEMBER_MISSING(struct_, get_handler))
cef_request_context_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_request_context_handler_t* _retval = struct_->get_handler(struct_);
cef_request_context_handler_t* _retval = _struct->get_handler(_struct);
// Return type: refptr_diff
return CefRequestContextHandlerCppToC::Unwrap(_retval);
}
CefString CefRequestContextCToCpp::GetCachePath() {
if (CEF_MEMBER_MISSING(struct_, get_cache_path))
cef_request_context_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_cache_path))
return CefString();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_string_userfree_t _retval = struct_->get_cache_path(struct_);
cef_string_userfree_t _retval = _struct->get_cache_path(_struct);
// Return type: string
CefString _retvalStr;
@@ -150,7 +155,8 @@ CefString CefRequestContextCToCpp::GetCachePath() {
CefRefPtr<CefCookieManager> CefRequestContextCToCpp::GetDefaultCookieManager(
CefRefPtr<CefCompletionCallback> callback) {
if (CEF_MEMBER_MISSING(struct_, get_default_cookie_manager))
cef_request_context_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_default_cookie_manager))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -158,7 +164,7 @@ CefRefPtr<CefCookieManager> CefRequestContextCToCpp::GetDefaultCookieManager(
// Unverified params: callback
// Execute
cef_cookie_manager_t* _retval = struct_->get_default_cookie_manager(struct_,
cef_cookie_manager_t* _retval = _struct->get_default_cookie_manager(_struct,
CefCompletionCallbackCppToC::Wrap(callback));
// Return type: refptr_same
@@ -168,7 +174,8 @@ CefRefPtr<CefCookieManager> CefRequestContextCToCpp::GetDefaultCookieManager(
bool CefRequestContextCToCpp::RegisterSchemeHandlerFactory(
const CefString& scheme_name, const CefString& domain_name,
CefRefPtr<CefSchemeHandlerFactory> factory) {
if (CEF_MEMBER_MISSING(struct_, register_scheme_handler_factory))
cef_request_context_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, register_scheme_handler_factory))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -180,7 +187,7 @@ bool CefRequestContextCToCpp::RegisterSchemeHandlerFactory(
// Unverified params: domain_name, factory
// Execute
int _retval = struct_->register_scheme_handler_factory(struct_,
int _retval = _struct->register_scheme_handler_factory(_struct,
scheme_name.GetStruct(),
domain_name.GetStruct(),
CefSchemeHandlerFactoryCppToC::Wrap(factory));
@@ -190,21 +197,36 @@ bool CefRequestContextCToCpp::RegisterSchemeHandlerFactory(
}
bool CefRequestContextCToCpp::ClearSchemeHandlerFactories() {
if (CEF_MEMBER_MISSING(struct_, clear_scheme_handler_factories))
cef_request_context_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, clear_scheme_handler_factories))
return false;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int _retval = struct_->clear_scheme_handler_factories(struct_);
int _retval = _struct->clear_scheme_handler_factories(_struct);
// Return type: bool
return _retval?true:false;
}
// CONSTRUCTOR - Do not edit by hand.
CefRequestContextCToCpp::CefRequestContextCToCpp() {
}
template<> cef_request_context_t* CefCToCpp<CefRequestContextCToCpp,
CefRequestContext, cef_request_context_t>::UnwrapDerived(
CefWrapperType type, CefRequestContext* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#ifndef NDEBUG
template<> base::AtomicRefCount CefCToCpp<CefRequestContextCToCpp,
CefRequestContext, cef_request_context_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCToCpp<CefRequestContextCToCpp, CefRequestContext,
cef_request_context_t>::kWrapperType = WT_REQUEST_CONTEXT;