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

Side by Side Diff: sky/engine/bindings/scripts/v8_utilities.py

Issue 867903002: Remove UseCounter (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 if 'Conditional' not in extended_attributes: 225 if 'Conditional' not in extended_attributes:
226 return None 226 return None
227 return 'ENABLE(%s)' % extended_attributes['Conditional'] 227 return 'ENABLE(%s)' % extended_attributes['Conditional']
228 228
229 229
230 # [DeprecateAs] 230 # [DeprecateAs]
231 def deprecate_as(member): 231 def deprecate_as(member):
232 extended_attributes = member.extended_attributes 232 extended_attributes = member.extended_attributes
233 if 'DeprecateAs' not in extended_attributes: 233 if 'DeprecateAs' not in extended_attributes:
234 return None 234 return None
235 includes.add('core/frame/UseCounter.h')
236 return extended_attributes['DeprecateAs'] 235 return extended_attributes['DeprecateAs']
237 236
238 237
239 # [Exposed] 238 # [Exposed]
240 EXPOSED_EXECUTION_CONTEXT_METHOD = { 239 EXPOSED_EXECUTION_CONTEXT_METHOD = {
241 'Window': 'isDocument', 240 'Window': 'isDocument',
242 } 241 }
243 242
244 243
245 def exposed(definition_or_member, interface): 244 def exposed(definition_or_member, interface):
(...skipping 29 matching lines...) Expand all
275 if 'ImplementedAs' not in extended_attributes: 274 if 'ImplementedAs' not in extended_attributes:
276 return definition_or_member.name 275 return definition_or_member.name
277 return extended_attributes['ImplementedAs'] 276 return extended_attributes['ImplementedAs']
278 277
279 278
280 # [MeasureAs] 279 # [MeasureAs]
281 def measure_as(definition_or_member): 280 def measure_as(definition_or_member):
282 extended_attributes = definition_or_member.extended_attributes 281 extended_attributes = definition_or_member.extended_attributes
283 if 'MeasureAs' not in extended_attributes: 282 if 'MeasureAs' not in extended_attributes:
284 return None 283 return None
285 includes.add('core/frame/UseCounter.h')
286 return extended_attributes['MeasureAs'] 284 return extended_attributes['MeasureAs']
287 285
288 286
289 # [RuntimeEnabled] 287 # [RuntimeEnabled]
290 def runtime_enabled_function_name(definition_or_member): 288 def runtime_enabled_function_name(definition_or_member):
291 """Returns the name of the RuntimeEnabledFeatures function. 289 """Returns the name of the RuntimeEnabledFeatures function.
292 290
293 The returned function checks if a method/attribute is enabled. 291 The returned function checks if a method/attribute is enabled.
294 Given extended attribute RuntimeEnabled=FeatureName, return: 292 Given extended attribute RuntimeEnabled=FeatureName, return:
295 RuntimeEnabledFeatures::{featureName}Enabled 293 RuntimeEnabledFeatures::{featureName}Enabled
296 """ 294 """
297 extended_attributes = definition_or_member.extended_attributes 295 extended_attributes = definition_or_member.extended_attributes
298 if 'RuntimeEnabled' not in extended_attributes: 296 if 'RuntimeEnabled' not in extended_attributes:
299 return None 297 return None
300 feature_name = extended_attributes['RuntimeEnabled'] 298 feature_name = extended_attributes['RuntimeEnabled']
301 return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name) 299 return 'RuntimeEnabledFeatures::%sEnabled' % uncapitalize(feature_name)
OLDNEW
« no previous file with comments | « sky/engine/bindings/scripts/v8_interface.py ('k') | sky/engine/bindings/templates/attributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698