| OLD | NEW |
| 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 fremontcutbuilder | 10 import fremontcutbuilder |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 from systemhtml import DartLibraryEmitter, Dart2JSBackend,\ | 22 from systemhtml import DartLibraryEmitter, Dart2JSBackend,\ |
| 23 HtmlDartInterfaceGenerator, DartLibrary, DartLibraries | 23 HtmlDartInterfaceGenerator, DartLibrary, DartLibraries |
| 24 from systemnative import CPPLibraryEmitter, DartiumBackend | 24 from systemnative import CPPLibraryEmitter, DartiumBackend |
| 25 from templateloader import TemplateLoader | 25 from templateloader import TemplateLoader |
| 26 | 26 |
| 27 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..')) | 27 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..')) |
| 28 import utils | 28 import utils |
| 29 | 29 |
| 30 _logger = logging.getLogger('dartdomgenerator') | 30 _logger = logging.getLogger('dartdomgenerator') |
| 31 | 31 |
| 32 _libraries = ['html', 'indexed_db', 'svg', 'web_audio'] | 32 _libraries = ['chrome', 'html', 'indexed_db', 'svg', 'web_audio'] |
| 33 | 33 |
| 34 class GeneratorOptions(object): | 34 class GeneratorOptions(object): |
| 35 def __init__(self, templates, database, type_registry, renamer): | 35 def __init__(self, templates, database, type_registry, renamer): |
| 36 self.templates = templates | 36 self.templates = templates |
| 37 self.database = database | 37 self.database = database |
| 38 self.type_registry = type_registry | 38 self.type_registry = type_registry |
| 39 self.renamer = renamer | 39 self.renamer = renamer |
| 40 | 40 |
| 41 # TODO(vsm): Remove once we fix Dartium to pass in the database directly. | 41 # TODO(vsm): Remove once we fix Dartium to pass in the database directly. |
| 42 def Generate(database_dir, use_database_cache, dart2js_output_dir=None, | 42 def Generate(database_dir, use_database_cache, dart2js_output_dir=None, |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dart2js')) | 206 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dart2js')) |
| 207 if 'htmldartium' in systems: | 207 if 'htmldartium' in systems: |
| 208 _logger.info('Generating dartium single files.') | 208 _logger.info('Generating dartium single files.') |
| 209 for library_name in _libraries: | 209 for library_name in _libraries: |
| 210 GenerateSingleFile( | 210 GenerateSingleFile( |
| 211 os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name), | 211 os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name), |
| 212 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium')) | 212 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium')) |
| 213 | 213 |
| 214 if __name__ == '__main__': | 214 if __name__ == '__main__': |
| 215 sys.exit(main()) | 215 sys.exit(main()) |
| OLD | NEW |