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

Side by Side Diff: lib/html/scripts/generator.py

Issue 11140043: Replace DOMStringList with List<String>. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 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 re 10 import re
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 'SerializedScriptValue': TypeData(clazz='Primitive', dart_type='Dynamic'), 997 'SerializedScriptValue': TypeData(clazz='Primitive', dart_type='Dynamic'),
998 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool} 998 # TODO(sra): Flags is really a dictionary: {create:bool, exclusive:bool}
999 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce 999 # http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#the-flags-interfa ce
1000 'WebKitFlags': TypeData(clazz='Primitive', dart_type='Object'), 1000 'WebKitFlags': TypeData(clazz='Primitive', dart_type='Object'),
1001 1001
1002 'sequence': TypeData(clazz='Primitive', dart_type='List'), 1002 'sequence': TypeData(clazz='Primitive', dart_type='List'),
1003 'void': TypeData(clazz='Primitive', dart_type='void'), 1003 'void': TypeData(clazz='Primitive', dart_type='void'),
1004 1004
1005 'CSSRule': TypeData(clazz='Interface', conversion_includes=['CSSImportRule'] ), 1005 'CSSRule': TypeData(clazz='Interface', conversion_includes=['CSSImportRule'] ),
1006 'DOMException': TypeData(clazz='Interface', native_type='DOMCoreException'), 1006 'DOMException': TypeData(clazz='Interface', native_type='DOMCoreException'),
1007 'DOMStringList': TypeData(clazz='Interface', dart_type='List<String>', custo m_to_native=True),
1008 'DOMStringMap': TypeData(clazz='Interface', dart_type='Map<String, String>') , 1007 'DOMStringMap': TypeData(clazz='Interface', dart_type='Map<String, String>') ,
1009 'DOMWindow': TypeData(clazz='Interface', custom_to_dart=True), 1008 'DOMWindow': TypeData(clazz='Interface', custom_to_dart=True),
1010 'Document': TypeData(clazz='Interface', merged_interface='HTMLDocument'), 1009 'Document': TypeData(clazz='Interface', merged_interface='HTMLDocument'),
1011 'Element': TypeData(clazz='Interface', merged_interface='HTMLElement', 1010 'Element': TypeData(clazz='Interface', merged_interface='HTMLElement',
1012 custom_to_dart=True), 1011 custom_to_dart=True),
1013 'EventListener': TypeData(clazz='Interface', custom_to_native=True), 1012 'EventListener': TypeData(clazz='Interface', custom_to_native=True),
1014 'EventTarget': TypeData(clazz='Interface', custom_to_native=True), 1013 'EventTarget': TypeData(clazz='Interface', custom_to_native=True),
1015 'HTMLDocument': TypeData(clazz='Interface', merged_into='Document'), 1014 'HTMLDocument': TypeData(clazz='Interface', merged_into='Document'),
1016 'HTMLElement': TypeData(clazz='Interface', merged_into='Element', 1015 'HTMLElement': TypeData(clazz='Interface', merged_into='Element',
1017 custom_to_dart=True), 1016 custom_to_dart=True),
1018 'IDBAny': TypeData(clazz='Interface', dart_type='Dynamic', custom_to_native= True), 1017 'IDBAny': TypeData(clazz='Interface', dart_type='Dynamic', custom_to_native= True),
1019 'IDBKey': TypeData(clazz='Interface', dart_type='Dynamic', custom_to_native= True), 1018 'IDBKey': TypeData(clazz='Interface', dart_type='Dynamic', custom_to_native= True),
1020 'MutationRecordArray': TypeData(clazz='Interface', # C++ pass by pointer. 1019 'MutationRecordArray': TypeData(clazz='Interface', # C++ pass by pointer.
1021 native_type='MutationRecordArray', dart_type='List<MutationRecord>'), 1020 native_type='MutationRecordArray', dart_type='List<MutationRecord>'),
1022 'StyleSheet': TypeData(clazz='Interface', conversion_includes=['CSSStyleShee t']), 1021 'StyleSheet': TypeData(clazz='Interface', conversion_includes=['CSSStyleShee t']),
1023 'SVGElement': TypeData(clazz='Interface', custom_to_dart=True), 1022 'SVGElement': TypeData(clazz='Interface', custom_to_dart=True),
1024 1023
1025 'ClientRectList': TypeData(clazz='ListLike', item_type='ClientRect'), 1024 'ClientRectList': TypeData(clazz='ListLike', item_type='ClientRect'),
1026 'CSSRuleList': TypeData(clazz='ListLike', item_type='CSSRule'), 1025 'CSSRuleList': TypeData(clazz='ListLike', item_type='CSSRule'),
1027 'CSSValueList': TypeData(clazz='ListLike', item_type='CSSValue'), 1026 'CSSValueList': TypeData(clazz='ListLike', item_type='CSSValue'),
1027 'DOMStringList': TypeData(clazz='ListLike', item_type='DOMString',
1028 custom_to_native=True),
1028 'EntryArray': TypeData(clazz='ListLike', item_type='Entry'), 1029 'EntryArray': TypeData(clazz='ListLike', item_type='Entry'),
1029 'EntryArraySync': TypeData(clazz='ListLike', item_type='EntrySync'), 1030 'EntryArraySync': TypeData(clazz='ListLike', item_type='EntrySync'),
1030 'FileList': TypeData(clazz='ListLike', item_type='File'), 1031 'FileList': TypeData(clazz='ListLike', item_type='File'),
1031 'GamepadList': TypeData(clazz='ListLike', item_type='Gamepad'), 1032 'GamepadList': TypeData(clazz='ListLike', item_type='Gamepad'),
1032 'MediaStreamList': TypeData(clazz='ListLike', item_type='MediaStream'), 1033 'MediaStreamList': TypeData(clazz='ListLike', item_type='MediaStream'),
1033 'NodeList': TypeData(clazz='ListLike', item_type='Node'), 1034 'NodeList': TypeData(clazz='ListLike', item_type='Node'),
1034 'SVGElementInstanceList': TypeData(clazz='ListLike', 1035 'SVGElementInstanceList': TypeData(clazz='ListLike',
1035 item_type='SVGElementInstance'), 1036 item_type='SVGElementInstance'),
1036 'SpeechInputResultList': TypeData(clazz='ListLike', 1037 'SpeechInputResultList': TypeData(clazz='ListLike',
1037 item_type='SpeechInputResult'), 1038 item_type='SpeechInputResult'),
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 self._database.GetInterface(type_name)) 1106 self._database.GetInterface(type_name))
1106 else: 1107 else:
1107 dart_interface_name = type_name 1108 dart_interface_name = type_name
1108 return InterfaceIDLTypeInfo(type_name, type_data, dart_interface_name) 1109 return InterfaceIDLTypeInfo(type_name, type_data, dart_interface_name)
1109 1110
1110 if type_data.clazz == 'ListLike': 1111 if type_data.clazz == 'ListLike':
1111 return ListLikeIDLTypeInfo(type_name, type_data, self.TypeInfo(type_data.i tem_type)) 1112 return ListLikeIDLTypeInfo(type_name, type_data, self.TypeInfo(type_data.i tem_type))
1112 1113
1113 class_name = '%sIDLTypeInfo' % type_data.clazz 1114 class_name = '%sIDLTypeInfo' % type_data.clazz
1114 return globals()[class_name](type_name, type_data) 1115 return globals()[class_name](type_name, type_data)
OLDNEW
« no previous file with comments | « lib/html/dartium/html_dartium.dart ('k') | lib/html/templates/html/dart2js/impl_IDBDatabase.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698