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

Unified Diff: third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl

Issue 2494973002: bindings: Stop using Nullable<T> in dictionary impl (Closed)
Patch Set: Comments Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl b/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl
index c7c15cf7b3d1674f549d309987ad17d98d22bced..f69a7bddf3bb496110998c938927a415c192790f 100644
--- a/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl
@@ -18,11 +18,11 @@ class {{exported}}{{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_c
virtual ~{{cpp_class}}();
{% for member in members %}
- bool {{member.has_method_name}}() const { return {{member.has_method_expression}}; }
- {{member.rvalue_cpp_type}} {{member.cpp_name}}() const { return {{member.getter_expression}}; }
- void {{member.setter_name}}({{member.rvalue_cpp_type}} value) { m_{{member.cpp_name}} = value; }
+ bool {{member.has_method_name}}() const;
+ {{member.rvalue_cpp_type}} {{member.cpp_name}}() const;
+ void {{member.setter_name}}({{member.rvalue_cpp_type}});
{% if member.null_setter_name %}
- void {{member.null_setter_name}}() { m_{{member.cpp_name}} = {{member.member_cpp_type}}(); }
+ void {{member.null_setter_name}}();
{% endif %}
{% endfor %}
@@ -31,6 +31,9 @@ class {{exported}}{{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_c
private:
{% for member in members %}
+ {% if member.nullable_indicator_name %}
+ bool {{member.nullable_indicator_name}} = false;
+ {% endif %}
{{member.member_cpp_type}} m_{{member.cpp_name}};
{% endfor %}

Powered by Google App Engine
This is Rietveld 408576698