| Index: Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl
|
| diff --git a/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl b/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d08dc3e2cbd4898bd1278983b0aa0c9fcbfd1495
|
| --- /dev/null
|
| +++ b/Source/core/scripts/templates/RuntimeEnabledFeatures.h.tmpl
|
| @@ -0,0 +1,48 @@
|
| +{% from "macros.tmpl" import wrap_with_condition -%}
|
| +
|
| +{{ license }}
|
| +#ifndef RuntimeEnabledFeatures_h
|
| +#define RuntimeEnabledFeatures_h
|
| +
|
| +namespace WebCore {
|
| +
|
| +// A class that stores static enablers for all experimental features.
|
| +
|
| +class RuntimeEnabledFeatures {
|
| +public:
|
| +
|
| +{%- for feature_set in feature_sets %}
|
| + static void set{{feature_set|capitalize}}FeaturesEnabled(bool);
|
| +{%- endfor %}
|
| +
|
| +{% for feature in features %}
|
| +{%- if feature.custom %}
|
| + static bool {{feature.first_lowered_name}}Enabled();
|
| +{%- else %}
|
| +{%- if feature.condition %}
|
| +#if ENABLE({{feature.condition}})
|
| +{%- endif %}
|
| + static void set{{feature.name}}Enabled(bool isEnabled) { is{{feature.name}}Enabled = isEnabled; }
|
| + static bool {{feature.first_lowered_name}}Enabled() { return {{feature.enabled_condition}}; }
|
| +{%- if feature.condition %}
|
| +#else
|
| + static void set{{feature.name}}Enabled(bool) { }
|
| + static bool {{feature.first_lowered_name}}Enabled() { return false; }
|
| +#endif
|
| +{%- endif %}
|
| +{%- endif %}
|
| +{% endfor %}
|
| +
|
| +private:
|
| + RuntimeEnabledFeatures() { }
|
| +{% for feature in features if not feature.custom %}
|
| +{%- call wrap_with_condition(feature.condition) %}
|
| + static bool is{{feature.name}}Enabled;
|
| +{%- endcall %}
|
| +{%- endfor %}
|
| +};
|
| +
|
| +} // namespace WebCore
|
| +
|
| +#endif // RuntimeEnabledFeatures_h
|
| +
|
|
|