{% from 'templates/macros.tmpl' import license, source_files_for_generated_file %}
{{license(2023)}}
{{source_files_for_generated_file(template_file, input_files)}}
#include "third_party/blink/renderer/core/frame/deprecation/deprecation_info.h"
#include "third_party/blink/renderer/core/frame/web_feature.h"
namespace blink {
const char kNotDeprecated[] = "NotDeprecated";
const DeprecationInfo GetDeprecationInfo(WebFeature feature) {
switch (feature) {
{% for deprecation in deprecations %}
{% if deprecation.web_features and not deprecation.obsolete_to_be_removed_after_milestone %}
{% for web_feature in deprecation.web_features %}
case WebFeature::{{web_feature}}:
{% endfor %}
return DeprecationInfo::Create(
feature,
"{{deprecation.name}}",
"{{deprecation.message.replace("\\", "\\\\")}}");
{% endif %}
{% endfor %}
default:
return DeprecationInfo::Invalid(feature);
}
}
} // namespace blink