Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: sky/engine/build/scripts/templates/EventFactory.cpp.tmpl

Issue 879743004: Remove the EventFactory machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/build/scripts/scripts.gypi ('k') | sky/engine/core/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 {% from 'macros.tmpl' import license %}
2 {{license()}}
3
4 #include "config.h"
5 #include "core/events/{{namespace}}Factory.h"
6
7 #include "{{namespace}}{{suffix}}Headers.h"
8 #include "gen/sky/platform/RuntimeEnabledFeatures.h"
9
10 namespace blink {
11
12 PassRefPtr<{{namespace}}> {{namespace}}{{suffix}}Factory::create(const String& t ype)
13 {
14 {% for event in events %}
15 {% filter enable_conditional(event.Conditional) %}
16 {% if event|script_name|case_insensitive_matching %}
17 if (equalIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabl ed %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %})
18 {% else %}
19 if (type == "{{event|script_name}}"{% if event.RuntimeEnabled %} && RuntimeE nabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %})
20 {% endif %}
21 return {{event|cpp_name}}::create();
22 {% endfilter %}
23 {% endfor %}
24 return nullptr;
25 }
26
27 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/build/scripts/scripts.gypi ('k') | sky/engine/core/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698