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

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

Issue 11887006: Changed @domName annotation in comment to full fledge @DomName annotation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 11 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/web_audio/dartium/web_audio_dartium.dart ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/generator.py
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index d1d8cd9c011774286f00c63927c5c959468dc87d..768b7e2cd7e9639afcb9d1136154a4be63f01bec 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -718,9 +718,15 @@ def FindCommonAnnotations(interface_name, member_name=None):
""" Finds annotations common between dart2js and dartium.
"""
if member_name:
- return dart_annotations.get('%s.%s' % (interface_name, member_name))
+ key = '%s.%s' % (interface_name, member_name)
else:
- return dart_annotations.get(interface_name)
+ key = interface_name
+
+ annotations = ["@DomName('" + key + "')"]
+ if (dart_annotations.get(key) != None):
+ annotations.extend(dart_annotations.get(key))
+
+ return annotations
def FindDart2JSAnnotations(idl_type, interface_name, member_name):
""" Finds all annotations for Dart2JS members- including annotations for
@@ -738,6 +744,13 @@ def FindDart2JSAnnotations(idl_type, interface_name, member_name):
annotations = ann2
return annotations
+def AnyConversionAnnotations(idl_type, interface_name, member_name):
+ if (dart_annotations.get('%s.%s' % (interface_name, member_name)) or
+ _FindDart2JSSpecificAnnotations(idl_type, interface_name, member_name)):
+ return True
+ else:
+ return False
+
def _FindDart2JSSpecificAnnotations(idl_type, interface_name, member_name):
""" Finds dart2js-specific annotations. This does not include ones shared with
dartium.
« no previous file with comments | « sdk/lib/web_audio/dartium/web_audio_dartium.dart ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698