| OLD | NEW |
| 1 {% from 'macros.tmpl' import license %} | 1 {% from 'macros.tmpl' import license %} |
| 2 {{license()}} | 2 {{license()}} |
| 3 | 3 |
| 4 #ifndef RuntimeEnabledFeatures_h | 4 #ifndef RuntimeEnabledFeatures_h |
| 5 #define RuntimeEnabledFeatures_h | 5 #define RuntimeEnabledFeatures_h |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "platform/PlatformExport.h" | 9 #include "platform/PlatformExport.h" |
| 10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 {% for feature_set in feature_sets %} | 32 {% for feature_set in feature_sets %} |
| 33 static void set{{feature_set|capitalize}}FeaturesEnabled(bool); | 33 static void set{{feature_set|capitalize}}FeaturesEnabled(bool); |
| 34 {% endfor %} | 34 {% endfor %} |
| 35 | 35 |
| 36 static void setFeatureEnabledFromString(const std::string& name, bool isEnable
d); | 36 static void setFeatureEnabledFromString(const std::string& name, bool isEnable
d); |
| 37 | 37 |
| 38 {% for feature in features %} | 38 {% for feature in features %} |
| 39 {% if feature.custom %} | 39 {% if feature.custom %} |
| 40 static bool {{feature.first_lowered_name}}Enabled(); | 40 static bool {{feature.first_lowered_name}}Enabled(); |
| 41 {% else %} | 41 {% else %} |
| 42 {% if feature.condition %} | |
| 43 #if ENABLE({{feature.condition}}) | |
| 44 {% endif %} | |
| 45 static void set{{feature.name}}Enabled(bool isEnabled) { is{{feature.name}}Ena
bled = isEnabled; } | 42 static void set{{feature.name}}Enabled(bool isEnabled) { is{{feature.name}}Ena
bled = isEnabled; } |
| 46 static bool {{feature.first_lowered_name}}Enabled() { return {{feature.enabled
_condition}}; } | 43 static bool {{feature.first_lowered_name}}Enabled() { return {{feature.enabled
_condition}}; } |
| 47 {% if feature.condition %} | |
| 48 #else | |
| 49 static void set{{feature.name}}Enabled(bool) { } | |
| 50 static bool {{feature.first_lowered_name}}Enabled() { return false; } | |
| 51 #endif | |
| 52 {% endif %} | |
| 53 | 44 |
| 54 {% endif %} | 45 {% endif %} |
| 55 {% endfor %} | 46 {% endfor %} |
| 56 | 47 |
| 57 private: | 48 private: |
| 58 {% for feature in standard_features %} | 49 {% for feature in standard_features %} |
| 59 static bool is{{feature.name}}Enabled; | 50 static bool is{{feature.name}}Enabled; |
| 60 {% endfor %} | 51 {% endfor %} |
| 61 }; | 52 }; |
| 62 | 53 |
| 63 } // namespace blink | 54 } // namespace blink |
| 64 | 55 |
| 65 #endif // RuntimeEnabledFeatures_h | 56 #endif // RuntimeEnabledFeatures_h |
| OLD | NEW |