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

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

Issue 424983002: Stop using WebCore namespace in generated code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 {% from 'macros.tmpl' import license %} 1 {% from 'macros.tmpl' import license %}
2 {{license()}} 2 {{license()}}
3 3
4 #include "config.h" 4 #include "config.h"
5 {% if suffix == 'Modules' %} 5 {% if suffix == 'Modules' %}
6 #include "modules/{{namespace}}{{suffix}}Factory.h" 6 #include "modules/{{namespace}}{{suffix}}Factory.h"
7 {% else %} 7 {% else %}
8 #include "core/events/{{namespace}}Factory.h" 8 #include "core/events/{{namespace}}Factory.h"
9 {% endif %} 9 {% endif %}
10 10
11 #include "{{namespace}}{{suffix}}Headers.h" 11 #include "{{namespace}}{{suffix}}Headers.h"
12 #include "platform/RuntimeEnabledFeatures.h" 12 #include "platform/RuntimeEnabledFeatures.h"
13 13
14 namespace WebCore { 14 namespace blink {
15 15
16 PassRefPtrWillBeRawPtr<{{namespace}}> {{namespace}}{{suffix}}Factory::create(con st String& type) 16 PassRefPtrWillBeRawPtr<{{namespace}}> {{namespace}}{{suffix}}Factory::create(con st String& type)
17 { 17 {
18 {% for event in events %} 18 {% for event in events %}
19 {% filter enable_conditional(event.Conditional) %} 19 {% filter enable_conditional(event.Conditional) %}
20 {% if event|script_name|case_insensitive_matching %} 20 {% if event|script_name|case_insensitive_matching %}
21 if (equalIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabl ed %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) 21 if (equalIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabl ed %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %})
22 {% else %} 22 {% else %}
23 if (type == "{{event|script_name}}"{% if event.RuntimeEnabled %} && RuntimeE nabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) 23 if (type == "{{event|script_name}}"{% if event.RuntimeEnabled %} && RuntimeE nabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %})
24 {% endif %} 24 {% endif %}
25 return {{event|cpp_name}}::create(); 25 return {{event|cpp_name}}::create();
26 {% endfilter %} 26 {% endfilter %}
27 {% endfor %} 27 {% endfor %}
28 return nullptr; 28 return nullptr;
29 } 29 }
30 30
31 } // namespace WebCore 31 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698