| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 """Returns elements from a list of dictionaries with unique values for the n
amed key.""" | 116 """Returns elements from a list of dictionaries with unique values for the n
amed key.""" |
| 117 keys_seen = set() | 117 keys_seen = set() |
| 118 filtered_list = [] | 118 filtered_list = [] |
| 119 for item in dict_list: | 119 for item in dict_list: |
| 120 if item.get(key) not in keys_seen: | 120 if item.get(key) not in keys_seen: |
| 121 filtered_list.append(item) | 121 filtered_list.append(item) |
| 122 keys_seen.add(item.get(key)) | 122 keys_seen.add(item.get(key)) |
| 123 return filtered_list | 123 return filtered_list |
| 124 | 124 |
| 125 | 125 |
| 126 def for_origin_trial_feature(items, feature_name): | |
| 127 """Filters the list of attributes or constants, and returns those defined fo
r the named origin trial feature.""" | |
| 128 return [item for item in items if | |
| 129 item['origin_trial_feature_name'] == feature_name and | |
| 130 not item.get('exposed_test')] | |
| 131 | |
| 132 | |
| 133 ################################################################################ | 126 ################################################################################ |
| 134 # C++ | 127 # C++ |
| 135 ################################################################################ | 128 ################################################################################ |
| 136 | 129 |
| 137 def scoped_name(interface, definition, base_name): | 130 def scoped_name(interface, definition, base_name): |
| 138 if 'ImplementedInPrivateScript' in definition.extended_attributes: | 131 if 'ImplementedInPrivateScript' in definition.extended_attributes: |
| 139 return '%s::PrivateScript::%s' % (v8_class_name(interface), base_name) | 132 return '%s::PrivateScript::%s' % (v8_class_name(interface), base_name) |
| 140 # partial interfaces are implemented as separate classes, with their members | 133 # partial interfaces are implemented as separate classes, with their members |
| 141 # implemented as static member functions | 134 # implemented as static member functions |
| 142 partial_interface_implemented_as = definition.extended_attributes.get('Parti
alInterfaceImplementedAs') | 135 partial_interface_implemented_as = definition.extended_attributes.get('Parti
alInterfaceImplementedAs') |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 return None | 661 return None |
| 669 | 662 |
| 670 | 663 |
| 671 IdlInterface.legacy_caller = property(legacy_caller) | 664 IdlInterface.legacy_caller = property(legacy_caller) |
| 672 IdlInterface.indexed_property_getter = property(indexed_property_getter) | 665 IdlInterface.indexed_property_getter = property(indexed_property_getter) |
| 673 IdlInterface.indexed_property_setter = property(indexed_property_setter) | 666 IdlInterface.indexed_property_setter = property(indexed_property_setter) |
| 674 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) | 667 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) |
| 675 IdlInterface.named_property_getter = property(named_property_getter) | 668 IdlInterface.named_property_getter = property(named_property_getter) |
| 676 IdlInterface.named_property_setter = property(named_property_setter) | 669 IdlInterface.named_property_setter = property(named_property_setter) |
| 677 IdlInterface.named_property_deleter = property(named_property_deleter) | 670 IdlInterface.named_property_deleter = property(named_property_deleter) |
| OLD | NEW |