Chromium Code Reviews| Index: third_party/WebKit/Source/build/scripts/templates/InternalRuntimeFlags.cpp.tmpl |
| diff --git a/third_party/WebKit/Source/build/scripts/templates/InternalRuntimeFlags.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/InternalRuntimeFlags.cpp.tmpl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7464fb5eb9c0786859c1c93eded7c25e2a111822 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/build/scripts/templates/InternalRuntimeFlags.cpp.tmpl |
| @@ -0,0 +1,42 @@ |
| +{% from "macros.tmpl" import license %} |
| +{{ license() }} |
| + |
| +#include "InternalRuntimeFlags.h" |
| + |
| +namespace blink { |
| + |
| +InternalRuntimeFlags* InternalRuntimeFlags::create() |
| +{ |
| + return new InternalRuntimeFlags; |
| +} |
| + |
| +InternalRuntimeFlags::InternalRuntimeFlags() |
| + : m_{{standard_features[0].first_lowered_name}}(RuntimeEnabledFeatures::{{standard_features[0].first_lowered_name}}Enabled()) |
| + {% for feature in standard_features[1:] %} |
| + , m_{{feature.first_lowered_name}}(RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled()) |
| + {% endfor %} |
| +{ |
| +} |
| + |
| +void InternalRuntimeFlags::resetToConsistentState() |
|
ojan
2016/04/22 20:48:31
This doesn't appear to get called anywhere.
ymalik
2016/04/22 20:57:19
There was a comment in the header template that sa
ymalik
2016/04/26 16:03:21
Spoke to you offline. No need to call resetToConsi
|
| +{ |
| + {% for feature in standard_features %} |
| + RuntimeEnabledFeatures::set{{feature.name}}Enabled(m_{{feature.first_lowered_name}}); |
| + {% endfor %} |
| +} |
| + |
| +{% for feature in standard_features %} |
| +void InternalRuntimeFlags::set{{feature.name}}Enabled(bool isEnabled) |
| +{ |
| + RuntimeEnabledFeatures::set{{feature.name}}Enabled(isEnabled); |
| +} |
| +{% endfor %} |
| + |
| +{% for feature in standard_features %} |
| +bool InternalRuntimeFlags::{{feature.first_lowered_name}}Enabled() |
| +{ |
| + return RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled(); |
| +} |
| +{% endfor %} |
| + |
| +} // namespace blink |