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

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

Issue 18578007: Add a public API to enable/disable blink runtime features by name (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Require a 'command_line_flag' option in RuntimeEnabledFeatures.in Created 7 years, 5 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 "wtf/text/WTFString.h"
8
7 namespace WebCore { 9 namespace WebCore {
8 10
9 // A class that stores static enablers for all experimental features. 11 // A class that stores static enablers for all experimental features.
10 12
11 class RuntimeEnabledFeatures { 13 class RuntimeEnabledFeatures {
12 public: 14 public:
13 15
16 static bool setFeatureEnabled(const String& feature, bool enable);
14 {%- for feature_set in feature_sets %} 17 {%- for feature_set in feature_sets %}
15 static void set{{feature_set|capitalize}}FeaturesEnabled(bool); 18 static void set{{feature_set|capitalize}}FeaturesEnabled(bool);
16 {%- endfor %} 19 {%- endfor %}
17 20
18 {% for feature in features %} 21 {% for feature in features %}
19 {%- if feature.custom %} 22 {%- if feature.custom %}
20 static bool {{feature.first_lowered_name}}Enabled(); 23 static bool {{feature.first_lowered_name}}Enabled();
21 {%- else %} 24 {%- else %}
22 {%- if feature.condition %} 25 {%- if feature.condition %}
23 #if ENABLE({{feature.condition}}) 26 #if ENABLE({{feature.condition}})
(...skipping 15 matching lines...) Expand all
39 {%- call wrap_with_condition(feature.condition) %} 42 {%- call wrap_with_condition(feature.condition) %}
40 static bool is{{feature.name}}Enabled; 43 static bool is{{feature.name}}Enabled;
41 {%- endcall %} 44 {%- endcall %}
42 {%- endfor %} 45 {%- endfor %}
43 }; 46 };
44 47
45 } // namespace WebCore 48 } // namespace WebCore
46 49
47 #endif // RuntimeEnabledFeatures_h 50 #endif // RuntimeEnabledFeatures_h
48 51
OLDNEW
« no previous file with comments | « Source/core/scripts/templates/RuntimeEnabledFeatures.cpp.tmpl ('k') | public/web/WebRuntimeFeatures.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698