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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/dictionary_impl.h

Issue 2183623004: Add IDLDictionaryBase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix multi-level inheritance bug Created 4 years, 4 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 {% include 'copyright_block.txt' %} 1 {% include 'copyright_block.txt' %}
2 #ifndef {{cpp_class}}_h 2 #ifndef {{cpp_class}}_h
3 #define {{cpp_class}}_h 3 #define {{cpp_class}}_h
4 4
5 {% for filename in header_includes %} 5 {% for filename in header_includes %}
6 #include "{{filename}}" 6 #include "{{filename}}"
7 {% endfor %} 7 {% endfor %}
8 8
9 namespace blink { 9 namespace blink {
10 10
11 {# FIXME: Add "final" if this class doesn't have subclasses #} 11 {# FIXME: Add "final" if this class doesn't have subclasses #}
12 class {{exported}}{{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_c lass}}{% endif %} { 12 class {{exported}}{{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_c lass}}{% endif %} {
13 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 13 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
14 public: 14 public:
15 {{cpp_class}}(); 15 {{cpp_class}}();
16 virtual ~{{cpp_class}}(); 16 virtual ~{{cpp_class}}();
17 17
18 {% for member in members %} 18 {% for member in members %}
19 bool {{member.has_method_name}}() const { return {{member.has_method_express ion}}; } 19 bool {{member.has_method_name}}() const { return {{member.has_method_express ion}}; }
20 {{member.rvalue_cpp_type}} {{member.cpp_name}}() const { return {{member.get ter_expression}}; } 20 {{member.rvalue_cpp_type}} {{member.cpp_name}}() const { return {{member.get ter_expression}}; }
21 void {{member.setter_name}}({{member.rvalue_cpp_type}} value) { m_{{member.c pp_name}} = value; } 21 void {{member.setter_name}}({{member.rvalue_cpp_type}} value) { m_{{member.c pp_name}} = value; }
22 {% if member.null_setter_name %} 22 {% if member.null_setter_name %}
23 void {{member.null_setter_name}}() { m_{{member.cpp_name}} = {{member.member _cpp_type}}(); } 23 void {{member.null_setter_name}}() { m_{{member.cpp_name}} = {{member.member _cpp_type}}(); }
24 {% endif %} 24 {% endif %}
25 25
26 {% endfor %} 26 {% endfor %}
27 v8::Local<v8::Value> toV8Impl(v8::Local<v8::Object>, v8::Isolate*) const ove rride;
27 DECLARE_VIRTUAL_TRACE(); 28 DECLARE_VIRTUAL_TRACE();
28 29
29 private: 30 private:
30 {% for member in members %} 31 {% for member in members %}
31 {{member.member_cpp_type}} m_{{member.cpp_name}}; 32 {{member.member_cpp_type}} m_{{member.cpp_name}};
32 {% endfor %} 33 {% endfor %}
33 34
34 friend class V8{{cpp_class}}; 35 friend class V8{{cpp_class}};
35 }; 36 };
36 37
37 } // namespace blink 38 } // namespace blink
38 39
39 #endif // {{cpp_class}}_h 40 #endif // {{cpp_class}}_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698