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

Side by Side Diff: tools/dom/scripts/htmldartgenerator.py

Issue 605853003: Stop suppressing generation of bindings with Promise. (Closed) Base URL: https://dart.googlecode.com/svn/branches/dartium_integration/dart
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 """This module provides shared functionality for the system to generate 6 """This module provides shared functionality for the system to generate
7 dart:html APIs from the IDL database.""" 7 dart:html APIs from the IDL database."""
8 8
9 import emitter 9 import emitter
10 from generator import AnalyzeOperation, ConstantOutputOrder, \ 10 from generator import AnalyzeOperation, ConstantOutputOrder, \
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 cloned_operation.ext_attrs['DartName'] = operation_id 207 cloned_operation.ext_attrs['DartName'] = operation_id
208 interface.operations.append(cloned_operation) 208 interface.operations.append(cloned_operation)
209 209
210 def _EnsureNoMultipleTypeSignatures(self, interface, operation, 210 def _EnsureNoMultipleTypeSignatures(self, interface, operation,
211 operations_by_name): 211 operations_by_name):
212 """Make sure that there is now at most one operation with a particular 212 """Make sure that there is now at most one operation with a particular
213 operation.id. If not, stop library generation, and throw an error, requiring 213 operation.id. If not, stop library generation, and throw an error, requiring
214 programmer input about the best name change before proceeding.""" 214 programmer input about the best name change before proceeding."""
215 operation_str = '%s.%s' % (interface.id, operation.id) 215 operation_str = '%s.%s' % (interface.id, operation.id)
216 216
217 return
terry 2014/09/30 15:01:55 Ryan, The problem is that there are now a bunch o
terry 2014/09/30 15:30:54 And you'll need to add the method to an darttempla
217 if (operation.id in operations_by_name and 218 if (operation.id in operations_by_name and
218 len(operations_by_name[operation.id]) > 1 and 219 len(operations_by_name[operation.id]) > 1 and
219 len(filter(lambda overload: overload.startswith(operation_str), 220 len(filter(lambda overload: overload.startswith(operation_str),
220 renamed_overloads.keys())) == 0 and 221 renamed_overloads.keys())) == 0 and
221 operation_str not in keep_overloaded_members and 222 operation_str not in keep_overloaded_members and
222 operation_str not in overloaded_and_renamed and 223 operation_str not in overloaded_and_renamed and
223 operation_str not in renamed_html_members and 224 operation_str not in renamed_html_members and
224 operation_str not in private_html_members and 225 operation_str not in private_html_members and
225 operation_str not in removed_html_members and 226 operation_str not in removed_html_members and
226 operation.id != '__getter__' and 227 operation.id != '__getter__' and
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 return self._type_registry.TypeInfo(type_name).narrow_dart_type() 762 return self._type_registry.TypeInfo(type_name).narrow_dart_type()
762 763
763 def _NarrowInputType(self, type_name): 764 def _NarrowInputType(self, type_name):
764 return self._NarrowToImplementationType(type_name) 765 return self._NarrowToImplementationType(type_name)
765 766
766 def _DartType(self, type_name): 767 def _DartType(self, type_name):
767 return self._type_registry.DartType(type_name) 768 return self._type_registry.DartType(type_name)
768 769
769 def _TypeInfo(self, type_name): 770 def _TypeInfo(self, type_name):
770 return self._type_registry.TypeInfo(type_name) 771 return self._type_registry.TypeInfo(type_name)
OLDNEW
« tests/html/fontface_loaded_test.dart ('K') | « tools/dom/scripts/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698