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

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

Issue 569783002: Migrate to Chrome 37 IDL (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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/databasebuilder.py ('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 custom_html_constructors, html_interface_renames, \ 14 from htmlrenamer import custom_html_constructors, html_interface_renames, \
15 typed_array_renames 15 typed_array_renames
16 16
17 _pure_interfaces = monitored.Set('generator._pure_interfaces', [ 17 _pure_interfaces = monitored.Set('generator._pure_interfaces', [
18 # TODO(sra): DOMStringMap should be a class implementing Map<String,String>. 18 # TODO(sra): DOMStringMap should be a class implementing Map<String,String>.
19 'DOMStringMap', 19 'DOMStringMap',
20 'CanvasPathMethods',
20 'ChildNode', 21 'ChildNode',
21 'EventListener', 22 'EventListener',
22 'GlobalEventHandlers', 23 'GlobalEventHandlers',
23 'MediaQueryListListener', 24 'MediaQueryListListener',
24 'MutationCallback', 25 'MutationCallback',
25 'NavigatorID', 26 'NavigatorID',
26 'NavigatorOnLine', 27 'NavigatorOnLine',
27 'ParentNode', 28 'ParentNode',
28 'SVGExternalResourcesRequired', 29 'SVGExternalResourcesRequired',
29 'SVGFilterPrimitiveStandardAttributes', 30 'SVGFilterPrimitiveStandardAttributes',
30 'SVGFitToViewBox', 31 'SVGFitToViewBox',
31 'SVGTests', 32 'SVGTests',
32 'SVGURIReference', 33 'SVGURIReference',
33 'SVGZoomAndPan', 34 'SVGZoomAndPan',
34 'TimeoutHandler', 35 'TimeoutHandler',
35 'URLUtils', 36 'URLUtils',
36 'URLUtilsReadOnly', 37 'URLUtilsReadOnly',
38 'WebGLRenderingContextBase',
37 'WindowBase64', 39 'WindowBase64',
38 'WindowEventHandlers', 40 'WindowEventHandlers',
39 'WindowTimers', 41 'WindowTimers',
40 ]) 42 ])
41 43
42 def IsPureInterface(interface_name): 44 def IsPureInterface(interface_name):
43 return interface_name in _pure_interfaces 45 return interface_name in _pure_interfaces
44 46
45 # 47 #
46 # Classes which have native constructors but which we are suppressing because 48 # Classes which have native constructors but which we are suppressing because
(...skipping 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 if type_data.clazz == 'BasicTypedList': 1323 if type_data.clazz == 'BasicTypedList':
1322 if type_name == 'ArrayBuffer': 1324 if type_name == 'ArrayBuffer':
1323 dart_interface_name = 'ByteBuffer' 1325 dart_interface_name = 'ByteBuffer'
1324 else: 1326 else:
1325 dart_interface_name = self._renamer.RenameInterfaceId(type_name) 1327 dart_interface_name = self._renamer.RenameInterfaceId(type_name)
1326 return BasicTypedListIDLTypeInfo( 1328 return BasicTypedListIDLTypeInfo(
1327 type_name, type_data, dart_interface_name, self) 1329 type_name, type_data, dart_interface_name, self)
1328 1330
1329 class_name = '%sIDLTypeInfo' % type_data.clazz 1331 class_name = '%sIDLTypeInfo' % type_data.clazz
1330 return globals()[class_name](type_name, type_data) 1332 return globals()[class_name](type_name, type_data)
OLDNEW
« no previous file with comments | « tools/dom/scripts/databasebuilder.py ('k') | tools/dom/scripts/htmldartgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698