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

Side by Side Diff: mojo/public/c/include/mojo/bindings/union.h

Issue 2232833003: Change the canonical way to include the C bindings headers to <mojo/bindings/*.h>. (Closed) Base URL: https://github.com/domokit/mojo.git@work791_mojo_tests
Patch Set: rebased Created 4 years, 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_C_BINDINGS_UNION_H_ 5 #ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_UNION_H_
6 #define MOJO_PUBLIC_C_BINDINGS_UNION_H_ 6 #define MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_UNION_H_
7 7
8 #include <mojo/bindings/buffer.h>
9 #include <mojo/bindings/internal/type_descriptor.h>
10 #include <mojo/bindings/internal/util.h>
8 #include <mojo/macros.h> 11 #include <mojo/macros.h>
9 #include <stddef.h> 12 #include <stddef.h>
10 #include <stdint.h> 13 #include <stdint.h>
11 14
12 #include "mojo/public/c/bindings/buffer.h"
13 #include "mojo/public/c/bindings/lib/type_descriptor.h"
14 #include "mojo/public/c/bindings/lib/util.h"
15
16 MOJO_BEGIN_EXTERN_C 15 MOJO_BEGIN_EXTERN_C
17 16
18 struct MojomUnionLayout { 17 struct MojomUnionLayout {
19 // |num_bytes|, the number of bytes used in this union, includes the size of 18 // |num_bytes|, the number of bytes used in this union, includes the size of
20 // the |num_bytes| and |tag| fields, along with data. 19 // the |num_bytes| and |tag| fields, along with data.
21 uint32_t size; 20 uint32_t size;
22 uint32_t tag; 21 uint32_t tag;
23 union { 22 union {
24 // To be used when the data is a pointer. 23 // To be used when the data is a pointer.
25 union MojomPointer pointer; 24 union MojomPointer pointer;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // |in_type_desc|: Describes the pointer and handle fields of the mojom union. 108 // |in_type_desc|: Describes the pointer and handle fields of the mojom union.
110 // |in_union_data|: The unencoded mojom union to be copied. 109 // |in_union_data|: The unencoded mojom union to be copied.
111 // |out_union_data|: Where |in_union_data| should be copied to. 110 // |out_union_data|: Where |in_union_data| should be copied to.
112 bool MojomUnion_DeepCopy(struct MojomBuffer* buffer, 111 bool MojomUnion_DeepCopy(struct MojomBuffer* buffer,
113 const struct MojomTypeDescriptorUnion* in_type_desc, 112 const struct MojomTypeDescriptorUnion* in_type_desc,
114 const struct MojomUnionLayout* in_union_data, 113 const struct MojomUnionLayout* in_union_data,
115 struct MojomUnionLayout* out_union_data); 114 struct MojomUnionLayout* out_union_data);
116 115
117 MOJO_END_EXTERN_C 116 MOJO_END_EXTERN_C
118 117
119 #endif // MOJO_PUBLIC_C_BINDINGS_UNION_H_ 118 #endif // MOJO_PUBLIC_C_INCLUDE_MOJO_BINDINGS_UNION_H_
OLDNEW
« no previous file with comments | « mojo/public/c/include/mojo/bindings/struct.h ('k') | mojo/public/c/include/mojo/bindings/validation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698