OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_NODE_CONTROLLER_H_ | 5 #ifndef MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_ |
6 #define MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_ | 6 #define MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <queue> | 9 #include <queue> |
10 #include <unordered_map> | 10 #include <unordered_map> |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 scoped_refptr<NodeChannel> GetBrokerChannel(); | 130 scoped_refptr<NodeChannel> GetBrokerChannel(); |
131 | 131 |
132 void AddPeer(const ports::NodeName& name, | 132 void AddPeer(const ports::NodeName& name, |
133 scoped_refptr<NodeChannel> channel, | 133 scoped_refptr<NodeChannel> channel, |
134 bool start_channel); | 134 bool start_channel); |
135 void DropPeer(const ports::NodeName& name); | 135 void DropPeer(const ports::NodeName& name); |
136 void SendPeerMessage(const ports::NodeName& name, | 136 void SendPeerMessage(const ports::NodeName& name, |
137 ports::ScopedMessage message); | 137 ports::ScopedMessage message); |
138 void AcceptIncomingMessages(); | 138 void AcceptIncomingMessages(); |
139 void DropAllPeers(); | 139 void DropAllPeers(); |
140 void CancelReservation(const std::string& token); | |
141 | 140 |
142 // ports::NodeDelegate: | 141 // ports::NodeDelegate: |
143 void GenerateRandomPortName(ports::PortName* port_name) override; | 142 void GenerateRandomPortName(ports::PortName* port_name) override; |
144 void AllocMessage(size_t num_header_bytes, | 143 void AllocMessage(size_t num_header_bytes, |
145 ports::ScopedMessage* message) override; | 144 ports::ScopedMessage* message) override; |
146 void ForwardMessage(const ports::NodeName& node, | 145 void ForwardMessage(const ports::NodeName& node, |
147 ports::ScopedMessage message) override; | 146 ports::ScopedMessage message) override; |
148 void PortStatusChanged(const ports::PortRef& port) override; | 147 void PortStatusChanged(const ports::PortRef& port) override; |
149 | 148 |
150 // NodeChannel::Delegate: | 149 // NodeChannel::Delegate: |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 std::unique_ptr<MachPortRelay> mach_port_relay_; | 281 std::unique_ptr<MachPortRelay> mach_port_relay_; |
283 #endif | 282 #endif |
284 | 283 |
285 DISALLOW_COPY_AND_ASSIGN(NodeController); | 284 DISALLOW_COPY_AND_ASSIGN(NodeController); |
286 }; | 285 }; |
287 | 286 |
288 } // namespace edk | 287 } // namespace edk |
289 } // namespace mojo | 288 } // namespace mojo |
290 | 289 |
291 #endif // MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_ | 290 #endif // MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_ |
OLD | NEW |