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:
@@ -32,184 +32,198 @@
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefContextMenuHandler> CefClientCToCpp::GetContextMenuHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_context_menu_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_context_menu_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_context_menu_handler_t* _retval = struct_->get_context_menu_handler(
|
||||
struct_);
|
||||
cef_context_menu_handler_t* _retval = _struct->get_context_menu_handler(
|
||||
_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefContextMenuHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefDialogHandler> CefClientCToCpp::GetDialogHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_dialog_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_dialog_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_dialog_handler_t* _retval = struct_->get_dialog_handler(struct_);
|
||||
cef_dialog_handler_t* _retval = _struct->get_dialog_handler(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDialogHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefDisplayHandler> CefClientCToCpp::GetDisplayHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_display_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_display_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_display_handler_t* _retval = struct_->get_display_handler(struct_);
|
||||
cef_display_handler_t* _retval = _struct->get_display_handler(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDisplayHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefDownloadHandler> CefClientCToCpp::GetDownloadHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_download_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_download_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_download_handler_t* _retval = struct_->get_download_handler(struct_);
|
||||
cef_download_handler_t* _retval = _struct->get_download_handler(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDownloadHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefDragHandler> CefClientCToCpp::GetDragHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_drag_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_drag_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_drag_handler_t* _retval = struct_->get_drag_handler(struct_);
|
||||
cef_drag_handler_t* _retval = _struct->get_drag_handler(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefDragHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefFindHandler> CefClientCToCpp::GetFindHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_find_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_find_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_find_handler_t* _retval = struct_->get_find_handler(struct_);
|
||||
cef_find_handler_t* _retval = _struct->get_find_handler(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefFindHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefFocusHandler> CefClientCToCpp::GetFocusHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_focus_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_focus_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_focus_handler_t* _retval = struct_->get_focus_handler(struct_);
|
||||
cef_focus_handler_t* _retval = _struct->get_focus_handler(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefFocusHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefGeolocationHandler> CefClientCToCpp::GetGeolocationHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_geolocation_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_geolocation_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_geolocation_handler_t* _retval = struct_->get_geolocation_handler(
|
||||
struct_);
|
||||
cef_geolocation_handler_t* _retval = _struct->get_geolocation_handler(
|
||||
_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefGeolocationHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefJSDialogHandler> CefClientCToCpp::GetJSDialogHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_jsdialog_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_jsdialog_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_jsdialog_handler_t* _retval = struct_->get_jsdialog_handler(struct_);
|
||||
cef_jsdialog_handler_t* _retval = _struct->get_jsdialog_handler(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefJSDialogHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefKeyboardHandler> CefClientCToCpp::GetKeyboardHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_keyboard_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_keyboard_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_keyboard_handler_t* _retval = struct_->get_keyboard_handler(struct_);
|
||||
cef_keyboard_handler_t* _retval = _struct->get_keyboard_handler(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefKeyboardHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefLifeSpanHandler> CefClientCToCpp::GetLifeSpanHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_life_span_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_life_span_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_life_span_handler_t* _retval = struct_->get_life_span_handler(struct_);
|
||||
cef_life_span_handler_t* _retval = _struct->get_life_span_handler(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefLifeSpanHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefLoadHandler> CefClientCToCpp::GetLoadHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_load_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_load_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_load_handler_t* _retval = struct_->get_load_handler(struct_);
|
||||
cef_load_handler_t* _retval = _struct->get_load_handler(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefLoadHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefRenderHandler> CefClientCToCpp::GetRenderHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_render_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_render_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_render_handler_t* _retval = struct_->get_render_handler(struct_);
|
||||
cef_render_handler_t* _retval = _struct->get_render_handler(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefRenderHandlerCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
CefRefPtr<CefRequestHandler> CefClientCToCpp::GetRequestHandler() {
|
||||
if (CEF_MEMBER_MISSING(struct_, get_request_handler))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, get_request_handler))
|
||||
return NULL;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
|
||||
// Execute
|
||||
cef_request_handler_t* _retval = struct_->get_request_handler(struct_);
|
||||
cef_request_handler_t* _retval = _struct->get_request_handler(_struct);
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefRequestHandlerCToCpp::Wrap(_retval);
|
||||
@@ -217,7 +231,8 @@ CefRefPtr<CefRequestHandler> CefClientCToCpp::GetRequestHandler() {
|
||||
|
||||
bool CefClientCToCpp::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
|
||||
CefProcessId source_process, CefRefPtr<CefProcessMessage> message) {
|
||||
if (CEF_MEMBER_MISSING(struct_, on_process_message_received))
|
||||
cef_client_t* _struct = GetStruct();
|
||||
if (CEF_MEMBER_MISSING(_struct, on_process_message_received))
|
||||
return false;
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@@ -232,7 +247,7 @@ bool CefClientCToCpp::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = struct_->on_process_message_received(struct_,
|
||||
int _retval = _struct->on_process_message_received(_struct,
|
||||
CefBrowserCppToC::Wrap(browser),
|
||||
source_process,
|
||||
CefProcessMessageCppToC::Wrap(message));
|
||||
@@ -242,8 +257,21 @@ bool CefClientCToCpp::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefClientCToCpp::CefClientCToCpp() {
|
||||
}
|
||||
|
||||
template<> cef_client_t* CefCToCpp<CefClientCToCpp, CefClient,
|
||||
cef_client_t>::UnwrapDerived(CefWrapperType type, CefClient* c) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCToCpp<CefClientCToCpp, CefClient,
|
||||
cef_client_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCToCpp<CefClientCToCpp, CefClient,
|
||||
cef_client_t>::kWrapperType = WT_CLIENT;
|
||||
|
Reference in New Issue
Block a user