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

Unified Diff: third_party/WebKit/Source/bindings/templates/cpp_interface.cpp.tmpl

Issue 2458913003: Add first sketch of the webmodules code generator. (Closed)
Patch Set: Rebased. Created 4 years, 2 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: third_party/WebKit/Source/bindings/templates/cpp_interface.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/cpp_interface.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/cpp_interface.cpp.tmpl
new file mode 100644
index 0000000000000000000000000000000000000000..8bd94eb3c6fbd7d1026276311305030afe8c6bd1
--- /dev/null
+++ b/third_party/WebKit/Source/bindings/templates/cpp_interface.cpp.tmpl
@@ -0,0 +1,35 @@
+{% filter format_blink_cpp_source_code %}
+
+{% include 'copyright_block.txt' %}
Yuki 2016/11/01 12:58:54 copyright_block.txt includes // clang-format off,
dglazkov 2016/11/04 21:03:07 Done.
+
+#include "Cpp{{class_name}}.h"
+
+// TODO(dglazkov): Implement generating includes.
+{% for filename in cpp_includes %}
+#include "{{filename}}"
+{% endfor %}
+
+namespace blink {
+namespace api {
+
+// TODO(dglazkov): Implement constant generation
+{% for constant in constants %}
+// {{ constant.name }}
+{% endfor %}
+
+// TODO(dglazkov): Implement constructor generation
+
+// TODO(dglazkov): Implement attribute getter/setter generation
+{% for attribute in attributes %}
+// {{attribute.name}}
+{% endfor %}
+
+// TODO(dglazkov): Implement method generation
+{% for method in methods %}
+// {{method.cpp_type}} Cpp{{class_name}}::{{method.name}}
+{% endfor %}
+
+}
Yuki 2016/11/01 12:58:54 nit: } // namespace api
dglazkov 2016/11/04 21:03:07 Done.
+}
+
+{% endfilter %}

Powered by Google App Engine
This is Rietveld 408576698