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

Side by Side Diff: mojo/public/bindings/generators/module_struct.cc

Issue 52973003: mojo: break struct headers into headers and source (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add constant for header size 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 // Copyright $YEAR The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "$HEADER"
6
7 namespace $NAMESPACE {
8
9 // static
10 $CLASS* $CLASS::New(mojo::Buffer* buf) {
11 return new (buf->Allocate(sizeof($CLASS))) $CLASS();
12 }
13
14 $CLASS::$CLASS() {
15 _header_.num_bytes = sizeof(*this);
16 _header_.num_fields = $NUM_FIELDS;
17 }
18
19 } // namespace $NAMESPACE
OLDNEW
« no previous file with comments | « mojo/public/bindings/generators/module_struct.h ('k') | mojo/public/bindings/generators/mojom_cpp_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698