| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // WARNING: Do not edit - generated code. | 5 // WARNING: Do not edit - generated code. |
| 6 | 6 |
| 7 #include "config.h" | 7 #include "config.h" |
| 8 {% filter conditional(conditional_string) %} | 8 {% filter conditional(conditional_string) %} |
| 9 #include "bindings/dart/DartWebkitClassIds.h" | 9 #include "bindings/dart/DartWebkitClassIds.h" |
| 10 #include "{{dart_class}}.h" | 10 #include "{{dart_class}}.h" |
| 11 | 11 |
| 12 {% for filename in cpp_includes %} | 12 {% for filename in cpp_includes %} |
| 13 #include "{{filename}}" | 13 #include "{{filename}}" |
| 14 {% endfor %} | 14 {% endfor %} |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 {% block to_dart_no_inline %}{% endblock %} | 18 {% block to_dart_no_inline %}{% endblock %} |
| 19 | 19 |
| 20 namespace {{dart_class}}Internal { | 20 namespace {{dart_class}}Internal { |
| 21 | 21 |
| 22 {% from 'methods_cpp.template' import generate_constructor, generate_event_const
ructor, generate_method, method_callback with context %} | 22 {% from 'methods_cpp.template' import generate_constructor, generate_event_const
ructor, generate_method, method_callback, overload_resolution_method with contex
t %} |
| 23 | 23 |
| 24 {# Constructors #} | 24 {# Constructors #} |
| 25 {% for constructor in constructors %} | 25 {% for constructor in constructors %} |
| 26 {{generate_constructor(constructor, constructor.number_of_arguments)}} | 26 {{generate_constructor(constructor, constructor.number_of_arguments)}} |
| 27 {% endfor %} | 27 {% endfor %} |
| 28 {% block overloaded_constructor %}{% endblock %} |
| 28 {% if named_constructor %} | 29 {% if named_constructor %} |
| 29 {{generate_constructor(named_constructor, named_constructor.number_of_arguments)
}} | 30 {{generate_constructor(named_constructor, named_constructor.number_of_arguments)
}} |
| 30 {% endif %} | 31 {% endif %} |
| 31 {% if has_event_constructor %} | 32 {% if has_event_constructor %} |
| 32 {{generate_event_constructor()}} | 33 {{generate_event_constructor()}} |
| 33 {% endif %} | 34 {% endif %} |
| 34 | 35 |
| 35 {# Attributes getters/setters. #} | 36 {# Attributes getters/setters. #} |
| 36 {% from 'attributes_cpp.template' import attribute_getter, attribute_getter_call
back, | 37 {% from 'attributes_cpp.template' import attribute_getter, attribute_getter_call
back, |
| 37 attribute_setter, attribute_setter_callback | 38 attribute_setter, attribute_setter_callback |
| 38 with context %} | 39 with context %} |
| 39 {% for attribute in attributes %} | 40 {% for attribute in attributes %} |
| 40 {% if not attribute.has_custom_getter and not attribute.is_getter_suppressed %} | 41 {% if not attribute.has_custom_getter and not attribute.is_getter_suppressed %} |
| 41 {{attribute_getter(cpp_class, attribute)}} | 42 {{attribute_getter(cpp_class, attribute)}} |
| 42 {% endif %} | 43 {% endif %} |
| 43 {# FIXME I'm disabling put_forwards for now since we didn't support it before #} | 44 {# FIXME I'm disabling put_forwards for now since we didn't support it before #} |
| 44 {# https://code.google.com/p/dart/issues/detail?id=18784 #} | 45 {# https://code.google.com/p/dart/issues/detail?id=18784 #} |
| 45 {# {% if not attribute.has_custom_setter and (not attribute.is_read_only or attr
ibute.put_forwards) %}#} | 46 {# {% if not attribute.has_custom_setter and (not attribute.is_read_only or attr
ibute.put_forwards) %}#} |
| 46 {% if not attribute.has_custom_setter and not attribute.is_read_only and not att
ribute.is_setter_suppressed %} | 47 {% if not attribute.has_custom_setter and not attribute.is_read_only and not att
ribute.is_setter_suppressed %} |
| 47 {{attribute_setter(cpp_class, attribute)}} | 48 {{attribute_setter(cpp_class, attribute)}} |
| 48 {% endif %} | 49 {% endif %} |
| 49 {% endfor %} | 50 {% endfor %} |
| 50 | 51 |
| 51 {# Methods #} | 52 {# Methods #} |
| 52 {% for method in methods %} | 53 {% for method in methods %} |
| 53 {% if not method.is_custom and not method.suppressed %} | 54 {% if not method.is_custom and not method.suppressed %} |
| 54 {{generate_method(method, method.number_of_arguments)}} | 55 {{generate_method(method, method.number_of_arguments)}} |
| 55 {% endif %} | 56 {% endif %} |
| 57 {% if method.overloads %} |
| 58 {{overload_resolution_method(method)}} |
| 59 {% endif %} |
| 56 {% endfor %} | 60 {% endfor %} |
| 57 | 61 |
| 58 {# Special operations (methods) #} | 62 {# Special operations (methods) #} |
| 59 {% block indexed_property_getter %}{% endblock %} | 63 {% block indexed_property_getter %}{% endblock %} |
| 60 } | 64 } |
| 61 | 65 |
| 62 Dart_NativeFunction {{dart_class}}::resolver(Dart_Handle nameHandle, int argumen
tCount, bool* autoSetupScope) | 66 Dart_NativeFunction {{dart_class}}::resolver(Dart_Handle nameHandle, int argumen
tCount, bool* autoSetupScope) |
| 63 { | 67 { |
| 64 String name = DartUtilities::toString(nameHandle); | 68 String name = DartUtilities::toString(nameHandle); |
| 65 {% from 'methods_cpp.template' import generate_resolver_constructor with con
text %} | 69 {% from 'methods_cpp.template' import generate_resolver_constructor with con
text %} |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 {% if dart_class == 'DartCSSStyleDeclaration' %} | 127 {% if dart_class == 'DartCSSStyleDeclaration' %} |
| 124 {% block generate_symbolizer_named_property_getter %}{% endblock %} | 128 {% block generate_symbolizer_named_property_getter %}{% endblock %} |
| 125 {% endif %} | 129 {% endif %} |
| 126 {% block generate_symbolizer_indexed_property_getter %}{% endblock %} | 130 {% block generate_symbolizer_indexed_property_getter %}{% endblock %} |
| 127 return 0; | 131 return 0; |
| 128 } | 132 } |
| 129 | 133 |
| 130 } // namespace blink | 134 } // namespace blink |
| 131 | 135 |
| 132 {% endfilter %} | 136 {% endfilter %} |
| OLD | NEW |