| OLD | NEW |
| (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 | |
| OLD | NEW |