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

Side by Side Diff: mojo/public/cpp/bindings/lib/bindings_serialization.h

Issue 1412733002: C++ bindings: separate out serialization source set, have "mojom" targets optionally use serializat… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: address comments from previous patch Created 5 years, 2 months 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
OLDNEW
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/interface_ptr.h"
11 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" 10 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
12 #include "mojo/public/cpp/system/core.h" 11 #include "mojo/public/cpp/system/core.h"
13 12
14 namespace mojo { 13 namespace mojo {
14
15 template <typename I>
16 class InterfacePtr;
17
18 template <typename I>
19 class InterfacePtrInfo;
20
15 namespace internal { 21 namespace internal {
16 22
17 // Please note that this is a different value than |mojo::kInvalidHandleValue|, 23 // Please note that this is a different value than |mojo::kInvalidHandleValue|,
18 // which is the "decoded" invalid handle. 24 // which is the "decoded" invalid handle.
19 const MojoHandle kEncodedInvalidHandleValue = static_cast<MojoHandle>(-1); 25 const MojoHandle kEncodedInvalidHandleValue = static_cast<MojoHandle>(-1);
20 26
21 size_t Align(size_t size); 27 size_t Align(size_t size);
22 char* AlignPointer(char* ptr); 28 char* AlignPointer(char* ptr);
23 29
24 bool IsAligned(const void* ptr); 30 bool IsAligned(const void* ptr);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 inline void InterfaceDataToPointer(Interface_Data* input, 88 inline void InterfaceDataToPointer(Interface_Data* input,
83 InterfacePtr<T>* output) { 89 InterfacePtr<T>* output) {
84 output->Bind(InterfacePtrInfo<T>( 90 output->Bind(InterfacePtrInfo<T>(
85 MakeScopedHandle(FetchAndReset(&input->handle)), input->version)); 91 MakeScopedHandle(FetchAndReset(&input->handle)), input->version));
86 } 92 }
87 93
88 } // namespace internal 94 } // namespace internal
89 } // namespace mojo 95 } // namespace mojo
90 96
91 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_ 97 #endif // MOJO_PUBLIC_CPP_BINDINGS_LIB_BINDINGS_SERIALIZATION_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/array_serialization.h ('k') | mojo/public/cpp/bindings/lib/message_header_validator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698