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

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

Issue 765673005: IDL: Null values should be converted for non-nullable dictionary members (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY! 5 // This file has been auto-generated by {{code_generator}}. DO NOT MODIFY!
6 6
7 #ifndef {{cpp_class}}_h 7 #ifndef {{cpp_class}}_h
8 #define {{cpp_class}}_h 8 #define {{cpp_class}}_h
9 9
10 {% for filename in header_includes %} 10 {% for filename in header_includes %}
11 #include "{{filename}}" 11 #include "{{filename}}"
12 {% endfor %} 12 {% endfor %}
13 13
14 namespace blink { 14 namespace blink {
15 15
16 {# FIXME: Add "final" if this class doesn't have subclasses #} 16 {# FIXME: Add "final" if this class doesn't have subclasses #}
17 class {{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_class}}{% end if %} { 17 class {{cpp_class}}{% if parent_cpp_class %} : public {{parent_cpp_class}}{% end if %} {
18 ALLOW_ONLY_INLINE_ALLOCATION(); 18 ALLOW_ONLY_INLINE_ALLOCATION();
19 public: 19 public:
20 {{cpp_class}}(); 20 {{cpp_class}}();
21 21
22 {% for member in members %} 22 {% for member in members %}
23 bool {{member.has_method_name}}() const { return {{member.has_method_express ion}}; } 23 bool {{member.has_method_name}}() const { return {{member.has_method_express ion}}; }
24 {{member.rvalue_cpp_type}} {{member.cpp_name}}() const { return {{member.get ter_expression}}; } 24 {{member.rvalue_cpp_type}} {{member.cpp_name}}() const { return {{member.get ter_expression}}; }
25 void {{member.setter_name}}({{member.rvalue_cpp_type}} value) { m_{{member.c pp_name}} = value; } 25 void {{member.setter_name}}({{member.rvalue_cpp_type}} value) { m_{{member.c pp_name}} = value; }
26 void {{member.resetter_name}}() { m_{{member.cpp_name}} = {{member.member_cp p_type}}(); }
Jens Widell 2014/11/28 06:36:18 We could have this only for nullable members, and
bashi 2014/11/28 10:52:48 Done.
26 27
27 {% endfor %} 28 {% endfor %}
28 virtual void trace(Visitor*); 29 virtual void trace(Visitor*);
29 30
30 private: 31 private:
31 {% for member in members %} 32 {% for member in members %}
32 {{member.member_cpp_type}} m_{{member.cpp_name}}; 33 {{member.member_cpp_type}} m_{{member.cpp_name}};
33 {% endfor %} 34 {% endfor %}
34 35
35 friend class V8{{cpp_class}}; 36 friend class V8{{cpp_class}};
36 }; 37 };
37 38
38 } // namespace blink 39 } // namespace blink
39 40
40 #endif // {{cpp_class}}_h 41 #endif // {{cpp_class}}_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698