Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(952)

Side by Side Diff: Source/build/scripts/templates/RuntimeEnabledFeatures.h.tmpl

Issue 236673002: Simplify whitespace handling in build/ Jinja templates (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: One more FIXME Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 {% from "macros.tmpl" import wrap_with_condition, license -%} 1 {% from "macros.tmpl" import wrap_with_condition, 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 "platform/PlatformExport.h" 7 #include "platform/PlatformExport.h"
8 8
9 namespace WebCore { 9 namespace WebCore {
10 10
11 // A class that stores static enablers for all experimental features. 11 // A class that stores static enablers for all experimental features.
12 12
13 class PLATFORM_EXPORT RuntimeEnabledFeatures { 13 class PLATFORM_EXPORT RuntimeEnabledFeatures {
14 public: 14 public:
15 {% for feature_set in feature_sets %}
16 static void set{{feature_set|capitalize}}FeaturesEnabled(bool);
17 {% endfor %}
15 18
16 {%- for feature_set in feature_sets %}
17 static void set{{feature_set|capitalize}}FeaturesEnabled(bool);
18 {%- endfor %}
19 19
20 {% for feature in features %} 20 {% for feature in features %}
21 {%- if feature.custom %} 21 {% if feature.custom %}
22 static bool {{feature.first_lowered_name}}Enabled(); 22 static bool {{feature.first_lowered_name}}Enabled();
23 {%- else %} 23 {% else %}
24 {%- if feature.condition %} 24 {% if feature.condition %}
25 #if ENABLE({{feature.condition}}) 25 #if ENABLE({{feature.condition}})
26 {%- endif %} 26 {% endif %}
27 static void set{{feature.name}}Enabled(bool isEnabled) { is{{feature.name}}E nabled = isEnabled; } 27 static void set{{feature.name}}Enabled(bool isEnabled) { is{{feature.name}}E nabled = isEnabled; }
28 static bool {{feature.first_lowered_name}}Enabled() { return {{feature.enabl ed_condition}}; } 28 static bool {{feature.first_lowered_name}}Enabled() { return {{feature.enabl ed_condition}}; }
29 {%- if feature.condition %} 29 {% if feature.condition %}
30 #else 30 #else
31 static void set{{feature.name}}Enabled(bool) { } 31 static void set{{feature.name}}Enabled(bool) { }
32 static bool {{feature.first_lowered_name}}Enabled() { return false; } 32 static bool {{feature.first_lowered_name}}Enabled() { return false; }
33 #endif 33 #endif
34 {%- endif %} 34 {% endif %}
35 {%- endif %} 35
36 {% endfor %} 36 {% endif %}
37 {% endfor %}
37 38
38 private: 39 private:
39 RuntimeEnabledFeatures() { } 40 RuntimeEnabledFeatures() { }
40 {% for feature in features if not feature.custom %} 41
41 {%- call wrap_with_condition(feature.condition) %} 42 {% for feature in features if not feature.custom %}
43 {% call wrap_with_condition(feature.condition) %}
42 static bool is{{feature.name}}Enabled; 44 static bool is{{feature.name}}Enabled;
43 {%- endcall %} 45 {% endcall %}
44 {%- endfor %} 46 {% endfor %}
45 }; 47 };
46 48
47 } // namespace WebCore 49 } // namespace WebCore
48 50
49 #endif // RuntimeEnabledFeatures_h 51 #endif // RuntimeEnabledFeatures_h
OLDNEW
« no previous file with comments | « Source/build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl ('k') | Source/build/scripts/templates/SettingsMacros.h.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698