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_MESSAGE_PIPE_DISPATCHER_H_ | 5 #ifndef MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_ |
6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_ | 6 #define MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <queue> | 10 #include <queue> |
(...skipping 24 matching lines...) Expand all Loading... |
35 // as they're passed around. |endpoint| is either 0 or 1 and again is only | 35 // as they're passed around. |endpoint| is either 0 or 1 and again is only |
36 // used for tracking pipes (one side is always 0, the other is always 1.) | 36 // used for tracking pipes (one side is always 0, the other is always 1.) |
37 MessagePipeDispatcher(NodeController* node_controller, | 37 MessagePipeDispatcher(NodeController* node_controller, |
38 const ports::PortRef& port, | 38 const ports::PortRef& port, |
39 uint64_t pipe_id, | 39 uint64_t pipe_id, |
40 int endpoint); | 40 int endpoint); |
41 | 41 |
42 // Dispatcher: | 42 // Dispatcher: |
43 Type GetType() const override; | 43 Type GetType() const override; |
44 MojoResult Close() override; | 44 MojoResult Close() override; |
| 45 MojoResult Watch(MojoHandleSignals signals, |
| 46 const Watcher::WatchCallback& callback, |
| 47 uintptr_t context) override; |
| 48 MojoResult CancelWatch(uintptr_t context) override; |
45 MojoResult WriteMessage(const void* bytes, | 49 MojoResult WriteMessage(const void* bytes, |
46 uint32_t num_bytes, | 50 uint32_t num_bytes, |
47 const DispatcherInTransit* dispatchers, | 51 const DispatcherInTransit* dispatchers, |
48 uint32_t num_dispatchers, | 52 uint32_t num_dispatchers, |
49 MojoWriteMessageFlags flags) override; | 53 MojoWriteMessageFlags flags) override; |
50 MojoResult ReadMessage(void* bytes, | 54 MojoResult ReadMessage(void* bytes, |
51 uint32_t* num_bytes, | 55 uint32_t* num_bytes, |
52 MojoHandle* handles, | 56 MojoHandle* handles, |
53 uint32_t* num_handles, | 57 uint32_t* num_handles, |
54 MojoReadMessageFlags flags) override; | 58 MojoReadMessageFlags flags) override; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 bool port_closed_ = false; | 108 bool port_closed_ = false; |
105 AwakableList awakables_; | 109 AwakableList awakables_; |
106 | 110 |
107 DISALLOW_COPY_AND_ASSIGN(MessagePipeDispatcher); | 111 DISALLOW_COPY_AND_ASSIGN(MessagePipeDispatcher); |
108 }; | 112 }; |
109 | 113 |
110 } // namespace edk | 114 } // namespace edk |
111 } // namespace mojo | 115 } // namespace mojo |
112 | 116 |
113 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_ | 117 #endif // MOJO_EDK_SYSTEM_MESSAGE_PIPE_DISPATCHER_H_ |
OLD | NEW |