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

@ -13,6 +13,8 @@
#include "libcef_dll/cpptoc/navigation_entry_cpptoc.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
int CEF_CALLBACK navigation_entry_is_valid(
@ -166,22 +168,29 @@ int CEF_CALLBACK navigation_entry_get_http_status_code(
return _retval;
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefNavigationEntryCppToC::CefNavigationEntryCppToC(CefNavigationEntry* cls)
: CefCppToC<CefNavigationEntryCppToC, CefNavigationEntry,
cef_navigation_entry_t>(cls) {
struct_.struct_.is_valid = navigation_entry_is_valid;
struct_.struct_.get_url = navigation_entry_get_url;
struct_.struct_.get_display_url = navigation_entry_get_display_url;
struct_.struct_.get_original_url = navigation_entry_get_original_url;
struct_.struct_.get_title = navigation_entry_get_title;
struct_.struct_.get_transition_type = navigation_entry_get_transition_type;
struct_.struct_.has_post_data = navigation_entry_has_post_data;
struct_.struct_.get_frame_name = navigation_entry_get_frame_name;
struct_.struct_.get_completion_time = navigation_entry_get_completion_time;
struct_.struct_.get_http_status_code = navigation_entry_get_http_status_code;
CefNavigationEntryCppToC::CefNavigationEntryCppToC() {
GetStruct()->is_valid = navigation_entry_is_valid;
GetStruct()->get_url = navigation_entry_get_url;
GetStruct()->get_display_url = navigation_entry_get_display_url;
GetStruct()->get_original_url = navigation_entry_get_original_url;
GetStruct()->get_title = navigation_entry_get_title;
GetStruct()->get_transition_type = navigation_entry_get_transition_type;
GetStruct()->has_post_data = navigation_entry_has_post_data;
GetStruct()->get_frame_name = navigation_entry_get_frame_name;
GetStruct()->get_completion_time = navigation_entry_get_completion_time;
GetStruct()->get_http_status_code = navigation_entry_get_http_status_code;
}
template<> CefRefPtr<CefNavigationEntry> CefCppToC<CefNavigationEntryCppToC,
CefNavigationEntry, cef_navigation_entry_t>::UnwrapDerived(
CefWrapperType type, cef_navigation_entry_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
#ifndef NDEBUG
@ -189,3 +198,6 @@ template<> base::AtomicRefCount CefCppToC<CefNavigationEntryCppToC,
CefNavigationEntry, cef_navigation_entry_t>::DebugObjCt = 0;
#endif
template<> CefWrapperType CefCppToC<CefNavigationEntryCppToC,
CefNavigationEntry, cef_navigation_entry_t>::kWrapperType =
WT_NAVIGATION_ENTRY;