Chromium Code Reviews| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 uncapitalize, extended_attribute_value_as_list, is_unf orgeable, | 43 uncapitalize, extended_attribute_value_as_list, is_unf orgeable, |
| 44 is_legacy_interface_type_checking) | 44 is_legacy_interface_type_checking) |
| 45 | 45 |
| 46 | 46 |
| 47 def attribute_context(interface, attribute): | 47 def attribute_context(interface, attribute): |
| 48 idl_type = attribute.idl_type | 48 idl_type = attribute.idl_type |
| 49 base_idl_type = idl_type.base_type | 49 base_idl_type = idl_type.base_type |
| 50 extended_attributes = attribute.extended_attributes | 50 extended_attributes = attribute.extended_attributes |
| 51 | 51 |
| 52 idl_type.add_includes_for_type() | 52 idl_type.add_includes_for_type() |
| 53 if idl_type.enum_validation_expression: | |
| 54 includes.add('core/inspector/ConsoleMessage.h') | |
|
Paritosh Kumar
2015/03/25 04:28:55
Adding "core/inspector/ConsoleMessage.h" to includ
| |
| 53 | 55 |
| 54 # [CheckSecurity] | 56 # [CheckSecurity] |
| 55 is_check_security_for_node = 'CheckSecurity' in extended_attributes | 57 is_check_security_for_node = 'CheckSecurity' in extended_attributes |
| 56 if is_check_security_for_node: | 58 if is_check_security_for_node: |
| 57 includes.add('bindings/core/v8/BindingSecurity.h') | 59 includes.add('bindings/core/v8/BindingSecurity.h') |
| 58 # [CustomElementCallbacks], [Reflect] | 60 # [CustomElementCallbacks], [Reflect] |
| 59 is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attribute s | 61 is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attribute s |
| 60 is_reflect = 'Reflect' in extended_attributes | 62 is_reflect = 'Reflect' in extended_attributes |
| 61 if is_custom_element_callbacks or is_reflect: | 63 if is_custom_element_callbacks or is_reflect: |
| 62 includes.add('core/dom/custom/CustomElementProcessingStack.h') | 64 includes.add('core/dom/custom/CustomElementProcessingStack.h') |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 517 return attribute.idl_type.name.endswith('Constructor') | 519 return attribute.idl_type.name.endswith('Constructor') |
| 518 | 520 |
| 519 | 521 |
| 520 def update_constructor_attribute_context(interface, attribute, context): | 522 def update_constructor_attribute_context(interface, attribute, context): |
| 521 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] | 523 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] |
| 522 # When the attribute name is the same as the interface name, do not generate | 524 # When the attribute name is the same as the interface name, do not generate |
| 523 # callback functions for each attribute and use | 525 # callback functions for each attribute and use |
| 524 # {{cpp_class}}ConstructorAttributeSetterCallback. Otherwise, generate | 526 # {{cpp_class}}ConstructorAttributeSetterCallback. Otherwise, generate |
| 525 # a callback function in order to hard-code the attribute name. | 527 # a callback function in order to hard-code the attribute name. |
| 526 context['needs_constructor_setter_callback'] = context['name'] != context['c onstructor_type'] | 528 context['needs_constructor_setter_callback'] = context['name'] != context['c onstructor_type'] |
| OLD | NEW |