1 {% from 'macros.tmpl' import license %}
5 {% if suffix == 'Modules' %}
6 #include "modules/{{namespace}}{{suffix}}Factory.h"
8 #include "core/events/{{namespace}}Factory.h"
11 #include "{{namespace}}{{suffix}}Headers.h"
12 #include "platform/RuntimeEnabledFeatures.h"
16 PassRefPtrWillBeRawPtr<{{namespace}}> {{namespace}}{{suffix}}Factory::create(const String& type)
18 {% for event in events %}
19 {% filter enable_conditional(event.Conditional) %}
20 {% if event|script_name|case_insensitive_matching %}
21 if (equalIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabled %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %})
23 if (type == "{{event|script_name}}"{% if event.RuntimeEnabled %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %})
25 return {{event|cpp_name}}::create();