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

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/struct_declaration.tmpl

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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
1 {%- set class_name = struct.name ~ "_Data" -%} 1 {%- set class_name = struct.name ~ "_Data" -%}
2 2
3 class {{class_name}} { 3 class {{class_name}} {
4 public: 4 public:
5 static {{class_name}}* New(mojo::internal::Buffer* buf); 5 static {{class_name}}* New(mojo::internal::Buffer* buf);
6 6
7 static bool Validate(const void* data, 7 static bool Validate(const void* data,
8 mojo::internal::BoundsChecker* bounds_checker); 8 mojo::internal::BoundsChecker* bounds_checker);
9 9
10 void EncodePointersAndHandles(std::vector<mojo::Handle>* handles); 10 void EncodePointersAndHandles(std::vector<mojo::Handle>* handles);
(...skipping 28 matching lines...) Expand all
39 uint8_t padfinal_[{{pad}}]; 39 uint8_t padfinal_[{{pad}}];
40 {%- endif %} 40 {%- endif %}
41 {%- endif %} 41 {%- endif %}
42 42
43 private: 43 private:
44 {{class_name}}(); 44 {{class_name}}();
45 ~{{class_name}}() = delete; 45 ~{{class_name}}() = delete;
46 }; 46 };
47 static_assert(sizeof({{class_name}}) == {{struct.versions[-1].num_bytes}}, 47 static_assert(sizeof({{class_name}}) == {{struct.versions[-1].num_bytes}},
48 "Bad sizeof({{class_name}})"); 48 "Bad sizeof({{class_name}})");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698