| 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 module generates Dart APIs from the IDL database.""" | 6 """This module generates Dart APIs from the IDL database.""" |
| 7 | 7 |
| 8 import emitter | 8 import emitter |
| 9 import idlnode | 9 import idlnode |
| 10 import logging | 10 import logging |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 self.GenerateLibFile('template_wrapping_dom.darttemplate', | 652 self.GenerateLibFile('template_wrapping_dom.darttemplate', |
| 653 os.path.join(lib_dir, 'wrapping_dom.dart'), | 653 os.path.join(lib_dir, 'wrapping_dom.dart'), |
| 654 (self._dart_interface_file_paths + | 654 (self._dart_interface_file_paths + |
| 655 self._dart_callback_file_paths + | 655 self._dart_callback_file_paths + |
| 656 # FIXME: Move the implementation to a separate | 656 # FIXME: Move the implementation to a separate |
| 657 # library. | 657 # library. |
| 658 self._dart_wrapping_file_paths)) | 658 self._dart_wrapping_file_paths)) |
| 659 | 659 |
| 660 # New version: Frog | 660 # New version: Frog |
| 661 self.GenerateLibFile('template_frog_dom.darttemplate', | 661 self.GenerateLibFile('template_frog_dom.darttemplate', |
| 662 os.path.join(lib_dir, 'frog_dom.dart'), | 662 os.path.join(lib_dir, 'dom_frog.dart'), |
| 663 self._dart_frog_file_paths + | 663 self._dart_frog_file_paths + |
| 664 self._dart_callback_file_paths) | 664 self._dart_callback_file_paths) |
| 665 | 665 |
| 666 | 666 |
| 667 # JavaScript externs files | 667 # JavaScript externs files |
| 668 self._GenerateJavaScriptExternsMonkey(database, output_dir) | 668 self._GenerateJavaScriptExternsMonkey(database, output_dir) |
| 669 self._GenerateJavaScriptExternsWrapping(database, output_dir) | 669 self._GenerateJavaScriptExternsWrapping(database, output_dir) |
| 670 | 670 |
| 671 | 671 |
| 672 def _RecognizeCallback(self, interface): | 672 def _RecognizeCallback(self, interface): |
| (...skipping 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2498 Arguments: | 2498 Arguments: |
| 2499 info: An OperationInfo object. | 2499 info: An OperationInfo object. |
| 2500 """ | 2500 """ |
| 2501 # TODO(vsm): Handle overloads. | 2501 # TODO(vsm): Handle overloads. |
| 2502 self._members_emitter.Emit( | 2502 self._members_emitter.Emit( |
| 2503 '\n' | 2503 '\n' |
| 2504 ' $TYPE $NAME($ARGS) native;\n', | 2504 ' $TYPE $NAME($ARGS) native;\n', |
| 2505 TYPE=info.type_name, | 2505 TYPE=info.type_name, |
| 2506 NAME=info.name, | 2506 NAME=info.name, |
| 2507 ARGS=info.arg_implementation_declaration) | 2507 ARGS=info.arg_implementation_declaration) |
| OLD | NEW |