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 THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION
_H_ | 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ |
6 #define THIRD_PARTY_MOJO_SRC_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 "third_party/mojo/src/mojo/public/cpp/bindings/interface_ptr.h" | 10 #include "mojo/public/cpp/bindings/interface_ptr.h" |
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/lib/bindings_internal.h" | 11 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" |
12 #include "third_party/mojo/src/mojo/public/cpp/system/core.h" | 12 #include "mojo/public/cpp/system/core.h" |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
17 // Please note that this is a different value than |mojo::kInvalidHandleValue|, | 17 // Please note that this is a different value than |mojo::kInvalidHandleValue|, |
18 // which is the "decoded" invalid handle. | 18 // which is the "decoded" invalid handle. |
19 const MojoHandle kEncodedInvalidHandleValue = static_cast<MojoHandle>(-1); | 19 const MojoHandle kEncodedInvalidHandleValue = static_cast<MojoHandle>(-1); |
20 | 20 |
21 size_t Align(size_t size); | 21 size_t Align(size_t size); |
22 char* AlignPointer(char* ptr); | 22 char* AlignPointer(char* ptr); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 template <typename T> | 81 template <typename T> |
82 inline void InterfaceDataToPointer(Interface_Data* input, | 82 inline void InterfaceDataToPointer(Interface_Data* input, |
83 InterfacePtr<T>* output) { | 83 InterfacePtr<T>* output) { |
84 output->Bind(InterfacePtrInfo<T>( | 84 output->Bind(InterfacePtrInfo<T>( |
85 MakeScopedHandle(FetchAndReset(&input->handle)), input->version)); | 85 MakeScopedHandle(FetchAndReset(&input->handle)), input->version)); |
86 } | 86 } |
87 | 87 |
88 } // namespace internal | 88 } // namespace internal |
89 } // namespace mojo | 89 } // namespace mojo |
90 | 90 |
91 #endif // THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZAT
ION_H_ | 91 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ |
OLD | NEW |