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

Side by Side Diff: mojo/public/bindings/sample/generated/sample_bar_serialization.cc

Issue 60803002: Simpler bindings, fewer files! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move more to the .cc file 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 2013 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 "mojo/public/bindings/sample/generated/sample_bar_serialization.h"
6
7 #include <string.h>
8
9 #include "mojo/public/bindings/sample/generated/sample_bar.h"
10
11 namespace mojo {
12 namespace internal {
13
14 // static
15 size_t ObjectTraits<sample::Bar>::ComputeSizeOf(
16 const sample::Bar* bar) {
17 return sizeof(*bar);
18 }
19
20 // static
21 sample::Bar* ObjectTraits<sample::Bar>::Clone(
22 const sample::Bar* bar, Buffer* buf) {
23 sample::Bar* clone = sample::Bar::New(buf);
24 memcpy(clone, bar, sizeof(*bar));
25 return clone;
26 }
27
28 // static
29 void ObjectTraits<sample::Bar>::EncodePointersAndHandles(
30 sample::Bar* bar, std::vector<mojo::Handle>* handles) {
31 }
32
33 // static
34 bool ObjectTraits<sample::Bar>::DecodePointersAndHandles(
35 sample::Bar* bar, const mojo::Message& message) {
36 return true;
37 }
38
39 } // namespace internal
40 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698