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_DATA_PIPE_PRODUCER_DISPATCHER_H_ | 5 #ifndef MOJO_EDK_SYSTEM_DATA_PIPE_PRODUCER_DISPATCHER_H_ |
6 #define MOJO_EDK_SYSTEM_DATA_PIPE_PRODUCER_DISPATCHER_H_ | 6 #define MOJO_EDK_SYSTEM_DATA_PIPE_PRODUCER_DISPATCHER_H_ |
7 | 7 |
8 #include "mojo/edk/system/dispatcher.h" | 8 #include "mojo/edk/system/dispatcher.h" |
9 #include "mojo/edk/util/ref_ptr.h" | 9 #include "mojo/edk/util/ref_ptr.h" |
10 #include "mojo/edk/util/thread_annotations.h" | 10 #include "mojo/edk/util/thread_annotations.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // Get access to the |DataPipe| for testing. | 39 // Get access to the |DataPipe| for testing. |
40 DataPipe* GetDataPipeForTest(); | 40 DataPipe* GetDataPipeForTest(); |
41 | 41 |
42 private: | 42 private: |
43 DataPipeProducerDispatcher(); | 43 DataPipeProducerDispatcher(); |
44 ~DataPipeProducerDispatcher() override; | 44 ~DataPipeProducerDispatcher() override; |
45 | 45 |
46 // |Dispatcher| protected methods: | 46 // |Dispatcher| protected methods: |
47 void CancelAllAwakablesNoLock() override; | 47 void CancelAllAwakablesNoLock() override; |
48 void CloseImplNoLock() override; | 48 void CloseImplNoLock() override; |
49 util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock() | 49 util::RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock( |
50 override; | 50 MessagePipe* message_pipe, |
| 51 unsigned port) override; |
51 MojoResult SetDataPipeProducerOptionsImplNoLock( | 52 MojoResult SetDataPipeProducerOptionsImplNoLock( |
52 UserPointer<const MojoDataPipeProducerOptions> options) override; | 53 UserPointer<const MojoDataPipeProducerOptions> options) override; |
53 MojoResult GetDataPipeProducerOptionsImplNoLock( | 54 MojoResult GetDataPipeProducerOptionsImplNoLock( |
54 UserPointer<MojoDataPipeProducerOptions> options, | 55 UserPointer<MojoDataPipeProducerOptions> options, |
55 uint32_t options_num_bytes) override; | 56 uint32_t options_num_bytes) override; |
56 MojoResult WriteDataImplNoLock(UserPointer<const void> elements, | 57 MojoResult WriteDataImplNoLock(UserPointer<const void> elements, |
57 UserPointer<uint32_t> num_bytes, | 58 UserPointer<uint32_t> num_bytes, |
58 MojoWriteDataFlags flags) override; | 59 MojoWriteDataFlags flags) override; |
59 MojoResult BeginWriteDataImplNoLock(UserPointer<void*> buffer, | 60 MojoResult BeginWriteDataImplNoLock(UserPointer<void*> buffer, |
60 UserPointer<uint32_t> buffer_num_bytes, | 61 UserPointer<uint32_t> buffer_num_bytes, |
(...skipping 21 matching lines...) Expand all Loading... |
82 // This will be null if closed. | 83 // This will be null if closed. |
83 util::RefPtr<DataPipe> data_pipe_ MOJO_GUARDED_BY(mutex()); | 84 util::RefPtr<DataPipe> data_pipe_ MOJO_GUARDED_BY(mutex()); |
84 | 85 |
85 MOJO_DISALLOW_COPY_AND_ASSIGN(DataPipeProducerDispatcher); | 86 MOJO_DISALLOW_COPY_AND_ASSIGN(DataPipeProducerDispatcher); |
86 }; | 87 }; |
87 | 88 |
88 } // namespace system | 89 } // namespace system |
89 } // namespace mojo | 90 } // namespace mojo |
90 | 91 |
91 #endif // MOJO_EDK_SYSTEM_DATA_PIPE_PRODUCER_DISPATCHER_H_ | 92 #endif // MOJO_EDK_SYSTEM_DATA_PIPE_PRODUCER_DISPATCHER_H_ |
OLD | NEW |