OLD | NEW |
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True), | 102 'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True), |
103 'cached_attribute_validation_method': cached_attribute_validation_method
, | 103 'cached_attribute_validation_method': cached_attribute_validation_method
, |
104 'conditional_string': v8_utilities.conditional_string(attribute), | 104 'conditional_string': v8_utilities.conditional_string(attribute), |
105 'constructor_type': constructor_type, | 105 'constructor_type': constructor_type, |
106 'cpp_name': cpp_name(attribute), | 106 'cpp_name': cpp_name(attribute), |
107 'cpp_type': idl_type.cpp_type, | 107 'cpp_type': idl_type.cpp_type, |
108 'cpp_type_initializer': idl_type.cpp_type_initializer, | 108 'cpp_type_initializer': idl_type.cpp_type_initializer, |
109 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] | 109 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] |
110 'enum_type': idl_type.enum_type, | 110 'enum_type': idl_type.enum_type, |
111 'enum_values': idl_type.enum_values, | 111 'enum_values': idl_type.enum_values, |
| 112 'experimental_api_name': v8_utilities.experimental_api_name(attribute),
# [ExperimentEnabled] |
112 'exposed_test': v8_utilities.exposed(attribute, interface), # [Exposed] | 113 'exposed_test': v8_utilities.exposed(attribute, interface), # [Exposed] |
113 'has_custom_getter': has_custom_getter(attribute), | 114 'has_custom_getter': has_custom_getter(attribute), |
114 'has_custom_setter': has_custom_setter(attribute), | 115 'has_custom_setter': has_custom_setter(attribute), |
115 'has_setter': has_setter(attribute), | 116 'has_setter': has_setter(attribute), |
116 'idl_type': str(idl_type), # need trailing [] on array for Dictionary::
ConversionContext::setConversionType | 117 'idl_type': str(idl_type), # need trailing [] on array for Dictionary::
ConversionContext::setConversionType |
117 'is_call_with_execution_context': has_extended_attribute_value(attribute
, 'CallWith', 'ExecutionContext'), | 118 'is_call_with_execution_context': has_extended_attribute_value(attribute
, 'CallWith', 'ExecutionContext'), |
118 'is_call_with_script_state': has_extended_attribute_value(attribute, 'Ca
llWith', 'ScriptState'), | 119 'is_call_with_script_state': has_extended_attribute_value(attribute, 'Ca
llWith', 'ScriptState'), |
119 'is_check_security_for_receiver': is_check_security_for_receiver, | 120 'is_check_security_for_receiver': is_check_security_for_receiver, |
120 'is_check_security_for_return_value': is_check_security_for_return_value
, | 121 'is_check_security_for_return_value': is_check_security_for_return_value
, |
121 'is_custom_element_callbacks': is_custom_element_callbacks, | 122 'is_custom_element_callbacks': is_custom_element_callbacks, |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 return attribute.idl_type.name.endswith('Constructor') | 505 return attribute.idl_type.name.endswith('Constructor') |
505 | 506 |
506 | 507 |
507 def update_constructor_attribute_context(interface, attribute, context): | 508 def update_constructor_attribute_context(interface, attribute, context): |
508 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] | 509 context['needs_constructor_getter_callback'] = context['measure_as'] or cont
ext['deprecate_as'] |
509 # When the attribute name is the same as the interface name, do not generate | 510 # When the attribute name is the same as the interface name, do not generate |
510 # callback functions for each attribute and use | 511 # callback functions for each attribute and use |
511 # {{cpp_class}}ConstructorAttributeSetterCallback. Otherwise, generate | 512 # {{cpp_class}}ConstructorAttributeSetterCallback. Otherwise, generate |
512 # a callback function in order to hard-code the attribute name. | 513 # a callback function in order to hard-code the attribute name. |
513 context['needs_constructor_setter_callback'] = context['name'] != context['c
onstructor_type'] | 514 context['needs_constructor_setter_callback'] = context['name'] != context['c
onstructor_type'] |
OLD | NEW |