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:
@ -39,6 +39,8 @@ CEF_EXPORT cef_task_runner_t* cef_task_runner_get_for_thread(
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
// MEMBER FUNCTIONS - Body may be edited by hand.
|
||||
|
||||
int CEF_CALLBACK task_runner_is_same(struct _cef_task_runner_t* self,
|
||||
@ -133,17 +135,25 @@ int CEF_CALLBACK task_runner_post_delayed_task(struct _cef_task_runner_t* self,
|
||||
return _retval;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefTaskRunnerCppToC::CefTaskRunnerCppToC(CefTaskRunner* cls)
|
||||
: CefCppToC<CefTaskRunnerCppToC, CefTaskRunner, cef_task_runner_t>(cls) {
|
||||
struct_.struct_.is_same = task_runner_is_same;
|
||||
struct_.struct_.belongs_to_current_thread =
|
||||
CefTaskRunnerCppToC::CefTaskRunnerCppToC() {
|
||||
GetStruct()->is_same = task_runner_is_same;
|
||||
GetStruct()->belongs_to_current_thread =
|
||||
task_runner_belongs_to_current_thread;
|
||||
struct_.struct_.belongs_to_thread = task_runner_belongs_to_thread;
|
||||
struct_.struct_.post_task = task_runner_post_task;
|
||||
struct_.struct_.post_delayed_task = task_runner_post_delayed_task;
|
||||
GetStruct()->belongs_to_thread = task_runner_belongs_to_thread;
|
||||
GetStruct()->post_task = task_runner_post_task;
|
||||
GetStruct()->post_delayed_task = task_runner_post_delayed_task;
|
||||
}
|
||||
|
||||
template<> CefRefPtr<CefTaskRunner> CefCppToC<CefTaskRunnerCppToC,
|
||||
CefTaskRunner, cef_task_runner_t>::UnwrapDerived(CefWrapperType type,
|
||||
cef_task_runner_t* s) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
@ -151,3 +161,5 @@ template<> base::AtomicRefCount CefCppToC<CefTaskRunnerCppToC, CefTaskRunner,
|
||||
cef_task_runner_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCppToC<CefTaskRunnerCppToC, CefTaskRunner,
|
||||
cef_task_runner_t>::kWrapperType = WT_TASK_RUNNER;
|
||||
|
Reference in New Issue
Block a user