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

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

Issue 2471393004: bindings: Use forward declarations for wrapper types in dictionary_impl (Closed)
Patch Set: WIP 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..beb996a69ea01138afd004b312a46ca86c0eab9d 100644
--- a/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/dictionary_impl.h.tmpl
@@ -10,6 +10,10 @@
namespace blink {
+{% for decl in header_forward_decls %}
+class {{decl}};
+{% endfor %}
+
{# FIXME: Add "final" if this class doesn\'t have subclasses #}
class {{exported}}{{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_class}}{% endif %} {
DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
@@ -18,11 +22,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}}; }
bashi 2016/11/11 01:54:02 I had to move definitions into .cpp.tmpl as some t
- {{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 %}

Powered by Google App Engine
This is Rietveld 408576698