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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/conversions.cpp

Issue 1550393002: Rename conversions.cpp to utilities.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
(Empty)
1 {% macro v8_value_to_local_cpp_value(thing) %}
2 {# This indirection is just to avoid spurious white-space lines. #}
3 {{generate_v8_value_to_local_cpp_value(thing) | trim}}
4 {%- endmacro %}
5
6
7 {% macro generate_v8_value_to_local_cpp_value(thing) %}
8 {% set item = thing.v8_value_to_local_cpp_value or thing %}
9 {% if item.error_message %}
10 /* {{item.error_message}} */
11 {% else %}
12 {% if item.declare_variable %}
13 {% if item.assign_expression %}
14 {{item.cpp_type}} {{item.cpp_name}} = {{item.assign_expression}};
15 {% else %}
16 {{item.cpp_type}} {{item.cpp_name}};
17 {% endif %}
18 {% else %}{# item.declare_variable #}
19 {% if item.assign_expression %}
20 {{item.cpp_name}} = {{item.assign_expression}};
21 {% endif %}
22 {% endif %}{# item.declare_variable #}
23 {% if item.set_expression %}
24 {{item.set_expression}};
25 {% endif %}
26 {% if item.check_expression %}
27 if ({{item.check_expression}})
28 return{% if item.return_expression %} {{item.return_expression}}{% endif %};
29 {% endif %}{# item.check_expression #}
30 {% endif %}{# item.error_message #}
31 {% endmacro %}
32
33
34 {% macro declare_enum_validation_variable(enum_values) %}
35 const char* validValues[] = {
36 {% for enum_value in enum_values %}
37 "{{enum_value}}",
38 {% endfor %}
39 };
40 {%-endmacro %}
41
42
43 {% macro property_location(member) %}
44 {% set property_location_list = [] %}
45 {% if member.on_instance %}
46 {% set property_location_list = property_location_list + ['V8DOMConfiguration::O nInstance'] %}
47 {% endif %}
48 {% if member.on_prototype %}
49 {% set property_location_list = property_location_list + ['V8DOMConfiguration::O nPrototype'] %}
50 {% endif %}
51 {% if member.on_interface %}
52 {% set property_location_list = property_location_list + ['V8DOMConfiguration::O nInterface'] %}
53 {% endif %}
54 {{property_location_list | join(' | ')}}
55 {%- endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698