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

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

Issue 10704096: Extract common FactoryProviders generation logic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | lib/dom/scripts/systemhtml.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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 ['html/frog', 'html/impl', 'html', ''], 76 ['html/frog', 'html/impl', 'html', ''],
77 {'DARTIUM': False, 'FROG': True}), 77 {'DARTIUM': False, 'FROG': True}),
78 webkit_database, emitters, output_dir) 78 webkit_database, emitters, output_dir)
79 else: 79 else:
80 backend = NativeImplementationSystem( 80 backend = NativeImplementationSystem(
81 TemplateLoader(template_dir, ['dom/native', 'html/dartium', 81 TemplateLoader(template_dir, ['dom/native', 'html/dartium',
82 'html/impl', ''], 82 'html/impl', ''],
83 {'DARTIUM': True, 'FROG': False}), 83 {'DARTIUM': True, 'FROG': False}),
84 webkit_database, emitters, output_dir, auxiliary_dir) 84 webkit_database, emitters, output_dir, auxiliary_dir)
85 html_system = HtmlInterfacesSystem( 85 html_system = HtmlInterfacesSystem(
86 TemplateLoader(template_dir, ['html/interface', 'html', '']), 86 TemplateLoader(template_dir, ['html/interface', 'html/impl', 'html',
87 '']),
87 webkit_database, emitters, output_dir, backend) 88 webkit_database, emitters, output_dir, backend)
88 Generate(html_system) 89 Generate(html_system)
89 else: 90 else:
90 output_dir = dom_output_dir 91 output_dir = dom_output_dir
91 interface_system = InterfacesSystem( 92 interface_system = InterfacesSystem(
92 TemplateLoader(template_dir, ['dom/interface', 'dom', '']), 93 TemplateLoader(template_dir, ['dom/interface', 'dom', '']),
93 webkit_database, emitters, output_dir) 94 webkit_database, emitters, output_dir)
94 if system_name == 'dummy': 95 if system_name == 'dummy':
95 implementation_system = dartgenerator.DummyImplementationSystem( 96 implementation_system = dartgenerator.DummyImplementationSystem(
96 TemplateLoader(template_dir, ['dom/dummy', 'dom', '']), 97 TemplateLoader(template_dir, ['dom/dummy', 'dom', '']),
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 dom_output_dir = options.output_dir or os.path.join(current_dir, 165 dom_output_dir = options.output_dir or os.path.join(current_dir,
165 '../generated') 166 '../generated')
166 html_output_dir = options.output_dir or os.path.join(current_dir, 167 html_output_dir = options.output_dir or os.path.join(current_dir,
167 '../../html/generated') 168 '../../html/generated')
168 Generate(systems, database_dir, options.use_database_cache, 169 Generate(systems, database_dir, options.use_database_cache,
169 dom_output_dir, html_output_dir) 170 dom_output_dir, html_output_dir)
170 GenerateSingleFile(systems) 171 GenerateSingleFile(systems)
171 172
172 if __name__ == '__main__': 173 if __name__ == '__main__':
173 sys.exit(main()) 174 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | lib/dom/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698