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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 has_strict_type_checking = ( | 79 has_strict_type_checking = ( |
80 ('StrictTypeChecking' in extended_attributes or | 80 ('StrictTypeChecking' in extended_attributes or |
81 'StrictTypeChecking' in interface.extended_attributes) and | 81 'StrictTypeChecking' in interface.extended_attributes) and |
82 idl_type.is_wrapper_type) | 82 idl_type.is_wrapper_type) |
83 | 83 |
84 if (base_idl_type == 'EventHandler' and | 84 if (base_idl_type == 'EventHandler' and |
85 interface.name in ['Window', 'WorkerGlobalScope'] and | 85 interface.name in ['Window', 'WorkerGlobalScope'] and |
86 attribute.name == 'onerror'): | 86 attribute.name == 'onerror'): |
87 includes.add('bindings/v8/V8ErrorHandler.h') | 87 includes.add('bindings/v8/V8ErrorHandler.h') |
88 | 88 |
89 is_auto_scope = dart_types.is_auto_scope_property(interface.name, attribute.
name) | 89 is_auto_scope = not 'DartNoAutoScope' in extended_attributes |
90 contents = { | 90 contents = { |
91 'access_control_list': access_control_list(attribute), | 91 'access_control_list': access_control_list(attribute), |
92 'activity_logging_world_list_for_getter': dart_utilities.activity_loggin
g_world_list(attribute, 'Getter'), # [ActivityLogging] | 92 'activity_logging_world_list_for_getter': dart_utilities.activity_loggin
g_world_list(attribute, 'Getter'), # [ActivityLogging] |
93 'activity_logging_world_list_for_setter': dart_utilities.activity_loggin
g_world_list(attribute, 'Setter'), # [ActivityLogging] | 93 'activity_logging_world_list_for_setter': dart_utilities.activity_loggin
g_world_list(attribute, 'Setter'), # [ActivityLogging] |
94 'cached_attribute_validation_method': extended_attributes.get('CachedAtt
ribute'), | 94 'cached_attribute_validation_method': extended_attributes.get('CachedAtt
ribute'), |
95 'conditional_string': dart_utilities.conditional_string(attribute), | 95 'conditional_string': dart_utilities.conditional_string(attribute), |
96 'constructor_type': idl_type.constructor_type_name | 96 'constructor_type': idl_type.constructor_type_name |
97 if is_constructor_attribute(attribute) else None, | 97 if is_constructor_attribute(attribute) else None, |
98 'cpp_name': cpp_name(attribute), | 98 'cpp_name': cpp_name(attribute), |
99 'cpp_type': idl_type.cpp_type, | 99 'cpp_type': idl_type.cpp_type, |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 lambda self: strip_suffix(self.base_type, 'Constructor')) | 442 lambda self: strip_suffix(self.base_type, 'Constructor')) |
443 | 443 |
444 | 444 |
445 def is_constructor_attribute(attribute): | 445 def is_constructor_attribute(attribute): |
446 # FIXME: replace this with [ConstructorAttribute] extended attribute | 446 # FIXME: replace this with [ConstructorAttribute] extended attribute |
447 return attribute.idl_type.base_type.endswith('Constructor') | 447 return attribute.idl_type.base_type.endswith('Constructor') |
448 | 448 |
449 | 449 |
450 def generate_constructor_getter(interface, attribute, contents): | 450 def generate_constructor_getter(interface, attribute, contents): |
451 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] | 451 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co
ntents['deprecate_as'] |
OLD | NEW |