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

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.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 unified diff | Download patch
OLDNEW
(Empty)
1 {%- import "struct_macros.tmpl" as struct_macros %}
2 {%- set class_name = struct.name ~ "_Data" -%}
3
4 class {{class_name}} {
5 public:
6 static {{class_name}}* New(mojo::internal::Buffer* buf);
7
8 static bool Validate(const void* data,
9 mojo::internal::BoundsChecker* bounds_checker);
10
11 mojo::internal::StructHeader header_;
12 {{struct_macros.fields(struct)}}
13
14 void EncodePointersAndHandles(std::vector<mojo::Handle>* handles);
15 void DecodePointersAndHandles(std::vector<mojo::Handle>* handles);
16
17 private:
18 {{class_name}}();
19 ~{{class_name}}() = delete;
20 };
21 static_assert(sizeof({{class_name}}) == {{struct.packed|struct_size}},
22 "Bad sizeof({{class_name}})");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698