| OLD | NEW |
| 1 {% from 'macros.tmpl' import license %} | 1 {% from 'macros.tmpl' import license %} |
| 2 {{license()}} | 2 {{license()}} |
| 3 | 3 |
| 4 {% if suffix == 'Modules' %} | 4 {% if suffix == 'Modules' %} |
| 5 #include "modules/{{namespace}}{{suffix}}Factory.h" | 5 #include "modules/{{namespace}}{{suffix}}Factory.h" |
| 6 {% else %} | 6 {% else %} |
| 7 #include "core/events/{{namespace}}Factory.h" | 7 #include "core/events/{{namespace}}Factory.h" |
| 8 {% endif %} | 8 {% endif %} |
| 9 | 9 |
| 10 #include "{{namespace}}{{suffix}}Headers.h" | 10 #include "{{namespace}}{{suffix}}Headers.h" |
| 11 #include "platform/RuntimeEnabledFeatures.h" | 11 #include "platform/RuntimeEnabledFeatures.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 PassRefPtrWillBeRawPtr<{{namespace}}> {{namespace}}{{suffix}}Factory::create(con
st String& type) | 15 PassRefPtrWillBeRawPtr<{{namespace}}> {{namespace}}{{suffix}}Factory::create(Exe
cutionContext*, const String& type) |
| 16 { | 16 { |
| 17 {% for event in events %} | 17 {% for event in events %} |
| 18 {% if event|script_name|case_insensitive_matching %} | 18 {% if event|script_name|case_insensitive_matching %} |
| 19 if (equalIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabl
ed %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif
%}) | 19 if (equalIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabl
ed %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif
%}) |
| 20 {% else %} | 20 {% else %} |
| 21 if (type == "{{event|script_name}}"{% if event.RuntimeEnabled %} && RuntimeE
nabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) | 21 if (type == "{{event|script_name}}"{% if event.RuntimeEnabled %} && RuntimeE
nabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) |
| 22 {% endif %} | 22 {% endif %} |
| 23 return {{event|cpp_name}}::create(); | 23 return {{event|cpp_name}}::create(); |
| 24 {% endfor %} | 24 {% endfor %} |
| 25 return nullptr; | 25 return nullptr; |
| 26 } | 26 } |
| 27 | 27 |
| 28 } // namespace blink | 28 } // namespace blink |
| OLD | NEW |