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:
@ -45,6 +45,8 @@ CEF_EXPORT cef_urlrequest_t* cef_urlrequest_create(cef_request_t* request,
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
cef_request_t* CEF_CALLBACK urlrequest_get_request(
|
||||
@ -136,17 +138,25 @@ void CEF_CALLBACK urlrequest_cancel(struct _cef_urlrequest_t* self) {
|
||||
CefURLRequestCppToC::Get(self)->Cancel();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefURLRequestCppToC::CefURLRequestCppToC(CefURLRequest* cls)
|
||||
: CefCppToC<CefURLRequestCppToC, CefURLRequest, cef_urlrequest_t>(cls) {
|
||||
struct_.struct_.get_request = urlrequest_get_request;
|
||||
struct_.struct_.get_client = urlrequest_get_client;
|
||||
struct_.struct_.get_request_status = urlrequest_get_request_status;
|
||||
struct_.struct_.get_request_error = urlrequest_get_request_error;
|
||||
struct_.struct_.get_response = urlrequest_get_response;
|
||||
struct_.struct_.cancel = urlrequest_cancel;
|
||||
CefURLRequestCppToC::CefURLRequestCppToC() {
|
||||
GetStruct()->get_request = urlrequest_get_request;
|
||||
GetStruct()->get_client = urlrequest_get_client;
|
||||
GetStruct()->get_request_status = urlrequest_get_request_status;
|
||||
GetStruct()->get_request_error = urlrequest_get_request_error;
|
||||
GetStruct()->get_response = urlrequest_get_response;
|
||||
GetStruct()->cancel = urlrequest_cancel;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefURLRequest> CefCppToC<CefURLRequestCppToC,
|
||||
CefURLRequest, cef_urlrequest_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_urlrequest_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@ -154,3 +164,5 @@ template<> base::AtomicRefCount CefCppToC<CefURLRequestCppToC, CefURLRequest,
|
||||
cef_urlrequest_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefURLRequestCppToC, CefURLRequest,
|
||||
cef_urlrequest_t>::kWrapperType = WT_URLREQUEST;
|
||||
|
Reference in New Issue
Block a user