OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ |
6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ | 6 #define MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "mojo/public/cpp/bindings/buffer.h" | |
11 #include "mojo/public/cpp/bindings/message.h" | 10 #include "mojo/public/cpp/bindings/message.h" |
12 | 11 |
13 namespace mojo { | 12 namespace mojo { |
14 namespace internal { | 13 namespace internal { |
15 | 14 |
16 size_t Align(size_t size); | 15 size_t Align(size_t size); |
17 char* AlignPointer(char* ptr); | 16 char* AlignPointer(char* ptr); |
18 | 17 |
19 // Pointers are encoded as relative offsets. The offsets are relative to the | 18 // Pointers are encoded as relative offsets. The offsets are relative to the |
20 // address of where the offset value is stored, such that the pointer may be | 19 // address of where the offset value is stored, such that the pointer may be |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 if (!obj->ptr->DecodePointersAndHandles(message)) | 58 if (!obj->ptr->DecodePointersAndHandles(message)) |
60 return false; | 59 return false; |
61 } | 60 } |
62 return true; | 61 return true; |
63 } | 62 } |
64 | 63 |
65 } // namespace internal | 64 } // namespace internal |
66 } // namespace mojo | 65 } // namespace mojo |
67 | 66 |
68 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ | 67 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ |
OLD | NEW |