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 "mojo/edk/embedder/platform_shared_buffer.h" | 8 #include "mojo/edk/embedder/platform_shared_buffer.h" |
9 #include "mojo/edk/system/memory.h" | 9 #include "mojo/edk/system/memory.h" |
10 #include "mojo/edk/system/simple_dispatcher.h" | 10 #include "mojo/edk/system/simple_dispatcher.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 void CloseImplNoLock() override; | 83 void CloseImplNoLock() override; |
84 scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock() | 84 scoped_refptr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock() |
85 override; | 85 override; |
86 MojoResult DuplicateBufferHandleImplNoLock( | 86 MojoResult DuplicateBufferHandleImplNoLock( |
87 UserPointer<const MojoDuplicateBufferHandleOptions> options, | 87 UserPointer<const MojoDuplicateBufferHandleOptions> options, |
88 scoped_refptr<Dispatcher>* new_dispatcher) override; | 88 scoped_refptr<Dispatcher>* new_dispatcher) override; |
89 MojoResult MapBufferImplNoLock( | 89 MojoResult MapBufferImplNoLock( |
90 uint64_t offset, | 90 uint64_t offset, |
91 uint64_t num_bytes, | 91 uint64_t num_bytes, |
92 MojoMapBufferFlags flags, | 92 MojoMapBufferFlags flags, |
93 scoped_ptr<embedder::PlatformSharedBufferMapping>* mapping) override; | 93 std::unique_ptr<embedder::PlatformSharedBufferMapping>* mapping) override; |
94 void StartSerializeImplNoLock(Channel* channel, | 94 void StartSerializeImplNoLock(Channel* channel, |
95 size_t* max_size, | 95 size_t* max_size, |
96 size_t* max_platform_handles) override | 96 size_t* max_platform_handles) override |
97 MOJO_NOT_THREAD_SAFE; | 97 MOJO_NOT_THREAD_SAFE; |
98 bool EndSerializeAndCloseImplNoLock( | 98 bool EndSerializeAndCloseImplNoLock( |
99 Channel* channel, | 99 Channel* channel, |
100 void* destination, | 100 void* destination, |
101 size_t* actual_size, | 101 size_t* actual_size, |
102 embedder::PlatformHandleVector* platform_handles) override | 102 embedder::PlatformHandleVector* platform_handles) override |
103 MOJO_NOT_THREAD_SAFE; | 103 MOJO_NOT_THREAD_SAFE; |
104 | 104 |
105 scoped_refptr<embedder::PlatformSharedBuffer> shared_buffer_ | 105 scoped_refptr<embedder::PlatformSharedBuffer> shared_buffer_ |
106 MOJO_GUARDED_BY(mutex()); | 106 MOJO_GUARDED_BY(mutex()); |
107 | 107 |
108 MOJO_DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher); | 108 MOJO_DISALLOW_COPY_AND_ASSIGN(SharedBufferDispatcher); |
109 }; | 109 }; |
110 | 110 |
111 } // namespace system | 111 } // namespace system |
112 } // namespace mojo | 112 } // namespace mojo |
113 | 113 |
114 #endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ | 114 #endif // MOJO_EDK_SYSTEM_SHARED_BUFFER_DISPATCHER_H_ |
OLD | NEW |