| 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 13 matching lines...) Expand all Loading... |
| 24 // In particular: |struct_size| is ignored (so |validated_options| must be the | 24 // In particular: |struct_size| is ignored (so |validated_options| must be the |
| 25 // current version of the struct) and |capacity_num_bytes| must be nonzero. | 25 // current version of the struct) and |capacity_num_bytes| must be nonzero. |
| 26 explicit LocalDataPipe(const MojoCreateDataPipeOptions& validated_options); | 26 explicit LocalDataPipe(const MojoCreateDataPipeOptions& validated_options); |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 friend class base::RefCountedThreadSafe<LocalDataPipe>; | 29 friend class base::RefCountedThreadSafe<LocalDataPipe>; |
| 30 virtual ~LocalDataPipe(); | 30 virtual ~LocalDataPipe(); |
| 31 | 31 |
| 32 // |DataPipe| implementation: | 32 // |DataPipe| implementation: |
| 33 virtual void ProducerCloseImplNoLock() OVERRIDE; | 33 virtual void ProducerCloseImplNoLock() OVERRIDE; |
| 34 virtual MojoResult ProducerWriteDataImplNoLock(const void* elements, | 34 virtual MojoResult ProducerWriteDataImplNoLock( |
| 35 uint32_t* num_bytes, | 35 UserPointer<const void> elements, |
| 36 bool all_or_none) OVERRIDE; | 36 UserPointer<uint32_t> num_bytes, |
| 37 uint32_t max_num_bytes_to_write, |
| 38 uint32_t min_num_bytes_to_write) OVERRIDE; |
| 37 virtual MojoResult ProducerBeginWriteDataImplNoLock( | 39 virtual MojoResult ProducerBeginWriteDataImplNoLock( |
| 38 UserPointer<void*> buffer, | 40 UserPointer<void*> buffer, |
| 39 UserPointer<uint32_t> buffer_num_bytes, | 41 UserPointer<uint32_t> buffer_num_bytes, |
| 40 uint32_t min_num_bytes_to_write) OVERRIDE; | 42 uint32_t min_num_bytes_to_write) OVERRIDE; |
| 41 virtual MojoResult ProducerEndWriteDataImplNoLock( | 43 virtual MojoResult ProducerEndWriteDataImplNoLock( |
| 42 uint32_t num_bytes_written) OVERRIDE; | 44 uint32_t num_bytes_written) OVERRIDE; |
| 43 virtual HandleSignalsState | 45 virtual HandleSignalsState |
| 44 ProducerGetHandleSignalsStateNoLock() const OVERRIDE; | 46 ProducerGetHandleSignalsStateNoLock() const OVERRIDE; |
| 45 virtual void ConsumerCloseImplNoLock() OVERRIDE; | 47 virtual void ConsumerCloseImplNoLock() OVERRIDE; |
| 46 virtual MojoResult ConsumerReadDataImplNoLock( | 48 virtual MojoResult ConsumerReadDataImplNoLock( |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 size_t start_index_; | 83 size_t start_index_; |
| 82 size_t current_num_bytes_; | 84 size_t current_num_bytes_; |
| 83 | 85 |
| 84 DISALLOW_COPY_AND_ASSIGN(LocalDataPipe); | 86 DISALLOW_COPY_AND_ASSIGN(LocalDataPipe); |
| 85 }; | 87 }; |
| 86 | 88 |
| 87 } // namespace system | 89 } // namespace system |
| 88 } // namespace mojo | 90 } // namespace mojo |
| 89 | 91 |
| 90 #endif // MOJO_SYSTEM_LOCAL_DATA_PIPE_H_ | 92 #endif // MOJO_SYSTEM_LOCAL_DATA_PIPE_H_ |
| OLD | NEW |