Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(879)

Side by Side Diff: third_party/WebKit/Source/bindings/scripts/v8_utilities.py

Issue 2573713002: [Bindings][Refactoring] Remove filters for origin trial features (Closed)
Patch Set: Rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 # partial interfaces are implemented as separate classes, with their members 131 # partial interfaces are implemented as separate classes, with their members
139 # implemented as static member functions 132 # implemented as static member functions
140 partial_interface_implemented_as = definition.extended_attributes.get('Parti alInterfaceImplementedAs') 133 partial_interface_implemented_as = definition.extended_attributes.get('Parti alInterfaceImplementedAs')
141 if partial_interface_implemented_as: 134 if partial_interface_implemented_as:
142 return '%s::%s' % (partial_interface_implemented_as, base_name) 135 return '%s::%s' % (partial_interface_implemented_as, base_name)
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 return None 659 return None
667 660
668 661
669 IdlInterface.legacy_caller = property(legacy_caller) 662 IdlInterface.legacy_caller = property(legacy_caller)
670 IdlInterface.indexed_property_getter = property(indexed_property_getter) 663 IdlInterface.indexed_property_getter = property(indexed_property_getter)
671 IdlInterface.indexed_property_setter = property(indexed_property_setter) 664 IdlInterface.indexed_property_setter = property(indexed_property_setter)
672 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) 665 IdlInterface.indexed_property_deleter = property(indexed_property_deleter)
673 IdlInterface.named_property_getter = property(named_property_getter) 666 IdlInterface.named_property_getter = property(named_property_getter)
674 IdlInterface.named_property_setter = property(named_property_setter) 667 IdlInterface.named_property_setter = property(named_property_setter)
675 IdlInterface.named_property_deleter = property(named_property_deleter) 668 IdlInterface.named_property_deleter = property(named_property_deleter)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698