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

Unified Diff: mojo/public/bindings/generators/cpp_templates/module.cc.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/module.cc.tmpl
diff --git a/mojo/public/bindings/generators/cpp_templates/module.cc.tmpl b/mojo/public/bindings/generators/cpp_templates/module.cc.tmpl
index 1d6d700f806ec1d20e1dfbba4e74f23582911599..c5a0fb3e38f461c379a0cf347f540e99002eca06 100644
--- a/mojo/public/bindings/generators/cpp_templates/module.cc.tmpl
+++ b/mojo/public/bindings/generators/cpp_templates/module.cc.tmpl
@@ -4,6 +4,7 @@
#include "./{{module_name|camel_to_underscores}}.h"
+#include "mojo/public/bindings/lib/bindings_serialization.h"
#include "mojo/public/bindings/lib/message_builder.h"
namespace {{namespace}} {
@@ -29,16 +30,16 @@ namespace {
} // namespace
-{#--- Struct definitions #}
-{% for struct in structs %}
-{%- include "struct_definition.tmpl" %}
-{%- endfor %}
-
{#--- Struct destructors #}
{%- for struct in structs %}
{%- include "struct_destructor.tmpl" %}
{%- endfor %}
+{#--- Struct definitions #}
+{% for struct in structs %}
+{%- include "struct_definition.tmpl" %}
+{%- endfor %}
+
} // namespace internal
{#--- Struct builder definitions #}
@@ -51,22 +52,3 @@ namespace {
{%- include "interface_definition.tmpl" %}
{%- endfor %}
} // namespace {{namespace}}
-
-namespace mojo {
-namespace internal {
-
-{#--- Struct serialization definitions #}
-{%- for struct in structs %}
-{%- include "struct_serialization_definition.tmpl" %}
-{%- endfor %}
-
-{#--- Interface serialization definitions #}
-{%- for interface in interfaces %}
-{%- for method in interface.methods %}
-{%- set struct = interface|struct_from_method(method) %}
-{%- include "params_serialization.tmpl" %}
-{%- endfor %}
-{%- endfor %}
-
-} // namespace internal
-} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698