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

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

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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/tools/bindings/generators/cpp_templates/struct_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl
deleted file mode 100644
index 461f158602b72f3243d722da7f0b574a1c127f44..0000000000000000000000000000000000000000
--- a/mojo/public/tools/bindings/generators/cpp_templates/struct_definition.tmpl
+++ /dev/null
@@ -1,28 +0,0 @@
-{%- import "struct_macros.tmpl" as struct_macros %}
-{%- set class_name = struct.name ~ "_Data" %}
-
-// static
-{{class_name}}* {{class_name}}::New(mojo::internal::Buffer* buf) {
- return new (buf->Allocate(sizeof({{class_name}}))) {{class_name}}();
-}
-
-// static
-bool {{class_name}}::Validate(const void* data,
- mojo::internal::BoundsChecker* bounds_checker) {
- {{ struct_macros.validate(struct, class_name)|indent(2) }}
-}
-
-{{class_name}}::{{class_name}}() {
- header_.num_bytes = sizeof(*this);
- header_.num_fields = {{struct.packed.packed_fields|length}};
-}
-
-void {{class_name}}::EncodePointersAndHandles(
- std::vector<mojo::Handle>* handles) {
- {{ struct_macros.encodes(struct)|indent(2) }}
-}
-
-void {{class_name}}::DecodePointersAndHandles(
- std::vector<mojo::Handle>* handles) {
- {{ struct_macros.decodes(struct)|indent(2) }}
-}

Powered by Google App Engine
This is Rietveld 408576698