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

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

Issue 2057273002: [OriginTrials] Support OriginTrialEnabled IDL attribute on constants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months 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_feature(items, feature_name):
chasej 2016/06/10 20:09:30 Should this have more specific name like 'for_orig
iclelland 2016/06/10 20:24:01 The intention was to eventually also include runti
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
126 ################################################################################ 133 ################################################################################
127 # C++ 134 # C++
128 ################################################################################ 135 ################################################################################
129 136
130 def scoped_name(interface, definition, base_name): 137 def scoped_name(interface, definition, base_name):
131 if 'ImplementedInPrivateScript' in definition.extended_attributes: 138 if 'ImplementedInPrivateScript' in definition.extended_attributes:
132 return '%s::PrivateScript::%s' % (v8_class_name(interface), base_name) 139 return '%s::PrivateScript::%s' % (v8_class_name(interface), base_name)
133 # partial interfaces are implemented as separate classes, with their members 140 # partial interfaces are implemented as separate classes, with their members
134 # implemented as static member functions 141 # implemented as static member functions
135 partial_interface_implemented_as = definition.extended_attributes.get('Parti alInterfaceImplementedAs') 142 partial_interface_implemented_as = definition.extended_attributes.get('Parti alInterfaceImplementedAs')
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 except StopIteration: 626 except StopIteration:
620 return None 627 return None
621 628
622 629
623 IdlInterface.indexed_property_getter = property(indexed_property_getter) 630 IdlInterface.indexed_property_getter = property(indexed_property_getter)
624 IdlInterface.indexed_property_setter = property(indexed_property_setter) 631 IdlInterface.indexed_property_setter = property(indexed_property_setter)
625 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) 632 IdlInterface.indexed_property_deleter = property(indexed_property_deleter)
626 IdlInterface.named_property_getter = property(named_property_getter) 633 IdlInterface.named_property_getter = property(named_property_getter)
627 IdlInterface.named_property_setter = property(named_property_setter) 634 IdlInterface.named_property_setter = property(named_property_setter)
628 IdlInterface.named_property_deleter = property(named_property_deleter) 635 IdlInterface.named_property_deleter = property(named_property_deleter)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698