Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Side by Side Diff: bindings/dart/scripts/dart_methods.py

Issue 558803003: Roll IDL Dartium 37 (r181675) (Closed) Base URL: https://dart.googlecode.com/svn/third_party/WebCore
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « bindings/dart/scripts/dart_interface.py ('k') | bindings/dart/scripts/dart_utilities.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 'is_custom_dart': 'DartCustom' in extended_attributes, 133 'is_custom_dart': 'DartCustom' in extended_attributes,
134 'is_custom_dart_new': DartUtilities.has_extended_attribute_value(method, 'DartCustom', 'New'), 134 'is_custom_dart_new': DartUtilities.has_extended_attribute_value(method, 'DartCustom', 'New'),
135 'is_custom_element_callbacks': is_custom_element_callbacks, 135 'is_custom_element_callbacks': is_custom_element_callbacks,
136 'is_do_not_check_security': 'DoNotCheckSecurity' in extended_attributes, 136 'is_do_not_check_security': 'DoNotCheckSecurity' in extended_attributes,
137 'is_do_not_check_signature': 'DoNotCheckSignature' in extended_attribute s, 137 'is_do_not_check_signature': 'DoNotCheckSignature' in extended_attribute s,
138 'is_partial_interface_member': 'PartialInterfaceImplementedAs' in extend ed_attributes, 138 'is_partial_interface_member': 'PartialInterfaceImplementedAs' in extend ed_attributes,
139 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, 139 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes,
140 'is_raises_exception': is_raises_exception, 140 'is_raises_exception': is_raises_exception,
141 'is_read_only': 'ReadOnly' in extended_attributes, 141 'is_read_only': 'ReadOnly' in extended_attributes,
142 'is_static': is_static, 142 'is_static': is_static,
143 # FIXME(terry): StrictTypeChecking no longer supported; TypeChecking is 143 # FIXME(terry): DartStrictTypeChecking no longer supported; TypeChecking is
144 # new extended attribute. 144 # new extended attribute.
145 'is_strict_type_checking': 145 'is_strict_type_checking':
146 'StrictTypeChecking' in extended_attributes or 146 'DartStrictTypeChecking' in extended_attributes or
147 'StrictTypeChecking' in interface.extended_attributes, 147 'DartStrictTypeChecking' in interface.extended_attributes,
148 'is_variadic': arguments and arguments[-1].is_variadic, 148 'is_variadic': arguments and arguments[-1].is_variadic,
149 'measure_as': DartUtilities.measure_as(method), # [MeasureAs] 149 'measure_as': DartUtilities.measure_as(method), # [MeasureAs]
150 'name': name, 150 'name': name,
151 'number_of_arguments': number_of_arguments, 151 'number_of_arguments': number_of_arguments,
152 'number_of_required_arguments': number_of_required_arguments, 152 'number_of_required_arguments': number_of_required_arguments,
153 'number_of_required_or_variadic_arguments': len([ 153 'number_of_required_or_variadic_arguments': len([
154 argument for argument in arguments 154 argument for argument in arguments
155 if not argument.is_optional]), 155 if not argument.is_optional]),
156 'per_context_enabled_function': DartUtilities.per_context_enabled_functi on_name(method), # [PerContextEnabled] 156 'per_context_enabled_function': DartUtilities.per_context_enabled_functi on_name(method), # [PerContextEnabled]
157 'property_attributes': property_attributes(method), 157 'property_attributes': property_attributes(method),
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 'preprocessed_type': preprocessed_type, 197 'preprocessed_type': preprocessed_type,
198 # Dictionary is special-cased, but arrays and sequences shouldn't be 198 # Dictionary is special-cased, but arrays and sequences shouldn't be
199 'idl_type': not idl_type.array_or_sequence_type and idl_type.base_type, 199 'idl_type': not idl_type.array_or_sequence_type and idl_type.base_type,
200 'index': index, 200 'index': index,
201 'is_array_or_sequence_type': not not idl_type.array_or_sequence_type, 201 'is_array_or_sequence_type': not not idl_type.array_or_sequence_type,
202 'is_clamp': 'Clamp' in extended_attributes, 202 'is_clamp': 'Clamp' in extended_attributes,
203 'is_callback_interface': idl_type.is_callback_interface, 203 'is_callback_interface': idl_type.is_callback_interface,
204 'is_nullable': idl_type.is_nullable, 204 'is_nullable': idl_type.is_nullable,
205 # Only expose as optional if no default value. 205 # Only expose as optional if no default value.
206 'is_optional': argument.is_optional and not (this_has_default or argumen t.default_value), 206 'is_optional': argument.is_optional and not (this_has_default or argumen t.default_value),
207 'is_strict_type_checking': 'StrictTypeChecking' in extended_attributes, 207 'is_strict_type_checking': 'DartStrictTypeChecking' in extended_attribut es,
208 'is_variadic_wrapper_type': is_variadic_wrapper_type, 208 'is_variadic_wrapper_type': is_variadic_wrapper_type,
209 'vector_type': 'WillBeHeapVector' if use_heap_vector_type else 'Vector', 209 'vector_type': 'WillBeHeapVector' if use_heap_vector_type else 'Vector',
210 'is_wrapper_type': idl_type.is_wrapper_type, 210 'is_wrapper_type': idl_type.is_wrapper_type,
211 'name': argument.name, 211 'name': argument.name,
212 'dart_set_return_value_for_main_world': dart_set_return_value(interface. name, method, this_cpp_value, for_main_world=True), 212 'dart_set_return_value_for_main_world': dart_set_return_value(interface. name, method, this_cpp_value, for_main_world=True),
213 'dart_set_return_value': dart_set_return_value(interface.name, method, t his_cpp_value), 213 'dart_set_return_value': dart_set_return_value(interface.name, method, t his_cpp_value),
214 'arg_index': arg_index, 214 'arg_index': arg_index,
215 'dart_value_to_local_cpp_value': dart_value_to_local_cpp_value(interface , argument, arg_index, auto_scope), 215 'dart_value_to_local_cpp_value': dart_value_to_local_cpp_value(interface , argument, arg_index, auto_scope),
216 } 216 }
217 return argument_data 217 return argument_data
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 340
341 def union_arguments(idl_type): 341 def union_arguments(idl_type):
342 """Return list of ['result0Enabled', 'result0', 'result1Enabled', ...] for u nion types, for use in setting return value""" 342 """Return list of ['result0Enabled', 'result0', 'result1Enabled', ...] for u nion types, for use in setting return value"""
343 return [arg 343 return [arg
344 for i in range(len(idl_type.member_types)) 344 for i in range(len(idl_type.member_types))
345 for arg in ['result%sEnabled' % i, 'result%s' % i]] 345 for arg in ['result%sEnabled' % i, 'result%s' % i]]
346 346
347 IdlType.union_arguments = property(lambda self: None) 347 IdlType.union_arguments = property(lambda self: None)
348 IdlUnionType.union_arguments = property(union_arguments) 348 IdlUnionType.union_arguments = property(union_arguments)
OLDNEW
« no previous file with comments | « bindings/dart/scripts/dart_interface.py ('k') | bindings/dart/scripts/dart_utilities.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698