1 {% from 'macros.tmpl' import license %}
4 #ifndef RuntimeEnabledFeatures_h
5 #define RuntimeEnabledFeatures_h
9 #include "platform/PlatformExport.h"
10 #include "wtf/Forward.h"
14 // A class that stores static enablers for all experimental features.
16 class PLATFORM_EXPORT RuntimeEnabledFeatures {
18 {% for feature_set in feature_sets %}
19 static void set{{feature_set|capitalize}}FeaturesEnabled(bool);
22 static void setFeatureEnabledFromString(const std::string& name, bool isEnabled);
24 {% for feature in features %}
25 {% if feature.custom %}
26 static bool {{feature.first_lowered_name}}Enabled();
28 {% if feature.condition %}
29 #if ENABLE({{feature.condition}})
31 static void set{{feature.name}}Enabled(bool isEnabled) { is{{feature.name}}Enabled = isEnabled; }
32 static bool {{feature.first_lowered_name}}Enabled() { return {{feature.enabled_condition}}; }
33 {% if feature.condition %}
35 static void set{{feature.name}}Enabled(bool) { }
36 static bool {{feature.first_lowered_name}}Enabled() { return false; }
44 RuntimeEnabledFeatures() { }
46 {% for feature in features if not feature.custom %}
47 {% filter enable_conditional(feature.condition) %}
48 static bool is{{feature.name}}Enabled;
55 #endif // RuntimeEnabledFeatures_h