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

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

Issue 23151005: Move _HTMLElement to HtmlElement (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regen dart:html Created 7 years, 4 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
« no previous file with comments | « tests/html/element_types_test.dart ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 systems to generate 6 """This module provides shared functionality for systems to generate
7 Dart APIs from the IDL database.""" 7 Dart APIs from the IDL database."""
8 8
9 import copy 9 import copy
10 import json 10 import json
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 return self.dart_type() 729 return self.dart_type()
730 if IsPureInterface(self.idl_type()): 730 if IsPureInterface(self.idl_type()):
731 return self.idl_type() 731 return self.idl_type()
732 return self.interface_name() 732 return self.interface_name()
733 733
734 def interface_name(self): 734 def interface_name(self):
735 return self._dart_interface_name 735 return self._dart_interface_name
736 736
737 def implementation_name(self): 737 def implementation_name(self):
738 implementation_name = self._dart_interface_name 738 implementation_name = self._dart_interface_name
739 if self.merged_into():
740 return '_%s' % self.idl_type()
741 739
742 if not self.has_generated_interface(): 740 if not self.has_generated_interface():
743 implementation_name = '_%s' % implementation_name 741 implementation_name = '_%s' % implementation_name
744 742
745 return implementation_name 743 return implementation_name
746 744
747 def native_type(self): 745 def native_type(self):
748 database = self._type_registry._database 746 database = self._type_registry._database
749 747
750 if database.HasInterface(self.idl_type()): 748 if database.HasInterface(self.idl_type()):
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 if type_name == 'ArrayBuffer': 1188 if type_name == 'ArrayBuffer':
1191 dart_interface_name = 'ByteBuffer' 1189 dart_interface_name = 'ByteBuffer'
1192 else: 1190 else:
1193 dart_interface_name = self._renamer.RenameInterface( 1191 dart_interface_name = self._renamer.RenameInterface(
1194 self._database.GetInterface(type_name)) 1192 self._database.GetInterface(type_name))
1195 return BasicTypedListIDLTypeInfo( 1193 return BasicTypedListIDLTypeInfo(
1196 type_name, type_data, dart_interface_name, self) 1194 type_name, type_data, dart_interface_name, self)
1197 1195
1198 class_name = '%sIDLTypeInfo' % type_data.clazz 1196 class_name = '%sIDLTypeInfo' % type_data.clazz
1199 return globals()[class_name](type_name, type_data) 1197 return globals()[class_name](type_name, type_data)
OLDNEW
« no previous file with comments | « tests/html/element_types_test.dart ('k') | tools/dom/scripts/htmlrenamer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698