1 {% from "macros.tmpl" import wrap_with_condition, license -%}
4 #ifndef RuntimeEnabledFeatures_h
5 #define RuntimeEnabledFeatures_h
7 #include "platform/PlatformExport.h"
11 // A class that stores static enablers for all experimental features.
13 class PLATFORM_EXPORT RuntimeEnabledFeatures {
16 {%- for feature_set in feature_sets %}
17 static void set{{feature_set|capitalize}}FeaturesEnabled(bool);
20 {% for feature in features %}
21 {%- if feature.custom %}
22 static bool {{feature.first_lowered_name}}Enabled();
24 {%- if feature.condition %}
25 #if ENABLE({{feature.condition}})
27 static void set{{feature.name}}Enabled(bool isEnabled) { is{{feature.name}}Enabled = isEnabled; }
28 static bool {{feature.first_lowered_name}}Enabled() { return {{feature.enabled_condition}}; }
29 {%- if feature.condition %}
31 static void set{{feature.name}}Enabled(bool) { }
32 static bool {{feature.first_lowered_name}}Enabled() { return false; }
39 RuntimeEnabledFeatures() { }
40 {% for feature in features if not feature.custom %}
41 {%- call wrap_with_condition(feature.condition) %}
42 static bool is{{feature.name}}Enabled;
47 } // namespace WebCore
49 #endif // RuntimeEnabledFeatures_h