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

Side by Side Diff: mojo/public/c/system/buffer.h

Issue 2033543003: Add a missing define for MOJO_DUPLICATE_BUFFER_HANDLE_OPTIONS_FLAG_READ_ONLY. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This file contains types/constants and functions specific to buffers (and in 5 // This file contains types/constants and functions specific to buffers (and in
6 // particular shared buffers). 6 // particular shared buffers).
7 // TODO(vtl): Reorganize this file (etc.) to separate general buffer functions 7 // TODO(vtl): Reorganize this file (etc.) to separate general buffer functions
8 // from (shared) buffer creation. 8 // from (shared) buffer creation.
9 // 9 //
10 // Note: This header should be compilable as C. 10 // Note: This header should be compilable as C.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 typedef uint32_t MojoDuplicateBufferHandleOptionsFlags; 65 typedef uint32_t MojoDuplicateBufferHandleOptionsFlags;
66 66
67 #ifdef __cplusplus 67 #ifdef __cplusplus
68 const MojoDuplicateBufferHandleOptionsFlags 68 const MojoDuplicateBufferHandleOptionsFlags
69 MOJO_DUPLICATE_BUFFER_HANDLE_OPTIONS_FLAG_NONE = 0; 69 MOJO_DUPLICATE_BUFFER_HANDLE_OPTIONS_FLAG_NONE = 0;
70 const MojoDuplicateBufferHandleOptionsFlags 70 const MojoDuplicateBufferHandleOptionsFlags
71 MOJO_DUPLICATE_BUFFER_HANDLE_OPTIONS_FLAG_READ_ONLY = 1 << 0; 71 MOJO_DUPLICATE_BUFFER_HANDLE_OPTIONS_FLAG_READ_ONLY = 1 << 0;
72 #else 72 #else
73 #define MOJO_DUPLICATE_BUFFER_HANDLE_OPTIONS_FLAG_NONE \ 73 #define MOJO_DUPLICATE_BUFFER_HANDLE_OPTIONS_FLAG_NONE \
74 ((MojoDuplicateBufferHandleOptionsFlags)0) 74 ((MojoDuplicateBufferHandleOptionsFlags)0)
75 #define MOJO_DUPLICATE_BUFFER_HANDLE_OPTIONS_FLAG_READ_ONLY \
76 ((MojoDuplicateBufferHandleOptionsFlags)1 << 0)
75 #endif 77 #endif
76 78
77 struct MojoDuplicateBufferHandleOptions { 79 struct MojoDuplicateBufferHandleOptions {
78 uint32_t struct_size; 80 uint32_t struct_size;
79 MojoDuplicateBufferHandleOptionsFlags flags; 81 MojoDuplicateBufferHandleOptionsFlags flags;
80 }; 82 };
81 MOJO_STATIC_ASSERT(sizeof(MojoDuplicateBufferHandleOptions) == 8, 83 MOJO_STATIC_ASSERT(sizeof(MojoDuplicateBufferHandleOptions) == 8,
82 "MojoDuplicateBufferHandleOptions has wrong size"); 84 "MojoDuplicateBufferHandleOptions has wrong size");
83 85
84 // |MojoMapBufferFlags|: Used to specify different modes to |MojoMapBuffer()|. 86 // |MojoMapBufferFlags|: Used to specify different modes to |MojoMapBuffer()|.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // |MOJO_RESULT_OK| on success. 186 // |MOJO_RESULT_OK| on success.
185 // |MOJO_RESULT_INVALID_ARGUMENT| if |buffer| is invalid (e.g., is not the 187 // |MOJO_RESULT_INVALID_ARGUMENT| if |buffer| is invalid (e.g., is not the
186 // result of |MojoMapBuffer()| or has already been unmapped). 188 // result of |MojoMapBuffer()| or has already been unmapped).
187 MOJO_SYSTEM_EXPORT MojoResult MojoUnmapBuffer(void* buffer); // In. 189 MOJO_SYSTEM_EXPORT MojoResult MojoUnmapBuffer(void* buffer); // In.
188 190
189 #ifdef __cplusplus 191 #ifdef __cplusplus
190 } // extern "C" 192 } // extern "C"
191 #endif 193 #endif
192 194
193 #endif // MOJO_PUBLIC_C_SYSTEM_BUFFER_H_ 195 #endif // MOJO_PUBLIC_C_SYSTEM_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698