| Index: tools/dom/scripts/systemnative.py
|
| diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
|
| index 603ec4b81ade095617310ab569210b5be2188acf..0a8570d9c09c8fa99f5c5f3439681dc96ed10f75 100644
|
| --- a/tools/dom/scripts/systemnative.py
|
| +++ b/tools/dom/scripts/systemnative.py
|
| @@ -143,6 +143,12 @@ _cpp_overloaded_callback_map = {
|
| ('DOMURL', '_createObjectURL_3Callback'): 'URLMediaStream',
|
| }
|
|
|
| +_blink_1916_rename_map = {
|
| + 'NavigatorID': 'Navigator',
|
| + 'Clipboard': 'DataTransfer',
|
| + 'Player': 'AnimationPlayer',
|
| +}
|
| +
|
| _cpp_partial_map = {}
|
|
|
| _cpp_no_auto_scope_list = set([
|
| @@ -308,6 +314,11 @@ def array_type(data_type):
|
| return None
|
| return matched.group(1)
|
|
|
| +def TypeIdToBlinkName(interface_id):
|
| + if interface_id in _blink_1916_rename_map:
|
| + interface_id = _blink_1916_rename_map[interface_id]
|
| + return interface_id
|
| +
|
| def _GetCPPTypeName(interface_name, callback_name, cpp_name):
|
| # TODO(vsm): We need to track the original IDL file name in order to recover
|
| # the proper CPP name.
|
| @@ -332,11 +343,11 @@ def DeriveNativeName(interface_name, name, suffix):
|
|
|
| def DeriveResolverString(interface_id, operation_id, native_suffix, type_ids):
|
| type_string = \
|
| - "_".join(type_ids)
|
| + "_".join(map(TypeIdToBlinkName, type_ids))
|
| if native_suffix:
|
| operation_id = "%s_%s" % (operation_id, native_suffix)
|
| components = \
|
| - [interface_id, operation_id,
|
| + [TypeIdToBlinkName(interface_id), operation_id,
|
| "RESOLVER_STRING", str(len(type_ids)), type_string]
|
| return "_".join(components)
|
|
|
| @@ -1652,8 +1663,11 @@ class DartiumBackend(HtmlDartGenerator):
|
| if (resolver_string):
|
| native_binding = resolver_string
|
| else:
|
| + native_binding_id = self._interface.id
|
| + if self._dart_use_blink:
|
| + native_binding_id = TypeIdToBlinkName(native_binding_id)
|
| native_binding = \
|
| - '%s_%s_%s' % (self._interface.id, idl_name, native_suffix)
|
| + '%s_%s_%s' % (native_binding_id, idl_name, native_suffix)
|
|
|
| if self._dart_use_blink:
|
| if not static:
|
|
|