| 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 systems to generate | 6 """This module provides shared functionality for the systems to generate |
| 7 native binding from the IDL database.""" | 7 native binding from the IDL database.""" |
| 8 | 8 |
| 9 import emitter | 9 import emitter |
| 10 import os | 10 import os |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 'SpecialWrapFor' in ext_attrs or | 582 'SpecialWrapFor' in ext_attrs or |
| 583 ('Custom' in ext_attrs and ext_attrs['Custom'] == 'Wrap') or | 583 ('Custom' in ext_attrs and ext_attrs['Custom'] == 'Wrap') or |
| 584 ('Custom' in ext_attrs and ext_attrs['Custom'] == 'ToV8') or | 584 ('Custom' in ext_attrs and ext_attrs['Custom'] == 'ToV8') or |
| 585 self._interface_type_info.custom_to_dart()): | 585 self._interface_type_info.custom_to_dart()): |
| 586 to_dart_emitter.Emit( | 586 to_dart_emitter.Emit( |
| 587 ' static Dart_Handle createWrapper(DartDOMData* domData, NativeType
* value);\n') | 587 ' static Dart_Handle createWrapper(DartDOMData* domData, NativeType
* value);\n') |
| 588 else: | 588 else: |
| 589 to_dart_emitter.Emit( | 589 to_dart_emitter.Emit( |
| 590 ' static Dart_Handle createWrapper(DartDOMData* domData, NativeType
* value)\n' | 590 ' static Dart_Handle createWrapper(DartDOMData* domData, NativeType
* value)\n' |
| 591 ' {\n' | 591 ' {\n' |
| 592 ' return DartDOMWrapper::createWrapper<Dart$(INTERFACE)>(domDat
a, value);\n' | 592 ' return DartDOMWrapper::createWrapper<Dart$(INTERFACE)>(domDat
a, value, Dart$(INTERFACE)::dartClassId);\n' |
| 593 ' }\n', | 593 ' }\n', |
| 594 INTERFACE=self._interface.id) | 594 INTERFACE=self._interface.id) |
| 595 | 595 |
| 596 webcore_includes = self._GenerateCPPIncludes( | 596 webcore_includes = self._GenerateCPPIncludes( |
| 597 self._interface_type_info.webcore_includes()) | 597 self._interface_type_info.webcore_includes()) |
| 598 | 598 |
| 599 is_node_test = lambda interface: interface.id == 'Node' | 599 is_node_test = lambda interface: interface.id == 'Node' |
| 600 is_active_test = lambda interface: 'ActiveDOMObject' in interface.ext_attrs | 600 is_active_test = lambda interface: 'ActiveDOMObject' in interface.ext_attrs |
| 601 is_event_target_test = lambda interface: 'EventTarget' in interface.ext_attr
s | 601 is_event_target_test = lambda interface: 'EventTarget' in interface.ext_attr
s |
| 602 def TypeCheckHelper(test): | 602 def TypeCheckHelper(test): |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1497 e.Emit("};\n"); | 1497 e.Emit("};\n"); |
| 1498 e.Emit('\n'); | 1498 e.Emit('\n'); |
| 1499 e.Emit('} // namespace WebCore\n'); | 1499 e.Emit('} // namespace WebCore\n'); |
| 1500 | 1500 |
| 1501 def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument): | 1501 def _IsOptionalStringArgumentInInitEventMethod(interface, operation, argument): |
| 1502 return ( | 1502 return ( |
| 1503 interface.id.endswith('Event') and | 1503 interface.id.endswith('Event') and |
| 1504 operation.id.startswith('init') and | 1504 operation.id.startswith('init') and |
| 1505 argument.ext_attrs.get('Default') == 'Undefined' and | 1505 argument.ext_attrs.get('Default') == 'Undefined' and |
| 1506 argument.type.id == 'DOMString') | 1506 argument.type.id == 'DOMString') |
| OLD | NEW |