| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // WARNING: Do not edit - generated code. | 5 // WARNING: Do not edit - generated code. |
| 6 part of dart.sky; | 6 part of dart.sky; |
| 7 | 7 |
| 8 {% macro args_macro(args) -%} | 8 {% macro args_macro(args) -%} |
| 9 {%- for arg in args -%} | 9 {%- for arg in args -%} |
| 10 {%- if arg.is_optional and (loop.first or not args[arg.index-1].is_optio
nal) -%} | 10 {%- if arg.is_optional and (loop.first or not args[arg.index-1].is_optio
nal) -%} |
| 11 {{ '{' if arg.is_named else '[' }} | 11 {{ '{' if arg.is_named else '[' }} |
| 12 {%- endif -%} | 12 {%- endif -%} |
| 13 {{ arg.dart_type }} {{ arg.name }} | 13 {{ arg.dart_type }} {{ arg.name }} |
| 14 {%- if arg.is_optional %} {{ ':' if arg.is_named else '='}} {{ arg.dart_
default_value }} | 14 {%- if arg.is_optional %} {{ ':' if arg.is_named else '='}} {{ arg.dart_
default_value }} |
| 15 {#- TODO(eseidel): This does not support having both optional and named
arguments! -#} | 15 {#- TODO(eseidel): This does not support having both optional and named
arguments! (then again, neither does Dart, currently) -#} |
| 16 {%- if loop.last -%}{{ '}' if arg.is_named else ']' }}{%- endif -%} | 16 {%- if loop.last -%}{{ '}' if arg.is_named else ']' }}{%- endif -%} |
| 17 {%- endif -%} | 17 {%- endif -%} |
| 18 {%- if not loop.last %}, {% endif %} | 18 {%- if not loop.last %}, {% endif %} |
| 19 {%- endfor -%} | 19 {%- endfor -%} |
| 20 {%- endmacro -%} | 20 {%- endmacro -%} |
| 21 | 21 |
| 22 {%- set prefix = "_" if private_dart else "" -%} | 22 {%- set prefix = "_" if private_dart else "" -%} |
| 23 {% if not constructors and not custom_constructors %}abstract {% endif -%} | 23 {% if not constructors and not custom_constructors %}abstract {% endif -%} |
| 24 class {{prefix}}{{interface_name}} extends | 24 class {{prefix}}{{interface_name}} extends |
| 25 {{ parent_interface if parent_interface else 'NativeFieldWrapperClass2' }} { | 25 {{ parent_interface if parent_interface else 'NativeFieldWrapperClass2' }} { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 52 {% endfor %} | 52 {% endfor %} |
| 53 | 53 |
| 54 // Operators | 54 // Operators |
| 55 {% if named_property_getter %} | 55 {% if named_property_getter %} |
| 56 String operator[](String name) native "{{interface_name}}___getter___Callbac
k"; | 56 String operator[](String name) native "{{interface_name}}___getter___Callbac
k"; |
| 57 {% endif %} | 57 {% endif %} |
| 58 {% if named_property_setter %} | 58 {% if named_property_setter %} |
| 59 void operator[]=(String name, String value) native "{{interface_name}}___set
ter___Callback"; | 59 void operator[]=(String name, String value) native "{{interface_name}}___set
ter___Callback"; |
| 60 {% endif %} | 60 {% endif %} |
| 61 } | 61 } |
| OLD | NEW |