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..18038b112b3794018533d10ac3d6a53049e6cff3 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/build/scripts/templates/InternalRuntimeFlags.cpp.tmpl |
| @@ -0,0 +1,35 @@ |
| +{% from "macros.tmpl" import license %} |
| +{{ license() }} |
| + |
| +#include "InternalRuntimeFlags.h" |
|
jbroman
2016/04/28 14:24:39
full include paths, please (assuming you keep this
ymalik
2016/04/28 15:05:06
Removed .cpp.
|
| + |
| +namespace blink { |
| + |
| +InternalRuntimeFlags* InternalRuntimeFlags::create() |
| +{ |
| + return new InternalRuntimeFlags; |
| +} |
| + |
| +InternalRuntimeFlags::InternalRuntimeFlags() |
| + : |
| + {% for feature in standard_features %} |
| + {%+ if not loop.first %}, {% endif -%} m_{{feature.first_lowered_name}}(RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled()) |
| + {% endfor %} |
| +{ |
| +} |
| + |
| +{% for feature in standard_features if feature.settable_from_internals %} |
| +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 |