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

Side by Side Diff: mojo/public/bindings/generators/cpp_templates/params_definition

Issue 65933002: Mojo: Unify the disparate source and header files into 3 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mistaken /n's Created 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 const uint32_t $METHOD_NAME = $METHOD_ID;
2 class $CLASS {
3 public:
4 static $CLASS* New(mojo::Buffer* buf) {
5 return new (buf->Allocate(sizeof($CLASS)))
6 $CLASS();
7 }
8
9 $SETTERS
10
11 $GETTERS
12
13 private:
14 friend class mojo::internal::ObjectTraits<$CLASS>;
15
16 $CLASS() {
17 _header_.num_bytes = sizeof(*this);
18 _header_.num_fields = 3;
19 }
20
21 mojo::internal::StructHeader _header_;
22 $FIELDS
23 };
24 MOJO_COMPILE_ASSERT(sizeof($CLASS) == $SIZE,
25 bad_sizeof_${CLASS});
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698