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

Side by Side 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 unified diff | Download patch
OLDNEW
1 {% filter format_blink_cpp_source_code %} 1 {% filter format_blink_cpp_source_code %}
2 2
3 {% include 'copyright_block.txt' %} 3 {% include 'copyright_block.txt' %}
4 #ifndef {{cpp_class}}_h 4 #ifndef {{cpp_class}}_h
5 #define {{cpp_class}}_h 5 #define {{cpp_class}}_h
6 6
7 {% for filename in header_includes %} 7 {% for filename in header_includes %}
8 #include "{{filename}}" 8 #include "{{filename}}"
9 {% endfor %} 9 {% endfor %}
10 10
11 namespace blink { 11 namespace blink {
12 12
13 {% for decl in header_forward_decls %}
14 class {{decl}};
15 {% endfor %}
16
13 {# FIXME: Add "final" if this class doesn\'t have subclasses #} 17 {# FIXME: Add "final" if this class doesn\'t have subclasses #}
14 class {{exported}}{{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_c lass}}{% endif %} { 18 class {{exported}}{{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_c lass}}{% endif %} {
15 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 19 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
16 public: 20 public:
17 {{cpp_class}}(); 21 {{cpp_class}}();
18 virtual ~{{cpp_class}}(); 22 virtual ~{{cpp_class}}();
19 23
20 {% for member in members %} 24 {% for member in members %}
21 bool {{member.has_method_name}}() const { return {{member.has_method_expressio n}}; } 25 bool {{member.has_method_name}}() const;
bashi 2016/11/11 01:54:02 I had to move definitions into .cpp.tmpl as some t
22 {{member.rvalue_cpp_type}} {{member.cpp_name}}() const { return {{member.gette r_expression}}; } 26 {{member.rvalue_cpp_type}} {{member.cpp_name}}() const;
23 void {{member.setter_name}}({{member.rvalue_cpp_type}} value) { m_{{member.cpp _name}} = value; } 27 void {{member.setter_name}}({{member.rvalue_cpp_type}});
24 {% if member.null_setter_name %} 28 {% if member.null_setter_name %}
25 void {{member.null_setter_name}}() { m_{{member.cpp_name}} = {{member.member_c pp_type}}(); } 29 void {{member.null_setter_name}}();
26 {% endif %} 30 {% endif %}
27 31
28 {% endfor %} 32 {% endfor %}
29 v8::Local<v8::Value> toV8Impl(v8::Local<v8::Object>, v8::Isolate*) const overr ide; 33 v8::Local<v8::Value> toV8Impl(v8::Local<v8::Object>, v8::Isolate*) const overr ide;
30 DECLARE_VIRTUAL_TRACE(); 34 DECLARE_VIRTUAL_TRACE();
31 35
32 private: 36 private:
33 {% for member in members %} 37 {% for member in members %}
34 {{member.member_cpp_type}} m_{{member.cpp_name}}; 38 {{member.member_cpp_type}} m_{{member.cpp_name}};
35 {% endfor %} 39 {% endfor %}
36 40
37 friend class V8{{cpp_class}}; 41 friend class V8{{cpp_class}};
38 }; 42 };
39 43
40 } // namespace blink 44 } // namespace blink
41 45
42 #endif // {{cpp_class}}_h 46 #endif // {{cpp_class}}_h
43 47
44 {% endfilter %}{# format_blink_cpp_source_code #} 48 {% endfilter %}{# format_blink_cpp_source_code #}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698