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

Unified Diff: mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl

Issue 2259283003: Mojo C++ bindings: share DataView class between chromium and blink variants. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@92_change_traits_param
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl
deleted file mode 100644
index f84337f5bf4c7d8898cd116a90a253fc94cb433c..0000000000000000000000000000000000000000
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl
+++ /dev/null
@@ -1,14 +0,0 @@
-{%- import "struct_macros.tmpl" as struct_macros %}
-{%- set mojom_type = struct|get_qualified_name_for_kind %}
-
-// static
-bool StructTraits<{{mojom_type}}::DataView, {{mojom_type}}Ptr>::Read(
- {{mojom_type}}::DataView input,
- {{mojom_type}}Ptr* output) {
- bool success = true;
- {{mojom_type}}Ptr result({{mojom_type}}::New());
- {{struct_macros.deserialize(struct, "input", "result->%s",
- "success")|indent(4)}}
- *output = std::move(result);
- return success;
-}

Powered by Google App Engine
This is Rietveld 408576698