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

Side by Side Diff: mojo/edk/system/shared_buffer_dispatcher.h

Issue 1943123002: Make it possible to write a message pipe endpoint's peer into it. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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 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 #ifndef MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ 5 #ifndef MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_
6 #define MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ 6 #define MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "mojo/edk/system/memory.h" 10 #include "mojo/edk/system/memory.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // |MojoDuplicateBufferHandleOptions|. If non-null, |in_options| must point to 80 // |MojoDuplicateBufferHandleOptions|. If non-null, |in_options| must point to
81 // a struct of at least |in_options->struct_size| bytes. |out_options| must 81 // a struct of at least |in_options->struct_size| bytes. |out_options| must
82 // point to a (current) |MojoDuplicateBufferHandleOptions| and will be 82 // point to a (current) |MojoDuplicateBufferHandleOptions| and will be
83 // entirely overwritten on success (it may be partly overwritten on failure). 83 // entirely overwritten on success (it may be partly overwritten on failure).
84 static MojoResult ValidateDuplicateOptions( 84 static MojoResult ValidateDuplicateOptions(
85 UserPointer<const MojoDuplicateBufferHandleOptions> in_options, 85 UserPointer<const MojoDuplicateBufferHandleOptions> in_options,
86 MojoDuplicateBufferHandleOptions* out_options); 86 MojoDuplicateBufferHandleOptions* out_options);
87 87
88 // |Dispatcher| protected methods: 88 // |Dispatcher| protected methods:
89 void CloseImplNoLock() override; 89 void CloseImplNoLock() override;
90 util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock() 90 util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock(
91 override; 91 MessagePipe* message_pipe,
92 unsigned port) override;
92 MojoResult DuplicateBufferHandleImplNoLock( 93 MojoResult DuplicateBufferHandleImplNoLock(
93 UserPointer<const MojoDuplicateBufferHandleOptions> options, 94 UserPointer<const MojoDuplicateBufferHandleOptions> options,
94 util::RefPtr<Dispatcher>* new_dispatcher) override; 95 util::RefPtr<Dispatcher>* new_dispatcher) override;
95 MojoResult GetBufferInformationImplNoLock( 96 MojoResult GetBufferInformationImplNoLock(
96 UserPointer<MojoBufferInformation> info, 97 UserPointer<MojoBufferInformation> info,
97 uint32_t info_num_bytes) override; 98 uint32_t info_num_bytes) override;
98 MojoResult MapBufferImplNoLock( 99 MojoResult MapBufferImplNoLock(
99 uint64_t offset, 100 uint64_t offset,
100 uint64_t num_bytes, 101 uint64_t num_bytes,
101 MojoMapBufferFlags flags, 102 MojoMapBufferFlags flags,
(...skipping 12 matching lines...) Expand all
114 util::RefPtr<platform::PlatformSharedBuffer> shared_buffer_ 115 util::RefPtr<platform::PlatformSharedBuffer> shared_buffer_
115 MOJO_GUARDED_BY(mutex()); 116 MOJO_GUARDED_BY(mutex());
116 117
117 MOJO_DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher); 118 MOJO_DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher);
118 }; 119 };
119 120
120 } // namespace system 121 } // namespace system
121 } // namespace mojo 122 } // namespace mojo
122 123
123 #endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ 124 #endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698