| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SYSTEM_LOCAL_DATA_PIPE_H_ | 5 #ifndef MOJO_SYSTEM_LOCAL_DATA_PIPE_H_ |
| 6 #define MOJO_SYSTEM_LOCAL_DATA_PIPE_H_ | 6 #define MOJO_SYSTEM_LOCAL_DATA_PIPE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/aligned_memory.h" | 9 #include "base/memory/aligned_memory.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 uint32_t num_bytes_written) OVERRIDE; | 42 uint32_t num_bytes_written) OVERRIDE; |
| 43 virtual HandleSignalsState | 43 virtual HandleSignalsState |
| 44 ProducerGetHandleSignalsStateNoLock() const OVERRIDE; | 44 ProducerGetHandleSignalsStateNoLock() const OVERRIDE; |
| 45 virtual void ConsumerCloseImplNoLock() OVERRIDE; | 45 virtual void ConsumerCloseImplNoLock() OVERRIDE; |
| 46 virtual MojoResult ConsumerReadDataImplNoLock(void* elements, | 46 virtual MojoResult ConsumerReadDataImplNoLock(void* elements, |
| 47 uint32_t* num_bytes, | 47 uint32_t* num_bytes, |
| 48 bool all_or_none) OVERRIDE; | 48 bool all_or_none) OVERRIDE; |
| 49 virtual MojoResult ConsumerDiscardDataImplNoLock(uint32_t* num_bytes, | 49 virtual MojoResult ConsumerDiscardDataImplNoLock(uint32_t* num_bytes, |
| 50 bool all_or_none) OVERRIDE; | 50 bool all_or_none) OVERRIDE; |
| 51 virtual MojoResult ConsumerQueryDataImplNoLock(uint32_t* num_bytes) OVERRIDE; | 51 virtual MojoResult ConsumerQueryDataImplNoLock(uint32_t* num_bytes) OVERRIDE; |
| 52 virtual MojoResult ConsumerBeginReadDataImplNoLock(const void** buffer, | 52 virtual MojoResult ConsumerBeginReadDataImplNoLock( |
| 53 uint32_t* buffer_num_bytes, | 53 UserPointer<const void*> buffer, |
| 54 bool all_or_none) OVERRIDE; | 54 UserPointer<uint32_t> buffer_num_bytes, |
| 55 uint32_t min_num_bytes_to_read) OVERRIDE; |
| 55 virtual MojoResult ConsumerEndReadDataImplNoLock( | 56 virtual MojoResult ConsumerEndReadDataImplNoLock( |
| 56 uint32_t num_bytes_read) OVERRIDE; | 57 uint32_t num_bytes_read) OVERRIDE; |
| 57 virtual HandleSignalsState | 58 virtual HandleSignalsState |
| 58 ConsumerGetHandleSignalsStateNoLock() const OVERRIDE; | 59 ConsumerGetHandleSignalsStateNoLock() const OVERRIDE; |
| 59 | 60 |
| 60 void EnsureBufferNoLock(); | 61 void EnsureBufferNoLock(); |
| 61 void DestroyBufferNoLock(); | 62 void DestroyBufferNoLock(); |
| 62 | 63 |
| 63 // Get the maximum (single) write/read size right now (in number of elements); | 64 // Get the maximum (single) write/read size right now (in number of elements); |
| 64 // result fits in a |uint32_t|. | 65 // result fits in a |uint32_t|. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 75 size_t start_index_; | 76 size_t start_index_; |
| 76 size_t current_num_bytes_; | 77 size_t current_num_bytes_; |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(LocalDataPipe); | 79 DISALLOW_COPY_AND_ASSIGN(LocalDataPipe); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace system | 82 } // namespace system |
| 82 } // namespace mojo | 83 } // namespace mojo |
| 83 | 84 |
| 84 #endif // MOJO_SYSTEM_LOCAL_DATA_PIPE_H_ | 85 #endif // MOJO_SYSTEM_LOCAL_DATA_PIPE_H_ |
| OLD | NEW |