OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2012, 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 module provides shared functionality for the system to generate | 6 """This module provides shared functionality for the system to generate |
7 Dart:html APIs from the IDL database.""" | 7 Dart:html APIs from the IDL database.""" |
8 | 8 |
9 import emitter | 9 import emitter |
10 import logging | 10 import logging |
11 import monitored | 11 import monitored |
12 import os | 12 import os |
13 import re | 13 import re |
14 from generator import * | 14 from generator import * |
15 from htmldartgenerator import * | 15 from htmldartgenerator import * |
16 | 16 |
17 _logger = logging.getLogger('systemhtml') | 17 _logger = logging.getLogger('systemhtml') |
18 | 18 |
19 HTML_LIBRARY_NAMES = ['chrome', 'html', 'indexed_db', 'svg', | 19 HTML_LIBRARY_NAMES = ['html', 'indexed_db', 'svg', |
20 'web_audio', 'web_gl', 'web_sql'] | 20 'web_audio', 'web_gl', 'web_sql'] |
21 | 21 |
22 _js_custom_members = monitored.Set('systemhtml._js_custom_members', [ | 22 _js_custom_members = monitored.Set('systemhtml._js_custom_members', [ |
23 'AudioBufferSourceNode.start', | 23 'AudioBufferSourceNode.start', |
24 'AudioBufferSourceNode.stop', | 24 'AudioBufferSourceNode.stop', |
25 'AudioContext.createGain', | 25 'AudioContext.createGain', |
26 'AudioContext.createScriptProcessor', | 26 'AudioContext.createScriptProcessor', |
27 'CanvasRenderingContext2D.drawImage', | 27 'CanvasRenderingContext2D.drawImage', |
28 'CanvasRenderingContext2D.fill', | 28 'CanvasRenderingContext2D.fill', |
29 'CanvasRenderingContext2D.fillText', | 29 'CanvasRenderingContext2D.fillText', |
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1269 | 1269 |
1270 def AddFile(self, basename, library_name, path): | 1270 def AddFile(self, basename, library_name, path): |
1271 self._libraries[library_name].AddFile(path) | 1271 self._libraries[library_name].AddFile(path) |
1272 | 1272 |
1273 def AddTypeEntry(self, library_name, idl_name, dart_name): | 1273 def AddTypeEntry(self, library_name, idl_name, dart_name): |
1274 self._libraries[library_name].AddTypeEntry(idl_name, dart_name) | 1274 self._libraries[library_name].AddTypeEntry(idl_name, dart_name) |
1275 | 1275 |
1276 def Emit(self, emitter, auxiliary_dir): | 1276 def Emit(self, emitter, auxiliary_dir): |
1277 for lib in self._libraries.values(): | 1277 for lib in self._libraries.values(): |
1278 lib.Emit(emitter, auxiliary_dir) | 1278 lib.Emit(emitter, auxiliary_dir) |
OLD | NEW |