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

Unified Diff: Source/bindings/templates/dictionary_impl.h

Issue 386963003: [WIP][NotForLand] IDL dictionary support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/templates/dictionary_impl.h
diff --git a/Source/bindings/templates/dictionary_impl.h b/Source/bindings/templates/dictionary_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..5efceb8ffec7aad267f658751f9101643b248b38
--- /dev/null
+++ b/Source/bindings/templates/dictionary_impl.h
@@ -0,0 +1,45 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// This file has been auto-generated by {{code_generator}}. DO NOT MODIFY!
+
+#ifndef {{cpp_name}}_h
Nils Barth (inactive) 2014/07/18 21:52:35 cpp_name => dict_class? cpp_class? class? (compare
bashi 2014/07/22 02:33:58 cpp_class looks more consistent with v8_class. Ren
+#define {{cpp_name}}_h
+
+{% filter conditional(conditional_string) %}
haraken 2014/07/21 16:11:59 Remove the support of [Conditional]. [Conditional]
bashi 2014/07/22 02:33:58 Done.
+{% for filename in header_includes %}
+#include "{{filename}}"
+{% endfor %}
+
+namespace WebCore {
+
+class {{cpp_name}} : public GarbageCollectedFinalized<{{cpp_name}}> {
+public:
+ static {{cpp_name}}* create()
+ {
+ return new {{cpp_name}};
+ }
+ {{cpp_name}}();
+
+ {% for member in members %}
+ bool {{member.has_name}}() const { return m_{{member.has_name}}; }
+ {{member.getter_cpp_type}} {{member.name}}() const { return m_{{member.name}}; }
+ void {{member.setter_name}}({{member.argument_cpp_type}});
+ {% endfor %}
+
+ void trace(Visitor*);
+
+private:
+ {% for member in members %}
+ {{member.member_cpp_type}} m_{{member.name}};
+ bool m_{{member.has_name}};
+ {% endfor %}
+
+ friend class V8{{cpp_name}};
+};
+
+} // namespace WebCore
+
+{% endfilter %}
+#endif // {{cpp_name}}_h

Powered by Google App Engine
This is Rietveld 408576698