| OLD | NEW |
| (Empty) |
| 1 {% from "macros.tmpl" import wrap_with_condition, license -%} | |
| 2 {{ license() }} | |
| 3 | |
| 4 #ifndef RuntimeEnabledFeatures_h | |
| 5 #define RuntimeEnabledFeatures_h | |
| 6 | |
| 7 namespace WebCore { | |
| 8 | |
| 9 // A class that stores static enablers for all experimental features. | |
| 10 | |
| 11 class RuntimeEnabledFeatures { | |
| 12 public: | |
| 13 | |
| 14 {%- for feature_set in feature_sets %} | |
| 15 static void set{{feature_set|capitalize}}FeaturesEnabled(bool); | |
| 16 {%- endfor %} | |
| 17 | |
| 18 {% for feature in features %} | |
| 19 {%- if feature.custom %} | |
| 20 static bool {{feature.first_lowered_name}}Enabled(); | |
| 21 {%- else %} | |
| 22 {%- if feature.condition %} | |
| 23 #if ENABLE({{feature.condition}}) | |
| 24 {%- endif %} | |
| 25 static void set{{feature.name}}Enabled(bool isEnabled) { is{{feature.name}}E
nabled = isEnabled; } | |
| 26 static bool {{feature.first_lowered_name}}Enabled() { return {{feature.enabl
ed_condition}}; } | |
| 27 {%- if feature.condition %} | |
| 28 #else | |
| 29 static void set{{feature.name}}Enabled(bool) { } | |
| 30 static bool {{feature.first_lowered_name}}Enabled() { return false; } | |
| 31 #endif | |
| 32 {%- endif %} | |
| 33 {%- endif %} | |
| 34 {% endfor %} | |
| 35 | |
| 36 private: | |
| 37 RuntimeEnabledFeatures() { } | |
| 38 {% for feature in features if not feature.custom %} | |
| 39 {%- call wrap_with_condition(feature.condition) %} | |
| 40 static bool is{{feature.name}}Enabled; | |
| 41 {%- endcall %} | |
| 42 {%- endfor %} | |
| 43 }; | |
| 44 | |
| 45 } // namespace WebCore | |
| 46 | |
| 47 #endif // RuntimeEnabledFeatures_h | |
| 48 | |
| OLD | NEW |