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

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_interface.py

Issue 1531443003: [bindings] Implement an ExperimentEnabled IDL extended attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Install interfaces/attributes/methods unconditionally. Use the generated ExperimentalFeature functi… Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/scripts/v8_interface.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_interface.py b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
index 95bebe6d73e6bad0083dace58c3c811477425eee..63ce7de9c6031fb1229180c241cb8e2b689e942f 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_interface.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
@@ -46,7 +46,7 @@ import v8_methods
import v8_types
from v8_types import cpp_ptr_type, cpp_template_type
import v8_utilities
-from v8_utilities import (cpp_name_or_partial, capitalize, conditional_string, cpp_name, gc_type,
+from v8_utilities import (api_experiment_enabled_function, cpp_name_or_partial, capitalize, conditional_string, cpp_name, gc_type,
has_extended_attribute_value, runtime_enabled_function_name,
extended_attribute_value_as_list, is_legacy_interface_type_checking)
@@ -65,6 +65,8 @@ INTERFACE_CPP_INCLUDES = frozenset([
'bindings/core/v8/V8ObjectConstructor.h',
'core/dom/ContextFeatures.h',
'core/dom/Document.h',
+ 'core/experiments/ExperimentalFeatures.h',
+ 'core/inspector/ConsoleMessage.h',
'platform/RuntimeEnabledFeatures.h',
'platform/TraceEvent.h',
'wtf/GetPtr.h',
@@ -163,6 +165,7 @@ def interface_context(interface):
v8_class_name_or_partial = v8_utilities.v8_class_name_or_partial(interface)
context = {
+ 'api_experiment_name': v8_utilities.api_experiment_name(interface),
'conditional_string': conditional_string(interface), # [Conditional]
'cpp_class': cpp_class_name,
'cpp_class_or_partial': cpp_class_name_or_partial,
@@ -261,7 +264,7 @@ def interface_context(interface):
constant_configuration_constants = []
for constant in constants:
- if constant['measure_as'] or constant['deprecate_as']:
+ if constant['measure_as'] or constant['deprecate_as'] or constant['api_experiment_name']:
special_getter_constants.append(constant)
continue
runtime_enabled_function = constant['runtime_enabled_function']
@@ -607,6 +610,9 @@ def interface_context(interface):
def constant_context(constant, interface):
extended_attributes = constant.extended_attributes
return {
+ 'api_experiment_name': extended_attributes.get('APIExperimentEnabled'), # [APIExperimentEnabled]
+ 'api_experiment_inherited_enabled': v8_utilities.api_experiment_enabled_function(interface), # [APIExperimentEnabled]
haraken 2015/12/30 00:25:32 api_experiment_inherited_enabled => api_experiment
Daniel Nishi 2015/12/30 22:05:50 Done.
+ 'api_experiment_enabled': v8_utilities.api_experiment_enabled_function(constant), # [APIExperimentEnabled]
'cpp_class': extended_attributes.get('PartialInterfaceImplementedAs'),
'deprecate_as': v8_utilities.deprecate_as(constant), # [DeprecateAs]
'idl_type': constant.idl_type.name,

Powered by Google App Engine
This is Rietveld 408576698