mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Rename CefBase to CefBaseRefCounted (issue #2090)
This commit is contained in:
@@ -98,7 +98,7 @@ def is_base_class(clsname):
|
||||
""" Returns true if |clsname| is a known base (root) class in the object
|
||||
hierarchy.
|
||||
"""
|
||||
return clsname == 'CefBase' or clsname == 'CefBaseScoped'
|
||||
return clsname == 'CefBaseRefCounted' or clsname == 'CefBaseScoped'
|
||||
|
||||
def get_capi_file_name(cppname):
|
||||
""" Convert a C++ header file name to a C API header file name. """
|
||||
@@ -715,7 +715,7 @@ class obj_header:
|
||||
|
||||
def get_defined_structs(self):
|
||||
""" Return a list of already defined structure names. """
|
||||
return ['cef_print_info_t', 'cef_window_info_t', 'cef_base_t', 'cef_base_scoped_t']
|
||||
return ['cef_print_info_t', 'cef_window_info_t', 'cef_base_ref_counted_t', 'cef_base_scoped_t']
|
||||
|
||||
def get_capi_translations(self):
|
||||
""" Return a dictionary that maps C++ terminology to C API terminology.
|
||||
|
@@ -54,11 +54,11 @@ def make_cpptoc_header(header, clsname):
|
||||
base_class_name = header.get_base_class_name(clsname)
|
||||
base_scoped = True if base_class_name == 'CefBaseScoped' else False
|
||||
if base_scoped:
|
||||
template_file = 'cpptoc_scoped.h'
|
||||
template_class = 'CefCppToCScoped'
|
||||
template_file = 'cpptoc_scoped.h'
|
||||
template_class = 'CefCppToCScoped'
|
||||
else:
|
||||
template_file = 'cpptoc.h'
|
||||
template_class = 'CefCppToC'
|
||||
template_file = 'cpptoc_ref_counted.h'
|
||||
template_class = 'CefCppToCRefCounted'
|
||||
|
||||
result += '#include "libcef_dll/cpptoc/' + template_file + '"'
|
||||
result += '\n\n// Wrap a C++ class with a C structure.\n'
|
||||
|
@@ -571,7 +571,7 @@ def make_cpptoc_class_impl(header, clsname, impl):
|
||||
if base_scoped:
|
||||
template_class = 'CefCppToCScoped'
|
||||
else:
|
||||
template_class = 'CefCppToC'
|
||||
template_class = 'CefCppToCRefCounted'
|
||||
|
||||
# generate virtual functions
|
||||
virtualimpl = make_cpptoc_virtual_function_impl(header, cls, existing, prefixname, defined_names)
|
||||
|
@@ -95,11 +95,11 @@ def make_ctocpp_header(header, clsname):
|
||||
base_class_name = header.get_base_class_name(clsname)
|
||||
base_scoped = True if base_class_name == 'CefBaseScoped' else False
|
||||
if base_scoped:
|
||||
template_file = 'ctocpp_scoped.h'
|
||||
template_class = 'CefCToCppScoped'
|
||||
template_file = 'ctocpp_scoped.h'
|
||||
template_class = 'CefCToCppScoped'
|
||||
else:
|
||||
template_file = 'ctocpp.h'
|
||||
template_class = 'CefCToCpp'
|
||||
template_file = 'ctocpp_ref_counted.h'
|
||||
template_class = 'CefCToCppRefCounted'
|
||||
|
||||
result += '#include "libcef_dll/ctocpp/' + template_file + '"'
|
||||
result += '\n\n// Wrap a C structure with a C++ class.\n'
|
||||
|
@@ -576,7 +576,7 @@ def make_ctocpp_class_impl(header, clsname, impl):
|
||||
if base_scoped:
|
||||
template_class = 'CefCToCppScoped'
|
||||
else:
|
||||
template_class = 'CefCToCpp'
|
||||
template_class = 'CefCToCppRefCounted'
|
||||
|
||||
# generate virtual functions
|
||||
virtualimpl = make_ctocpp_virtual_function_impl(header, cls, existing)
|
||||
|
@@ -11,7 +11,8 @@ def make_wrapper_types_header(header):
|
||||
'#define CEF_LIBCEF_DLL_WRAPPER_TYPES_H_\n' + \
|
||||
'#pragma once\n\n' + \
|
||||
'enum CefWrapperType {\n' + \
|
||||
' WT_BASE = 1,\n'
|
||||
' WT_BASE_REF_COUNTED = 1,\n' + \
|
||||
' WT_BASE_SCOPED,\n'
|
||||
|
||||
clsnames = sorted(header.get_class_names())
|
||||
for clsname in clsnames:
|
||||
|
Reference in New Issue
Block a user