| 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 """ | 393 """ |
| 394 extended_attributes = definition_or_member.extended_attributes | 394 extended_attributes = definition_or_member.extended_attributes |
| 395 is_origin_trial_enabled = 'OriginTrialEnabled' in extended_attributes | 395 is_origin_trial_enabled = 'OriginTrialEnabled' in extended_attributes |
| 396 | 396 |
| 397 if (is_origin_trial_enabled and 'RuntimeEnabled' in extended_attributes): | 397 if (is_origin_trial_enabled and 'RuntimeEnabled' in extended_attributes): |
| 398 raise Exception('[OriginTrialEnabled] and [RuntimeEnabled] must ' | 398 raise Exception('[OriginTrialEnabled] and [RuntimeEnabled] must ' |
| 399 'not be specified on the same definition: ' | 399 'not be specified on the same definition: ' |
| 400 '%s.%s' % (definition_or_member.idl_name, definition_or_
member.name)) | 400 '%s.%s' % (definition_or_member.idl_name, definition_or_
member.name)) |
| 401 | 401 |
| 402 if is_origin_trial_enabled: | 402 if is_origin_trial_enabled: |
| 403 includes.add('bindings/core/v8/ScriptState.h') | |
| 404 includes.add('core/origin_trials/OriginTrials.h') | |
| 405 | |
| 406 trial_name = extended_attributes['OriginTrialEnabled'] | 403 trial_name = extended_attributes['OriginTrialEnabled'] |
| 407 return 'OriginTrials::%sEnabled' % uncapitalize(trial_name) | 404 return 'OriginTrials::%sEnabled' % uncapitalize(trial_name) |
| 408 | 405 |
| 409 return None | 406 return None |
| 410 | 407 |
| 411 | 408 |
| 412 def origin_trial_feature_name(definition_or_member): | 409 def origin_trial_feature_name(definition_or_member): |
| 413 extended_attributes = definition_or_member.extended_attributes | 410 extended_attributes = definition_or_member.extended_attributes |
| 414 if 'OriginTrialEnabled' not in extended_attributes: | 411 if 'OriginTrialEnabled' not in extended_attributes: |
| 415 return None | 412 return None |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 except StopIteration: | 623 except StopIteration: |
| 627 return None | 624 return None |
| 628 | 625 |
| 629 | 626 |
| 630 IdlInterface.indexed_property_getter = property(indexed_property_getter) | 627 IdlInterface.indexed_property_getter = property(indexed_property_getter) |
| 631 IdlInterface.indexed_property_setter = property(indexed_property_setter) | 628 IdlInterface.indexed_property_setter = property(indexed_property_setter) |
| 632 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) | 629 IdlInterface.indexed_property_deleter = property(indexed_property_deleter) |
| 633 IdlInterface.named_property_getter = property(named_property_getter) | 630 IdlInterface.named_property_getter = property(named_property_getter) |
| 634 IdlInterface.named_property_setter = property(named_property_setter) | 631 IdlInterface.named_property_setter = property(named_property_setter) |
| 635 IdlInterface.named_property_deleter = property(named_property_deleter) | 632 IdlInterface.named_property_deleter = property(named_property_deleter) |
| OLD | NEW |