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

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

Issue 14455007: Refactoring DOM annotations and comment generation, adding DOM API triage list (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
« tools/dom/scripts/dartmetadata.py ('K') | « tools/dom/scripts/systemhtml.py ('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 60ab06215c8377f94fc2fec50749f8e09cfb3ace..719180e7101089aaf22ffc03b321657b8dcc76e2 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -25,6 +25,7 @@ class DartiumBackend(HtmlDartGenerator):
self._template_loader = options.templates
self._type_registry = options.type_registry
self._interface_type_info = self._type_registry.TypeInfo(self._interface.id)
+ self._metadata = options.metadata
def ImplementsMergedMembers(self):
# We could not add merged functions to implementation class because
@@ -520,7 +521,7 @@ class DartiumBackend(HtmlDartGenerator):
overload_name, argument_list)
cpp_callback_name = self._GenerateNativeBinding(
overload_name, (0 if operation.is_static else 1) + argument_count,
- dart_declaration, 'Callback', False)
+ dart_declaration, 'Callback', False, False)
self._GenerateOperationNativeCallback(operation, operation.arguments[:argument_count], cpp_callback_name)
self._GenerateDispatcherBody(
@@ -805,18 +806,19 @@ class DartiumBackend(HtmlDartGenerator):
TO_DART_CONVERSION=to_dart_conversion)
def _GenerateNativeBinding(self, idl_name, argument_count, dart_declaration,
- native_suffix, is_custom):
- annotations = FormatAnnotationsAndComments(
- GetAnnotationsAndComments(self._renamer.GetLibraryName(self._interface),
- self._interface.id, idl_name),
- ' ')
+ native_suffix, is_custom, emit_metadata=True):
+ metadata = []
+ if emit_metadata:
+ metadata = self._metadata.GetFormattedMetadata(
+ self._renamer.GetLibraryName(self._interface),
+ self._interface.id, idl_name, ' ')
native_binding = '%s_%s_%s' % (self._interface.id, idl_name, native_suffix)
self._members_emitter.Emit(
'\n'
- ' $ANNOTATIONS$DART_DECLARATION native "$NATIVE_BINDING";\n',
+ ' $METADATA$DART_DECLARATION native "$NATIVE_BINDING";\n',
DOMINTERFACE=self._interface.id,
- ANNOTATIONS=annotations,
+ METADATA=metadata,
DART_DECLARATION=dart_declaration,
NATIVE_BINDING=native_binding)
« tools/dom/scripts/dartmetadata.py ('K') | « tools/dom/scripts/systemhtml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698