| 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 |
| 11 import logging.config | 11 import logging.config |
| 12 import multiemitter | 12 import multiemitter |
| 13 import optparse | 13 import optparse |
| 14 import os | 14 import os |
| 15 import shutil | 15 import shutil |
| 16 import subprocess | 16 import subprocess |
| 17 import sys | 17 import sys |
| 18 from generator import TypeRegistry | 18 from generator import TypeRegistry |
| 19 from htmlrenamer import HtmlRenamer | 19 from htmlrenamer import HtmlRenamer |
| 20 from systembase import GeneratorOptions | 20 from systembase import GeneratorOptions |
| 21 from systemdart2js import Dart2JSSystem | |
| 22 from systemhtml import DartLibraryEmitter, HtmlInterfacesSystem,\ | 21 from systemhtml import DartLibraryEmitter, HtmlInterfacesSystem,\ |
| 23 Dart2JSBackend | 22 Dart2JSBackend |
| 24 from systeminterface import InterfacesSystem | |
| 25 from systemnative import CPPLibraryEmitter, DartiumBackend | 23 from systemnative import CPPLibraryEmitter, DartiumBackend |
| 26 from templateloader import TemplateLoader | 24 from templateloader import TemplateLoader |
| 27 | 25 |
| 28 _logger = logging.getLogger('dartdomgenerator') | 26 _logger = logging.getLogger('dartdomgenerator') |
| 29 | 27 |
| 30 _webkit_renames = { | 28 _webkit_renames = { |
| 31 # W3C -> WebKit name conversion | 29 # W3C -> WebKit name conversion |
| 32 # TODO(vsm): Maybe Store these renames in the IDLs. | 30 # TODO(vsm): Maybe Store these renames in the IDLs. |
| 33 'ApplicationCache': 'DOMApplicationCache', | 31 'ApplicationCache': 'DOMApplicationCache', |
| 34 'BarProp': 'BarInfo', | 32 'BarProp': 'BarInfo', |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 _logger.info('Copy html_dart2js to dart2js/') | 186 _logger.info('Copy html_dart2js to dart2js/') |
| 189 GenerateSingleFile(os.path.join(dart2js_output_dir, 'html_dart2js.dart'), | 187 GenerateSingleFile(os.path.join(dart2js_output_dir, 'html_dart2js.dart'), |
| 190 '../dart2js') | 188 '../dart2js') |
| 191 if 'htmldartium' in systems: | 189 if 'htmldartium' in systems: |
| 192 _logger.info('Copy html_dartium to dartium/') | 190 _logger.info('Copy html_dartium to dartium/') |
| 193 GenerateSingleFile(os.path.join(dartium_output_dir, 'html_dartium.dart'), | 191 GenerateSingleFile(os.path.join(dartium_output_dir, 'html_dartium.dart'), |
| 194 '../dartium') | 192 '../dartium') |
| 195 | 193 |
| 196 if __name__ == '__main__': | 194 if __name__ == '__main__': |
| 197 sys.exit(main()) | 195 sys.exit(main()) |
| OLD | NEW |