| OLD | NEW |
| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // |MojoDuplicateBufferHandleOptions|. If non-null, |in_options| must point to | 89 // |MojoDuplicateBufferHandleOptions|. If non-null, |in_options| must point to |
| 90 // a struct of at least |in_options->struct_size| bytes. |out_options| must | 90 // a struct of at least |in_options->struct_size| bytes. |out_options| must |
| 91 // point to a (current) |MojoDuplicateBufferHandleOptions| and will be | 91 // point to a (current) |MojoDuplicateBufferHandleOptions| and will be |
| 92 // entirely overwritten on success (it may be partly overwritten on failure). | 92 // entirely overwritten on success (it may be partly overwritten on failure). |
| 93 static MojoResult ValidateDuplicateOptions( | 93 static MojoResult ValidateDuplicateOptions( |
| 94 UserPointer<const MojoDuplicateBufferHandleOptions> in_options, | 94 UserPointer<const MojoDuplicateBufferHandleOptions> in_options, |
| 95 MojoDuplicateBufferHandleOptions* out_options); | 95 MojoDuplicateBufferHandleOptions* out_options); |
| 96 | 96 |
| 97 // |Dispatcher| protected methods: | 97 // |Dispatcher| protected methods: |
| 98 void CloseImplNoLock() override; | 98 void CloseImplNoLock() override; |
| 99 MojoResult DuplicateDispatcherImplNoLock( |
| 100 util::RefPtr<Dispatcher>* new_dispatcher) override; |
| 99 util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock( | 101 util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock( |
| 100 MessagePipe* message_pipe, | 102 MessagePipe* message_pipe, |
| 101 unsigned port) override; | 103 unsigned port) override; |
| 102 MojoResult DuplicateBufferHandleImplNoLock( | 104 MojoResult DuplicateBufferHandleImplNoLock( |
| 103 UserPointer<const MojoDuplicateBufferHandleOptions> options, | 105 UserPointer<const MojoDuplicateBufferHandleOptions> options, |
| 104 util::RefPtr<Dispatcher>* new_dispatcher) override; | 106 util::RefPtr<Dispatcher>* new_dispatcher) override; |
| 105 MojoResult GetBufferInformationImplNoLock( | 107 MojoResult GetBufferInformationImplNoLock( |
| 106 UserPointer<MojoBufferInformation> info, | 108 UserPointer<MojoBufferInformation> info, |
| 107 uint32_t info_num_bytes) override; | 109 uint32_t info_num_bytes) override; |
| 108 MojoResult MapBufferImplNoLock( | 110 MojoResult MapBufferImplNoLock( |
| (...skipping 15 matching lines...) Expand all Loading... |
| 124 util::RefPtr<platform::PlatformSharedBuffer> shared_buffer_ | 126 util::RefPtr<platform::PlatformSharedBuffer> shared_buffer_ |
| 125 MOJO_GUARDED_BY(mutex()); | 127 MOJO_GUARDED_BY(mutex()); |
| 126 | 128 |
| 127 MOJO_DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher); | 129 MOJO_DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher); |
| 128 }; | 130 }; |
| 129 | 131 |
| 130 } // namespace system | 132 } // namespace system |
| 131 } // namespace mojo | 133 } // namespace mojo |
| 132 | 134 |
| 133 #endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ | 135 #endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ |
| OLD | NEW |