Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: tools/dom/scripts/systemnative.py

Issue 298593002: Rename some classes where names changed for 1916 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_blink/dartium/_blink_dartium.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « sdk/lib/_blink/dartium/_blink_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698