| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 scoped_refptr<NodeChannel> GetParentChannel(); | 150 scoped_refptr<NodeChannel> GetParentChannel(); |
| 151 scoped_refptr<NodeChannel> GetBrokerChannel(); | 151 scoped_refptr<NodeChannel> GetBrokerChannel(); |
| 152 | 152 |
| 153 void AddPeer(const ports::NodeName& name, | 153 void AddPeer(const ports::NodeName& name, |
| 154 scoped_refptr<NodeChannel> channel, | 154 scoped_refptr<NodeChannel> channel, |
| 155 bool start_channel); | 155 bool start_channel); |
| 156 void DropPeer(const ports::NodeName& name); | 156 void DropPeer(const ports::NodeName& name); |
| 157 void SendPeerMessage(const ports::NodeName& name, | 157 void SendPeerMessage(const ports::NodeName& name, |
| 158 ports::ScopedMessage message); | 158 ports::ScopedMessage message); |
| 159 void AcceptIncomingMessages(); | 159 void AcceptIncomingMessages(); |
| 160 void ProcessIncomingMessages(); |
| 160 void DropAllPeers(); | 161 void DropAllPeers(); |
| 161 | 162 |
| 162 // ports::NodeDelegate: | 163 // ports::NodeDelegate: |
| 163 void GenerateRandomPortName(ports::PortName* port_name) override; | 164 void GenerateRandomPortName(ports::PortName* port_name) override; |
| 164 void AllocMessage(size_t num_header_bytes, | 165 void AllocMessage(size_t num_header_bytes, |
| 165 ports::ScopedMessage* message) override; | 166 ports::ScopedMessage* message) override; |
| 166 void ForwardMessage(const ports::NodeName& node, | 167 void ForwardMessage(const ports::NodeName& node, |
| 167 ports::ScopedMessage message) override; | 168 ports::ScopedMessage message) override; |
| 168 void BroadcastMessage(ports::ScopedMessage message) override; | 169 void BroadcastMessage(ports::ScopedMessage message) override; |
| 169 void PortStatusChanged(const ports::PortRef& port) override; | 170 void PortStatusChanged(const ports::PortRef& port) override; |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 std::unique_ptr<MachPortRelay> mach_port_relay_; | 312 std::unique_ptr<MachPortRelay> mach_port_relay_; |
| 312 #endif | 313 #endif |
| 313 | 314 |
| 314 DISALLOW_COPY_AND_ASSIGN(NodeController); | 315 DISALLOW_COPY_AND_ASSIGN(NodeController); |
| 315 }; | 316 }; |
| 316 | 317 |
| 317 } // namespace edk | 318 } // namespace edk |
| 318 } // namespace mojo | 319 } // namespace mojo |
| 319 | 320 |
| 320 #endif // MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_ | 321 #endif // MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_ |
| OLD | NEW |