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

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

Issue 18277003: "Reverting 24655" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « tools/dom/idl/dart/dart.idl ('k') | tools/dom/scripts/htmldartgenerator.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
11 import monitored 11 import monitored
12 import os 12 import os
13 import re 13 import re
14 from htmlrenamer import html_interface_renames, typed_array_renames 14 from htmlrenamer import html_interface_renames, renamed_html_members, \
15 typed_array_renames
15 16
16 _pure_interfaces = monitored.Set('generator._pure_interfaces', [ 17 _pure_interfaces = monitored.Set('generator._pure_interfaces', [
17 # TODO(sra): DOMStringMap should be a class implementing Map<String,String>. 18 # TODO(sra): DOMStringMap should be a class implementing Map<String,String>.
18 'DOMStringMap', 19 'DOMStringMap',
19 'ElementTimeControl', 20 'ElementTimeControl',
20 'ElementTraversal', 21 'ElementTraversal',
21 'EventListener', 22 'EventListener',
22 'MediaQueryListListener', 23 'MediaQueryListListener',
23 'MutationCallback', 24 'MutationCallback',
24 'SVGExternalResourcesRequired', 25 'SVGExternalResourcesRequired',
(...skipping 28 matching lines...) Expand all
53 def IsCustomType(interface_name): 54 def IsCustomType(interface_name):
54 return interface_name in _custom_types 55 return interface_name in _custom_types
55 56
56 _methods_with_named_formals = monitored.Set( 57 _methods_with_named_formals = monitored.Set(
57 'generator._methods_with_named_formals', [ 58 'generator._methods_with_named_formals', [
58 'DirectoryEntry.getDirectory', 59 'DirectoryEntry.getDirectory',
59 'DirectoryEntry.getFile', 60 'DirectoryEntry.getFile',
60 'Entry.copyTo', 61 'Entry.copyTo',
61 'Entry.moveTo', 62 'Entry.moveTo',
62 'HTMLInputElement.setRangeText', 63 'HTMLInputElement.setRangeText',
63 'HTMLTextAreaElement.setRangeText',
64 'XMLHttpRequest.open', 64 'XMLHttpRequest.open',
65 ]) 65 ])
66 66
67 # 67 #
68 # Renames for attributes that have names that are not legal Dart names. 68 # Renames for attributes that have names that are not legal Dart names.
69 # 69 #
70 _dart_attribute_renames = monitored.Dict('generator._dart_attribute_renames', { 70 _dart_attribute_renames = monitored.Dict('generator._dart_attribute_renames', {
71 'default': 'defaultValue', 71 'default': 'defaultValue',
72 }) 72 })
73 73
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 type_name, type_data, dart_interface_name, self) 1179 type_name, type_data, dart_interface_name, self)
1180 1180
1181 if type_data.clazz == 'BasicTypedList': 1181 if type_data.clazz == 'BasicTypedList':
1182 dart_interface_name = self._renamer.RenameInterface( 1182 dart_interface_name = self._renamer.RenameInterface(
1183 self._database.GetInterface(type_name)) 1183 self._database.GetInterface(type_name))
1184 return BasicTypedListIDLTypeInfo( 1184 return BasicTypedListIDLTypeInfo(
1185 type_name, type_data, dart_interface_name, self) 1185 type_name, type_data, dart_interface_name, self)
1186 1186
1187 class_name = '%sIDLTypeInfo' % type_data.clazz 1187 class_name = '%sIDLTypeInfo' % type_data.clazz
1188 return globals()[class_name](type_name, type_data) 1188 return globals()[class_name](type_name, type_data)
OLDNEW
« no previous file with comments | « tools/dom/idl/dart/dart.idl ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698