mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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
28 lines
928 B
Cheetah
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
|