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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
358 return interfaces_info.get(name, {}).get('implemented_as') or name | 358 return interfaces_info.get(name, {}).get('implemented_as') or name |
359 | 359 |
360 | 360 |
361 def cpp_name_or_partial(interface): | 361 def cpp_name_or_partial(interface): |
362 cpp_class_name = cpp_name(interface) | 362 cpp_class_name = cpp_name(interface) |
363 if interface.is_partial: | 363 if interface.is_partial: |
364 return ''.join([cpp_class_name, 'Partial']) | 364 return ''.join([cpp_class_name, 'Partial']) |
365 return cpp_class_name | 365 return cpp_class_name |
366 | 366 |
367 | 367 |
368 def is_experimental_api(interface): | |
haraken
2015/12/18 02:35:51
is_experimental_api => is_api_experiment_enabled
Daniel Nishi
2015/12/18 05:11:42
Done.
| |
369 return 'APIExperimentEnabled' in interface.extended_attributes | |
370 | |
371 | |
372 def api_experiment_name(interface): | |
373 return interface.extended_attributes['APIExperimentEnabled'] if is_experimen tal_api(interface) else None | |
374 | |
375 | |
368 # [MeasureAs] | 376 # [MeasureAs] |
369 def measure_as(definition_or_member, interface): | 377 def measure_as(definition_or_member, interface): |
370 extended_attributes = definition_or_member.extended_attributes | 378 extended_attributes = definition_or_member.extended_attributes |
371 if 'MeasureAs' in extended_attributes: | 379 if 'MeasureAs' in extended_attributes: |
372 includes.add('core/frame/UseCounter.h') | 380 includes.add('core/frame/UseCounter.h') |
373 return lambda suffix: extended_attributes['MeasureAs'] | 381 return lambda suffix: extended_attributes['MeasureAs'] |
374 if 'Measure' in extended_attributes: | 382 if 'Measure' in extended_attributes: |
375 includes.add('core/frame/UseCounter.h') | 383 includes.add('core/frame/UseCounter.h') |
376 measure_as_name = capitalize(definition_or_member.name) | 384 measure_as_name = capitalize(definition_or_member.name) |
377 if interface is not None: | 385 if interface is not None: |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
578 except StopIteration: | 586 except StopIteration: |
579 return None | 587 return None |
580 | 588 |
581 | 589 |
582 IdlInterface.indexed_property_getter = property(indexed_property_getter) | 590 IdlInterface.indexed_property_getter = property(indexed_property_getter) |
583 IdlInterface.indexed_property_setter = property(indexed_property_setter) | 591 IdlInterface.indexed_property_setter = property(indexed_property_setter) |
584 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) | 592 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) |
585 IdlInterface.named_property_getter = property(named_property_getter) | 593 IdlInterface.named_property_getter = property(named_property_getter) |
586 IdlInterface.named_property_setter = property(named_property_setter) | 594 IdlInterface.named_property_setter = property(named_property_setter) |
587 IdlInterface.named_property_deleter = property(named_property_deleter) | 595 IdlInterface.named_property_deleter = property(named_property_deleter) |
OLD | NEW |