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

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

Issue 1107523002: IDL: Drop [PerContextEnabled] extended attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 5 years, 8 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
« no previous file with comments | « Source/bindings/scripts/v8_methods.py ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 return lambda suffix: extended_attributes['MeasureAs'] 367 return lambda suffix: extended_attributes['MeasureAs']
368 if 'Measure' in extended_attributes: 368 if 'Measure' in extended_attributes:
369 includes.add('core/frame/UseCounter.h') 369 includes.add('core/frame/UseCounter.h')
370 measure_as_name = capitalize(definition_or_member.name) 370 measure_as_name = capitalize(definition_or_member.name)
371 if interface is not None: 371 if interface is not None:
372 measure_as_name = '%s_%s' % (capitalize(interface.name), measure_as_ name) 372 measure_as_name = '%s_%s' % (capitalize(interface.name), measure_as_ name)
373 return lambda suffix: 'V8%s_%s' % (measure_as_name, suffix) 373 return lambda suffix: 'V8%s_%s' % (measure_as_name, suffix)
374 return None 374 return None
375 375
376 376
377 # [PerContextEnabled]
378 def per_context_enabled_function_name(definition_or_member):
379 extended_attributes = definition_or_member.extended_attributes
380 if 'PerContextEnabled' not in extended_attributes:
381 return None
382 feature_name = extended_attributes['PerContextEnabled']
383 return 'ContextFeatures::%sEnabled' % uncapitalize(feature_name)
384
385
386 # [RuntimeEnabled] 377 # [RuntimeEnabled]
387 def runtime_enabled_function_name(definition_or_member): 378 def runtime_enabled_function_name(definition_or_member):
388 """Returns the name of the RuntimeEnabledFeatures function. 379 """Returns the name of the RuntimeEnabledFeatures function.
389 380
390 The returned function checks if a method/attribute is enabled. 381 The returned function checks if a method/attribute is enabled.
391 Given extended attribute RuntimeEnabled=FeatureName, return: 382 Given extended attribute RuntimeEnabled=FeatureName, return:
392 RuntimeEnabledFeatures::{featureName}Enabled 383 RuntimeEnabledFeatures::{featureName}Enabled
393 """ 384 """
394 extended_attributes = definition_or_member.extended_attributes 385 extended_attributes = definition_or_member.extended_attributes
395 if 'RuntimeEnabled' not in extended_attributes: 386 if 'RuntimeEnabled' not in extended_attributes:
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 except StopIteration: 499 except StopIteration:
509 return None 500 return None
510 501
511 502
512 IdlInterface.indexed_property_getter = property(indexed_property_getter) 503 IdlInterface.indexed_property_getter = property(indexed_property_getter)
513 IdlInterface.indexed_property_setter = property(indexed_property_setter) 504 IdlInterface.indexed_property_setter = property(indexed_property_setter)
514 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) 505 IdlInterface.indexed_property_deleter = property(indexed_property_deleter)
515 IdlInterface.named_property_getter = property(named_property_getter) 506 IdlInterface.named_property_getter = property(named_property_getter)
516 IdlInterface.named_property_setter = property(named_property_setter) 507 IdlInterface.named_property_setter = property(named_property_setter)
517 IdlInterface.named_property_deleter = property(named_property_deleter) 508 IdlInterface.named_property_deleter = property(named_property_deleter)
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_methods.py ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698