Chromium Code Reviews| Index: third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl |
| diff --git a/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d4edb9d1f3fb2f1cbfc3902998de45ca9d3a909c |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/build/scripts/templates/ExperimentalFeatures.cpp.tmpl |
| @@ -0,0 +1,23 @@ |
| +{% from 'macros.tmpl' import license %} |
| +{{license()}} |
| + |
| +#include "config.h" |
|
jbroman
2015/12/21 15:03:51
warning: config.h will go away soon (https://code.
iclelland
2015/12/21 17:17:24
Acknowledged, thanks - I'll keep an eye on that.
|
| +#include "core/experiments/ExperimentalFeatures.h" |
| + |
| +#include "core/experiments/Experiments.h" |
| +#include "platform/RuntimeEnabledFeatures.h" |
| + |
| +namespace blink { |
| +{% for feature in features %} |
| +{% if feature.api_name %} |
| + |
| +// static |
| +bool ExperimentalFeatures::{{feature.first_lowered_name}}Enabled(ExecutionContext* executionContext, String& errorMessage) { |
| + if (RuntimeEnabledFeatures::{{feature.first_lowered_name}}Enabled()) |
| + return true; |
| + return Experiments::isApiEnabled(executionContext, "{{feature.api_name}}", errorMessage); |
| +} |
| +{% endif %} |
| +{% endfor %} |
| + |
| +} // namespace blink |