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

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

Issue 1691883003: Deprecate SVGZoomEvent and SVGZoomEvents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Time to update histograms.xml Created 4 years, 10 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
OLDNEW
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 "core/frame/UseCounter.h" 11 #include "core/frame/UseCounter.h"
12 #include "platform/RuntimeEnabledFeatures.h" 12 #include "platform/RuntimeEnabledFeatures.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 PassRefPtrWillBeRawPtr<{{namespace}}> {{namespace}}{{suffix}}Factory::create(Exe cutionContext* executionContext, const String& type) 16 PassRefPtrWillBeRawPtr<{{namespace}}> {{namespace}}{{suffix}}Factory::create(Exe cutionContext* executionContext, const String& type)
17 { 17 {
18 {% for event in events %} 18 {% for event in events %}
19 {% if event|script_name|case_insensitive_matching %} 19 {% if event|script_name|create_event_whitelist %}
20 if (equalIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabl ed %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) { 20 if (equalIgnoringCase(type, "{{event|script_name}}"){% if event.RuntimeEnabl ed %} && RuntimeEnabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) {
21 {% else %} 21 {% else %}
22 if (type == "{{event|script_name}}"{% if event.RuntimeEnabled %} && RuntimeE nabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) { 22 if (type == "{{event|script_name}}"{% if event.RuntimeEnabled %} && RuntimeE nabledFeatures::{{event.RuntimeEnabled|lower_first}}(){% endif %}) {
23 {% endif %} 23 {% endif %}
24 {% if not event|script_name|candidate_whitelist %} 24 {% if not event|script_name|create_event_whitelist and not event|script_ name|create_event_deprecate_list %}
25 UseCounter::count(executionContext, UseCounter::{{event|script_name|meas ure_name}}); 25 UseCounter::count(executionContext, UseCounter::{{event|script_name|meas ure_name}});
26 {% endif %} 26 {% endif %}
27 {% if event|script_name|create_event_deprecate_list %}
philipj_slow 2016/02/13 14:48:00 Could this be written in an {% else %} branch with
davve 2016/02/16 08:16:35 Good idea, I like that.
28 UseCounter::countDeprecation(executionContext, UseCounter::{{event|scrip t_name|deprecate_name}});
29 {% endif %}
27 return {{event|cpp_name}}::create(); 30 return {{event|cpp_name}}::create();
28 } 31 }
29 {% endfor %} 32 {% endfor %}
30 return nullptr; 33 return nullptr;
31 } 34 }
32 35
33 } // namespace blink 36 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698