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:
@ -22,6 +22,8 @@
|
||||
#include "libcef_dll/ctocpp/web_plugin_info_ctocpp.h"
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK request_handler_on_before_browse(
|
||||
@ -476,32 +478,41 @@ void CEF_CALLBACK request_handler_on_render_process_terminated(
|
||||
status);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefRequestHandlerCppToC::CefRequestHandlerCppToC(CefRequestHandler* cls)
|
||||
: CefCppToC<CefRequestHandlerCppToC, CefRequestHandler,
|
||||
cef_request_handler_t>(cls) {
|
||||
struct_.struct_.on_before_browse = request_handler_on_before_browse;
|
||||
struct_.struct_.on_open_urlfrom_tab = request_handler_on_open_urlfrom_tab;
|
||||
struct_.struct_.on_before_resource_load =
|
||||
CefRequestHandlerCppToC::CefRequestHandlerCppToC() {
|
||||
GetStruct()->on_before_browse = request_handler_on_before_browse;
|
||||
GetStruct()->on_open_urlfrom_tab = request_handler_on_open_urlfrom_tab;
|
||||
GetStruct()->on_before_resource_load =
|
||||
request_handler_on_before_resource_load;
|
||||
struct_.struct_.get_resource_handler = request_handler_get_resource_handler;
|
||||
struct_.struct_.on_resource_redirect = request_handler_on_resource_redirect;
|
||||
struct_.struct_.on_resource_response = request_handler_on_resource_response;
|
||||
struct_.struct_.get_auth_credentials = request_handler_get_auth_credentials;
|
||||
struct_.struct_.on_quota_request = request_handler_on_quota_request;
|
||||
struct_.struct_.on_protocol_execution = request_handler_on_protocol_execution;
|
||||
struct_.struct_.on_certificate_error = request_handler_on_certificate_error;
|
||||
struct_.struct_.on_before_plugin_load = request_handler_on_before_plugin_load;
|
||||
struct_.struct_.on_plugin_crashed = request_handler_on_plugin_crashed;
|
||||
struct_.struct_.on_render_view_ready = request_handler_on_render_view_ready;
|
||||
struct_.struct_.on_render_process_terminated =
|
||||
GetStruct()->get_resource_handler = request_handler_get_resource_handler;
|
||||
GetStruct()->on_resource_redirect = request_handler_on_resource_redirect;
|
||||
GetStruct()->on_resource_response = request_handler_on_resource_response;
|
||||
GetStruct()->get_auth_credentials = request_handler_get_auth_credentials;
|
||||
GetStruct()->on_quota_request = request_handler_on_quota_request;
|
||||
GetStruct()->on_protocol_execution = request_handler_on_protocol_execution;
|
||||
GetStruct()->on_certificate_error = request_handler_on_certificate_error;
|
||||
GetStruct()->on_before_plugin_load = request_handler_on_before_plugin_load;
|
||||
GetStruct()->on_plugin_crashed = request_handler_on_plugin_crashed;
|
||||
GetStruct()->on_render_view_ready = request_handler_on_render_view_ready;
|
||||
GetStruct()->on_render_process_terminated =
|
||||
request_handler_on_render_process_terminated;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefRequestHandler> CefCppToC<CefRequestHandlerCppToC,
|
||||
CefRequestHandler, cef_request_handler_t>::UnwrapDerived(
|
||||
CefWrapperType type, cef_request_handler_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
template<> base::AtomicRefCount CefCppToC<CefRequestHandlerCppToC,
|
||||
CefRequestHandler, cef_request_handler_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefRequestHandlerCppToC, CefRequestHandler,
|
||||
cef_request_handler_t>::kWrapperType = WT_REQUEST_HANDLER;
|
||||
|
Reference in New Issue
Block a user