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

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

Issue 1635593004: Rename Experimental Framework classes and concepts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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 # coding=utf-8 2 # coding=utf-8
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 this_gc_type = gc_type(interface) 156 this_gc_type = gc_type(interface)
157 157
158 wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Nod e') else 'ObjectClassId') 158 wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Nod e') else 'ObjectClassId')
159 159
160 v8_class_name = v8_utilities.v8_class_name(interface) 160 v8_class_name = v8_utilities.v8_class_name(interface)
161 cpp_class_name = cpp_name(interface) 161 cpp_class_name = cpp_name(interface)
162 cpp_class_name_or_partial = cpp_name_or_partial(interface) 162 cpp_class_name_or_partial = cpp_name_or_partial(interface)
163 v8_class_name_or_partial = v8_utilities.v8_class_name_or_partial(interface) 163 v8_class_name_or_partial = v8_utilities.v8_class_name_or_partial(interface)
164 164
165 if 'APIExperimentEnabled' in extended_attributes: 165 if 'APIExperimentEnabled' in extended_attributes:
166 includes.add('core/experiments/ExperimentalFeatures.h')
167 includes.add('core/inspector/ConsoleMessage.h') 166 includes.add('core/inspector/ConsoleMessage.h')
167 includes.add('core/origin_trials/OriginTrials.h')
168 168
169 context = { 169 context = {
170 'api_experiment_name': v8_utilities.api_experiment_name(interface), 170 'api_experiment_name': v8_utilities.api_experiment_name(interface),
171 'cpp_class': cpp_class_name, 171 'cpp_class': cpp_class_name,
172 'cpp_class_or_partial': cpp_class_name_or_partial, 172 'cpp_class_or_partial': cpp_class_name_or_partial,
173 'event_target_inheritance': 'InheritFromEventTarget' if is_event_target else 'NotInheritFromEventTarget', 173 'event_target_inheritance': 'InheritFromEventTarget' if is_event_target else 'NotInheritFromEventTarget',
174 'gc_type': this_gc_type, 174 'gc_type': this_gc_type,
175 # FIXME: Remove 'EventTarget' special handling, http://crbug.com/383699 175 # FIXME: Remove 'EventTarget' special handling, http://crbug.com/383699
176 'has_access_check_callbacks': (is_check_security and 176 'has_access_check_callbacks': (is_check_security and
177 interface.name != 'Window' and 177 interface.name != 'Window' and
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 }) 605 })
606 606
607 return context 607 return context
608 608
609 609
610 # [DeprecateAs], [Reflect], [RuntimeEnabled] 610 # [DeprecateAs], [Reflect], [RuntimeEnabled]
611 def constant_context(constant, interface): 611 def constant_context(constant, interface):
612 extended_attributes = constant.extended_attributes 612 extended_attributes = constant.extended_attributes
613 613
614 if 'APIExperimentEnabled' in extended_attributes: 614 if 'APIExperimentEnabled' in extended_attributes:
615 includes.add('core/experiments/ExperimentalFeatures.h')
616 includes.add('core/inspector/ConsoleMessage.h') 615 includes.add('core/inspector/ConsoleMessage.h')
616 includes.add('core/origin_trials/OriginTrials.h')
617 617
618 return { 618 return {
619 'api_experiment_enabled': v8_utilities.api_experiment_enabled_function(c onstant), # [APIExperimentEnabled] 619 'api_experiment_enabled': v8_utilities.api_experiment_enabled_function(c onstant), # [APIExperimentEnabled]
620 'api_experiment_enabled_per_interface': v8_utilities.api_experiment_enab led_function(interface), # [APIExperimentEnabled] 620 'api_experiment_enabled_per_interface': v8_utilities.api_experiment_enab led_function(interface), # [APIExperimentEnabled]
621 'api_experiment_name': extended_attributes.get('APIExperimentEnabled'), # [APIExperimentEnabled] 621 'api_experiment_name': extended_attributes.get('APIExperimentEnabled'), # [APIExperimentEnabled]
622 'cpp_class': extended_attributes.get('PartialInterfaceImplementedAs'), 622 'cpp_class': extended_attributes.get('PartialInterfaceImplementedAs'),
623 'deprecate_as': v8_utilities.deprecate_as(constant), # [DeprecateAs] 623 'deprecate_as': v8_utilities.deprecate_as(constant), # [DeprecateAs]
624 'idl_type': constant.idl_type.name, 624 'idl_type': constant.idl_type.name,
625 'is_api_experiment_enabled': v8_utilities.api_experiment_enabled_functio n(constant) or v8_utilities.api_experiment_enabled_function(interface), # [APIE xperimentEnabled] 625 'is_api_experiment_enabled': v8_utilities.api_experiment_enabled_functio n(constant) or v8_utilities.api_experiment_enabled_function(interface), # [APIE xperimentEnabled]
626 'measure_as': v8_utilities.measure_as(constant, interface), # [MeasureA s] 626 'measure_as': v8_utilities.measure_as(constant, interface), # [MeasureA s]
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 1398
1399 extended_attributes = deleter.extended_attributes 1399 extended_attributes = deleter.extended_attributes
1400 idl_type = deleter.idl_type 1400 idl_type = deleter.idl_type
1401 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState') 1401 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState')
1402 return { 1402 return {
1403 'is_call_with_script_state': is_call_with_script_state, 1403 'is_call_with_script_state': is_call_with_script_state,
1404 'is_custom': 'Custom' in extended_attributes, 1404 'is_custom': 'Custom' in extended_attributes,
1405 'is_raises_exception': 'RaisesException' in extended_attributes, 1405 'is_raises_exception': 'RaisesException' in extended_attributes,
1406 'name': cpp_name(deleter), 1406 'name': cpp_name(deleter),
1407 } 1407 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/v8_attributes.py ('k') | third_party/WebKit/Source/bindings/scripts/v8_methods.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698