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

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

Issue 1259763006: Use std::string instead of WebString in WebRuntimeFeatures (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
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>
8
7 #include "platform/PlatformExport.h" 9 #include "platform/PlatformExport.h"
8 #include "wtf/Forward.h" 10 #include "wtf/Forward.h"
9 11
10 namespace blink { 12 namespace blink {
11 13
12 // A class that stores static enablers for all experimental features. 14 // A class that stores static enablers for all experimental features.
13 15
14 class PLATFORM_EXPORT RuntimeEnabledFeatures { 16 class PLATFORM_EXPORT RuntimeEnabledFeatures {
15 public: 17 public:
16 {% for feature_set in feature_sets %} 18 {% for feature_set in feature_sets %}
17 static void set{{feature_set|capitalize}}FeaturesEnabled(bool); 19 static void set{{feature_set|capitalize}}FeaturesEnabled(bool);
18 {% endfor %} 20 {% endfor %}
19 21
20 static void setFeatureEnabledFromString(const WTF::String& name, bool isEnab led); 22 static void setFeatureEnabledFromString(const std::string& name, bool isEnab led);
21 23
22 {% for feature in features %} 24 {% for feature in features %}
23 {% if feature.custom %} 25 {% if feature.custom %}
24 static bool {{feature.first_lowered_name}}Enabled(); 26 static bool {{feature.first_lowered_name}}Enabled();
25 {% else %} 27 {% else %}
26 {% if feature.condition %} 28 {% if feature.condition %}
27 #if ENABLE({{feature.condition}}) 29 #if ENABLE({{feature.condition}})
28 {% endif %} 30 {% endif %}
29 static void set{{feature.name}}Enabled(bool isEnabled) { is{{feature.name}}E nabled = isEnabled; } 31 static void set{{feature.name}}Enabled(bool isEnabled) { is{{feature.name}}E nabled = isEnabled; }
30 static bool {{feature.first_lowered_name}}Enabled() { return {{feature.enabl ed_condition}}; } 32 static bool {{feature.first_lowered_name}}Enabled() { return {{feature.enabl ed_condition}}; }
(...skipping 13 matching lines...) Expand all
44 {% for feature in features if not feature.custom %} 46 {% for feature in features if not feature.custom %}
45 {% filter enable_conditional(feature.condition) %} 47 {% filter enable_conditional(feature.condition) %}
46 static bool is{{feature.name}}Enabled; 48 static bool is{{feature.name}}Enabled;
47 {% endfilter %} 49 {% endfilter %}
48 {% endfor %} 50 {% endfor %}
49 }; 51 };
50 52
51 } // namespace blink 53 } // namespace blink
52 54
53 #endif // RuntimeEnabledFeatures_h 55 #endif // RuntimeEnabledFeatures_h
OLDNEW
« no previous file with comments | « Source/build/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl ('k') | Source/web/WebRuntimeFeatures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698