flutter_flutter/engine/build/scripts/templates/EventFactory.cpp.tmpl
Eric Seidel 64b5cb61a1 Remove all oilpan transitional types
I used do-webcore-rename from Blink/WebKit
which is very good at doing this kind
of search-replace.

Also removed toRefPrtNativeArray after
conversion since it previously had two
separate flavors.  Both versions are no longer
used so I've removed the code until we
need one again.

https://www.irccloud.com/pastebin/5C16p5cE
is the diff I used to do-webcore-rename

TBR=abarth@chromium.org
2014-10-27 14:13:01 -07:00

28 lines
928 B
Cheetah

{% from 'macros.tmpl' import license %}
{{license()}}
#include "config.h"
#include "core/events/{{namespace}}Factory.h"
#include "{{namespace}}{{suffix}}Headers.h"
#include "platform/RuntimeEnabledFeatures.h"
namespace blink {
PassRefPtr<{{namespace}}> {{namespace}}{{suffix}}Factory::create(const String& type)
{
{% for event in events %}
{% filter enable_conditional(event.Conditional) %}
{% if event|script_name|case_insensitive_matching %}
if (equalIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabled %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %})
{% else %}
if (type == "{{event|script_name}}"{% if event.RuntimeEnabled %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %})
{% endif %}
return {{event|cpp_name}}::create();
{% endfilter %}
{% endfor %}
return nullptr;
}
} // namespace blink