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

Unified Diff: mojo/public/bindings/generators/cpp_templates/params_serialization.tmpl

Issue 131033002: Mojo: Simplify object serialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indentation error Created 6 years, 11 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: mojo/public/bindings/generators/cpp_templates/params_serialization.tmpl
diff --git a/mojo/public/bindings/generators/cpp_templates/params_serialization.tmpl b/mojo/public/bindings/generators/cpp_templates/params_serialization.tmpl
deleted file mode 100644
index 955b8e2f9fa14d21f7fb6d6624289f20c8736552..0000000000000000000000000000000000000000
--- a/mojo/public/bindings/generators/cpp_templates/params_serialization.tmpl
+++ /dev/null
@@ -1,25 +0,0 @@
-{%- import "struct_macros.tmpl" as struct_macros %}
-{%- set class_name = "%s::internal::%s_Data"|format(namespace, struct.name) %}
-{%- set param_name = "params" %}
-template <>
-class ObjectTraits<{{class_name}}> {
- public:
- static void CloseHandles({{class_name}}* {{param_name}}) {
-{%- for pf in struct.packed.packed_fields if pf.field.kind|is_object_kind %}
- mojo::internal::CloseHandles({{param_name}}->{{pf.field.name}}_.ptr);
-{%- endfor %}
- }
-
- static void EncodePointersAndHandles(
- {{class_name}}* {{param_name}},
- std::vector<Handle>* handles) {
- {{ struct_macros.encodes(struct, param_name)|indent(4) }}
- }
-
- static bool DecodePointersAndHandles(
- {{class_name}}* {{param_name}},
- Message* message) {
- {{ struct_macros.decodes(struct, param_name)|indent(4) }}
- return true;
- }
-};

Powered by Google App Engine
This is Rietveld 408576698