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

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

Issue 479563003: IDL: Set dictionary default values in impl constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 // 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 #include "config.h" 7 #include "config.h"
8 #include "{{cpp_class}}.h" 8 #include "{{cpp_class}}.h"
9 9
10 {% for filename in cpp_includes %} 10 {% for filename in cpp_includes %}
11 #include "{{filename}}" 11 #include "{{filename}}"
12 {% endfor %} 12 {% endfor %}
13 13
14 namespace blink { 14 namespace blink {
15 15
16 {# Constructor #} 16 {# Constructor #}
17 {{cpp_class}}::{{cpp_class}}() 17 {{cpp_class}}::{{cpp_class}}()
18 { 18 {
19 {% for member in members if member.cpp_default_value %}
20 {{member.setter_name}}({{member.cpp_default_value}});
21 {% endfor %}
19 } 22 }
20 23
21 void {{cpp_class}}::trace(Visitor* visitor) 24 void {{cpp_class}}::trace(Visitor* visitor)
22 { 25 {
23 {% for member in members if member.is_traceable %} 26 {% for member in members if member.is_traceable %}
24 visitor->trace(m_{{member.name}}); 27 visitor->trace(m_{{member.name}});
25 {% endfor %} 28 {% endfor %}
26 } 29 }
27 30
28 } // namespace blink 31 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698