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

Side by Side Diff: client/dom/scripts/dartdomgenerator.py

Issue 9432024: Do not rename idl types to dart types at top level - this info is needed for native bindings genera… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update html frog system. Created 8 years, 10 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 | « no previous file | client/dom/scripts/dartgenerator.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) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, 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 is the entry point to create Dart APIs from the IDL database.""" 6 """This is the entry point to create Dart APIs from the IDL database."""
7 7
8 import dartgenerator 8 import dartgenerator
9 import database 9 import database
10 import logging.config 10 import logging.config
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 generator.RenameTypes(common_database, { 92 generator.RenameTypes(common_database, {
93 # W3C -> Dart renames 93 # W3C -> Dart renames
94 'AbstractView': 'Window', 94 'AbstractView': 'Window',
95 'Function': 'EventListener', 95 'Function': 'EventListener',
96 'DOMStringMap': 'Map<String, String>', 96 'DOMStringMap': 'Map<String, String>',
97 'DOMStringList': 'List<String>', 97 'DOMStringList': 'List<String>',
98 }, False) 98 }, False)
99 generator.FilterMembersWithUnidentifiedTypes(common_database) 99 generator.FilterMembersWithUnidentifiedTypes(common_database)
100 webkit_database = common_database.Clone() 100 webkit_database = common_database.Clone()
101 # FIXME: get rid of _original_idl_types map in dartgenerator.py and
102 # call ConvertToDartTypes before cloning.
103 generator.ConvertToDartTypes(common_database)
104 generator.ConvertToDartTypes(webkit_database)
105 101
106 generated_output_dir = os.path.join(output_dir, 102 generated_output_dir = os.path.join(output_dir,
107 '../html/generated' if generate_html_systems else 'generated') 103 '../html/generated' if generate_html_systems else 'generated')
108 if os.path.exists(generated_output_dir): 104 if os.path.exists(generated_output_dir):
109 _logger.info('Cleaning output directory %s' % generated_output_dir) 105 _logger.info('Cleaning output directory %s' % generated_output_dir)
110 shutil.rmtree(generated_output_dir) 106 shutil.rmtree(generated_output_dir)
111 107
112 108
113 # Generate Dart interfaces for the WebKit DOM. 109 # Generate Dart interfaces for the WebKit DOM.
114 webkit_output_dir = generated_output_dir 110 webkit_output_dir = generated_output_dir
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 # Copy dummy DOM where dartc build expects it. 184 # Copy dummy DOM where dartc build expects it.
189 if 'dummy' in systems: 185 if 'dummy' in systems:
190 # TODO(sra): Make other tools pick this up directly, or do a copy_dart into 186 # TODO(sra): Make other tools pick this up directly, or do a copy_dart into
191 # a specific directory. 187 # a specific directory.
192 source = os.path.join(output_dir, 'dom_dummy.dart') 188 source = os.path.join(output_dir, 'dom_dummy.dart')
193 target = os.path.join(output_dir, 'dom.dart') 189 target = os.path.join(output_dir, 'dom.dart')
194 shutil.copyfile(source, target) 190 shutil.copyfile(source, target)
195 191
196 if __name__ == '__main__': 192 if __name__ == '__main__':
197 sys.exit(main()) 193 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | client/dom/scripts/dartgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698