| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_ | 5 #ifndef MOJO_EDK_SYSTEM_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_ |
| 6 #define MOJO_EDK_SYSTEM_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_ | 6 #define MOJO_EDK_SYSTEM_REMOTE_PRODUCER_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 "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "mojo/edk/system/channel_endpoint.h" | 12 #include "mojo/edk/system/channel_endpoint.h" |
| 13 #include "mojo/edk/system/data_pipe_impl.h" | 13 #include "mojo/edk/system/data_pipe_impl.h" |
| 14 #include "mojo/edk/system/system_impl_export.h" | |
| 15 #include "mojo/public/cpp/system/macros.h" | 14 #include "mojo/public/cpp/system/macros.h" |
| 16 | 15 |
| 17 namespace mojo { | 16 namespace mojo { |
| 18 namespace system { | 17 namespace system { |
| 19 | 18 |
| 20 class MessageInTransitQueue; | 19 class MessageInTransitQueue; |
| 21 | 20 |
| 22 // |RemoteProducerDataPipeImpl| is a subclass that "implements" |DataPipe| for | 21 // |RemoteProducerDataPipeImpl| is a subclass that "implements" |DataPipe| for |
| 23 // data pipes whose producer is remote and whose consumer is local. See | 22 // data pipes whose producer is remote and whose consumer is local. See |
| 24 // |DataPipeImpl| for more details. | 23 // |DataPipeImpl| for more details. |
| 25 class MOJO_SYSTEM_IMPL_EXPORT RemoteProducerDataPipeImpl final | 24 class RemoteProducerDataPipeImpl final : public DataPipeImpl { |
| 26 : public DataPipeImpl { | |
| 27 public: | 25 public: |
| 28 explicit RemoteProducerDataPipeImpl(ChannelEndpoint* channel_endpoint); | 26 explicit RemoteProducerDataPipeImpl(ChannelEndpoint* channel_endpoint); |
| 29 RemoteProducerDataPipeImpl( | 27 RemoteProducerDataPipeImpl( |
| 30 ChannelEndpoint* channel_endpoint, | 28 ChannelEndpoint* channel_endpoint, |
| 31 std::unique_ptr<char, base::AlignedFreeDeleter> buffer, | 29 std::unique_ptr<char, base::AlignedFreeDeleter> buffer, |
| 32 size_t start_index, | 30 size_t start_index, |
| 33 size_t current_num_bytes); | 31 size_t current_num_bytes); |
| 34 ~RemoteProducerDataPipeImpl() override; | 32 ~RemoteProducerDataPipeImpl() override; |
| 35 | 33 |
| 36 // Processes messages that were received and queued by an |IncomingEndpoint|. | 34 // Processes messages that were received and queued by an |IncomingEndpoint|. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 size_t start_index_; | 112 size_t start_index_; |
| 115 size_t current_num_bytes_; | 113 size_t current_num_bytes_; |
| 116 | 114 |
| 117 MOJO_DISALLOW_COPY_AND_ASSIGN(RemoteProducerDataPipeImpl); | 115 MOJO_DISALLOW_COPY_AND_ASSIGN(RemoteProducerDataPipeImpl); |
| 118 }; | 116 }; |
| 119 | 117 |
| 120 } // namespace system | 118 } // namespace system |
| 121 } // namespace mojo | 119 } // namespace mojo |
| 122 | 120 |
| 123 #endif // MOJO_EDK_SYSTEM_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_ | 121 #endif // MOJO_EDK_SYSTEM_REMOTE_PRODUCER_DATA_PIPE_IMPL_H_ |
| OLD | NEW |