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

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

Issue 22352004: Regenerating DOM types from IDL roll. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « tools/dom/scripts/dartmetadata.py ('k') | tools/dom/scripts/htmleventgenerator.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, typed_array_renames
15 15
16 _pure_interfaces = monitored.Set('generator._pure_interfaces', [ 16 _pure_interfaces = monitored.Set('generator._pure_interfaces', [
17 # TODO(sra): DOMStringMap should be a class implementing Map<String,String>. 17 # TODO(sra): DOMStringMap should be a class implementing Map<String,String>.
18 'DOMStringMap', 18 'DOMStringMap',
19 'ChildNode', 19 'ChildNode',
20 'ElementTimeControl',
21 'EventListener', 20 'EventListener',
22 'FileException',
23 'MediaQueryListListener', 21 'MediaQueryListListener',
24 'MutationCallback', 22 'MutationCallback',
25 'ParentNode', 23 'ParentNode',
26 'SVGExternalResourcesRequired', 24 'SVGExternalResourcesRequired',
27 'SVGFilterPrimitiveStandardAttributes', 25 'SVGFilterPrimitiveStandardAttributes',
28 'SVGFitToViewBox', 26 'SVGFitToViewBox',
29 'SVGLangSpace',
30 'SVGLocatable',
31 'SVGTests', 27 'SVGTests',
32 'SVGTransformable',
33 'SVGURIReference', 28 'SVGURIReference',
34 'SVGZoomAndPan', 29 'SVGZoomAndPan',
35 'TimeoutHandler', 30 'TimeoutHandler',
36 'WindowBase64', 31 'WindowBase64',
37 'WindowTimers', 32 'WindowTimers',
38 ]) 33 ])
39 34
40 def IsPureInterface(interface_name): 35 def IsPureInterface(interface_name):
41 return interface_name in _pure_interfaces 36 return interface_name in _pure_interfaces
42 37
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 if type_name == 'ArrayBuffer': 1190 if type_name == 'ArrayBuffer':
1196 dart_interface_name = 'ByteBuffer' 1191 dart_interface_name = 'ByteBuffer'
1197 else: 1192 else:
1198 dart_interface_name = self._renamer.RenameInterface( 1193 dart_interface_name = self._renamer.RenameInterface(
1199 self._database.GetInterface(type_name)) 1194 self._database.GetInterface(type_name))
1200 return BasicTypedListIDLTypeInfo( 1195 return BasicTypedListIDLTypeInfo(
1201 type_name, type_data, dart_interface_name, self) 1196 type_name, type_data, dart_interface_name, self)
1202 1197
1203 class_name = '%sIDLTypeInfo' % type_data.clazz 1198 class_name = '%sIDLTypeInfo' % type_data.clazz
1204 return globals()[class_name](type_name, type_data) 1199 return globals()[class_name](type_name, type_data)
OLDNEW
« no previous file with comments | « tools/dom/scripts/dartmetadata.py ('k') | tools/dom/scripts/htmleventgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698