mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix (most) generated includes to have gen/ in their path. This makes it easier to tell where files exist on disk. Unfortunately I had to leave the old include path in engine/BUILD.gn to support all the v8 includes which were too many to deal with in this patch. It's a little nasty to have the raw build directory in our include path, but it produces nicer paths. R=abarth@chromium.org
28 lines
936 B
Cheetah
28 lines
936 B
Cheetah
{% from 'macros.tmpl' import license %}
|
|
{{license()}}
|
|
|
|
#include "config.h"
|
|
#include "core/events/{{namespace}}Factory.h"
|
|
|
|
#include "{{namespace}}{{suffix}}Headers.h"
|
|
#include "gen/sky/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
|