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

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

Issue 10332144: Move html events generation to domimpl. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 8 years, 7 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/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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 generator.FilterMembersWithUnidentifiedTypes(common_database) 89 generator.FilterMembersWithUnidentifiedTypes(common_database)
90 webkit_database = common_database.Clone() 90 webkit_database = common_database.Clone()
91 91
92 # Generate Dart interfaces for the WebKit DOM. 92 # Generate Dart interfaces for the WebKit DOM.
93 generator.FilterInterfaces(database = webkit_database, 93 generator.FilterInterfaces(database = webkit_database,
94 or_annotations = ['WebKit', 'Dart'], 94 or_annotations = ['WebKit', 'Dart'],
95 exclude_displaced = ['WebKit'], 95 exclude_displaced = ['WebKit'],
96 exclude_suppressed = ['WebKit', 'Dart']) 96 exclude_suppressed = ['WebKit', 'Dart'])
97 generator.RenameTypes(webkit_database, _webkit_renames, True) 97 generator.RenameTypes(webkit_database, _webkit_renames, True)
98 98
99 html_renames = _MakeHtmlRenames(common_database)
99 if generate_html_systems: 100 if generate_html_systems:
100 html_renames = _MakeHtmlRenames(common_database)
101 generator.RenameTypes(webkit_database, html_renames, False) 101 generator.RenameTypes(webkit_database, html_renames, False)
102 html_renames_inverse = dict((v,k) for k, v in html_renames.iteritems())
103 else:
104 html_renames_inverse = {}
105
106 webkit_renames_inverse = dict((v,k) for k, v in _webkit_renames.iteritems())
107 102
108 generator.Generate(database = webkit_database, 103 generator.Generate(database = webkit_database,
109 output_dir = output_dir, 104 output_dir = output_dir,
110 lib_dir = output_dir, 105 lib_dir = output_dir,
111 module_source_preference = ['WebKit', 'Dart'], 106 module_source_preference = ['WebKit', 'Dart'],
112 source_filter = ['WebKit', 'Dart'], 107 source_filter = ['WebKit', 'Dart'],
113 super_database = common_database, 108 super_database = common_database,
114 common_prefix = 'common', 109 common_prefix = 'common',
115 super_map = webkit_renames_inverse, 110 webkit_renames = _webkit_renames,
116 html_map = html_renames_inverse, 111 html_renames = html_renames,
117 systems = systems) 112 systems = systems)
118 113
119 generator.Flush() 114 generator.Flush()
120 115
121 def GenerateSingleFile(systems): 116 def GenerateSingleFile(systems):
122 if 'frog' in systems: 117 if 'frog' in systems:
123 _logger.info('Copy dom_frog to frog/') 118 _logger.info('Copy dom_frog to frog/')
124 subprocess.call(['cd ../generated ; ' 119 subprocess.call(['cd ../generated ; '
125 '../../../tools/copy_dart.py ../frog dom_frog.dart'], 120 '../../../tools/copy_dart.py ../frog dom_frog.dart'],
126 shell=True); 121 shell=True);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 177
183 if html_systems: 178 if html_systems:
184 output_dir = options.output_dir or os.path.join(current_dir, 179 output_dir = options.output_dir or os.path.join(current_dir,
185 '../../html/generated') 180 '../../html/generated')
186 GenerateDOM(html_systems, True, output_dir, 181 GenerateDOM(html_systems, True, output_dir,
187 database_dir, use_database_cache or dom_systems) 182 database_dir, use_database_cache or dom_systems)
188 GenerateSingleFile(html_systems) 183 GenerateSingleFile(html_systems)
189 184
190 if __name__ == '__main__': 185 if __name__ == '__main__':
191 sys.exit(main()) 186 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | lib/dom/scripts/dartgenerator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698