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_EDK_SYSTEM_LOCAL_DATA_PIPE_IMPL_H_ | 5 #ifndef MOJO_EDK_SYSTEM_LOCAL_DATA_PIPE_IMPL_H_ |
6 #define MOJO_EDK_SYSTEM_LOCAL_DATA_PIPE_IMPL_H_ | 6 #define MOJO_EDK_SYSTEM_LOCAL_DATA_PIPE_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/memory/aligned_memory.h" | 10 #include "base/memory/aligned_memory.h" |
11 #include "mojo/edk/system/data_pipe_impl.h" | 11 #include "mojo/edk/system/data_pipe_impl.h" |
12 #include "mojo/edk/system/system_impl_export.h" | |
13 #include "mojo/public/cpp/system/macros.h" | 12 #include "mojo/public/cpp/system/macros.h" |
14 | 13 |
15 namespace mojo { | 14 namespace mojo { |
16 namespace system { | 15 namespace system { |
17 | 16 |
18 class MessageInTransitQueue; | 17 class MessageInTransitQueue; |
19 | 18 |
20 // |LocalDataPipeImpl| is a subclass that "implements" |DataPipe| for data pipes | 19 // |LocalDataPipeImpl| is a subclass that "implements" |DataPipe| for data pipes |
21 // whose producer and consumer are both local. See |DataPipeImpl| for more | 20 // whose producer and consumer are both local. See |DataPipeImpl| for more |
22 // details. | 21 // details. |
23 class MOJO_SYSTEM_IMPL_EXPORT LocalDataPipeImpl final : public DataPipeImpl { | 22 class LocalDataPipeImpl final : public DataPipeImpl { |
24 public: | 23 public: |
25 LocalDataPipeImpl(); | 24 LocalDataPipeImpl(); |
26 ~LocalDataPipeImpl() override; | 25 ~LocalDataPipeImpl() override; |
27 | 26 |
28 private: | 27 private: |
29 // |DataPipeImpl| implementation: | 28 // |DataPipeImpl| implementation: |
30 void ProducerClose() override; | 29 void ProducerClose() override; |
31 MojoResult ProducerWriteData(UserPointer<const void> elements, | 30 MojoResult ProducerWriteData(UserPointer<const void> elements, |
32 UserPointer<uint32_t> num_bytes, | 31 UserPointer<uint32_t> num_bytes, |
33 uint32_t max_num_bytes_to_write, | 32 uint32_t max_num_bytes_to_write, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 size_t start_index_; | 87 size_t start_index_; |
89 size_t current_num_bytes_; | 88 size_t current_num_bytes_; |
90 | 89 |
91 MOJO_DISALLOW_COPY_AND_ASSIGN(LocalDataPipeImpl); | 90 MOJO_DISALLOW_COPY_AND_ASSIGN(LocalDataPipeImpl); |
92 }; | 91 }; |
93 | 92 |
94 } // namespace system | 93 } // namespace system |
95 } // namespace mojo | 94 } // namespace mojo |
96 | 95 |
97 #endif // MOJO_EDK_SYSTEM_LOCAL_DATA_PIPE_IMPL_H_ | 96 #endif // MOJO_EDK_SYSTEM_LOCAL_DATA_PIPE_IMPL_H_ |
OLD | NEW |