OLD | NEW |
(Empty) | |
| 1 {% from "macros.tmpl" import wrap_with_condition -%} |
| 2 |
| 3 {{ license }} |
| 4 #include "config.h" |
| 5 #include "EventFactory.h" |
| 6 |
| 7 #include "EventHeaders.h" |
| 8 #include "RuntimeEnabledFeatures.h" |
| 9 |
| 10 namespace WebCore { |
| 11 |
| 12 PassRefPtr<{{namespace}}> {{namespace}}Factory::create(const String& type) |
| 13 { |
| 14 {%- for event in events %} |
| 15 {%- call wrap_with_condition(event.conditional) %} |
| 16 if (type == "{{event.name}}" |
| 17 {{- " && RuntimeEnabledFeatures::" + event.runtimeConditional + "()" if
event.runtimeConditional else "" -}} |
| 18 ) |
| 19 return {{event.interfaceName}}::create(); |
| 20 {%- endcall %} |
| 21 {%- endfor %} |
| 22 return 0; |
| 23 } |
| 24 |
| 25 } // namespace WebCore |
| 26 |
OLD | NEW |