| 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_CHANNEL_H_ | 5 #ifndef MOJO_EDK_SYSTEM_NODE_CHANNEL_H_ |
| 6 #define MOJO_EDK_SYSTEM_NODE_CHANNEL_H_ | 6 #define MOJO_EDK_SYSTEM_NODE_CHANNEL_H_ |
| 7 | 7 |
| 8 #include <unordered_map> | 8 #include <unordered_map> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 virtual void OnAddBrokerClient(const ports::NodeName& from_node, | 37 virtual void OnAddBrokerClient(const ports::NodeName& from_node, |
| 38 const ports::NodeName& client_name, | 38 const ports::NodeName& client_name, |
| 39 ScopedPlatformHandle process_handle) = 0; | 39 ScopedPlatformHandle process_handle) = 0; |
| 40 virtual void OnBrokerClientAdded(const ports::NodeName& from_node, | 40 virtual void OnBrokerClientAdded(const ports::NodeName& from_node, |
| 41 const ports::NodeName& client_name, | 41 const ports::NodeName& client_name, |
| 42 ScopedPlatformHandle broker_channel) = 0; | 42 ScopedPlatformHandle broker_channel) = 0; |
| 43 virtual void OnAcceptBrokerClient(const ports::NodeName& from_node, | 43 virtual void OnAcceptBrokerClient(const ports::NodeName& from_node, |
| 44 const ports::NodeName& broker_name, | 44 const ports::NodeName& broker_name, |
| 45 ScopedPlatformHandle broker_channel) = 0; | 45 ScopedPlatformHandle broker_channel) = 0; |
| 46 virtual void OnPortsMessage(Channel::MessagePtr message) = 0; | 46 virtual void OnPortsMessage(Channel::MessagePtr message) = 0; |
| 47 virtual void OnRequestPortConnection( | 47 virtual void OnRequestPortMerge(const ports::NodeName& from_node, |
| 48 const ports::NodeName& from_node, | 48 const ports::PortName& connector_port_name, |
| 49 const ports::PortName& connector_port_name, | 49 const std::string& token) = 0; |
| 50 const std::string& token) = 0; | |
| 51 virtual void OnConnectToPort( | |
| 52 const ports::NodeName& from_node, | |
| 53 const ports::PortName& connector_port_name, | |
| 54 const ports::PortName& connectee_port_name) = 0; | |
| 55 virtual void OnRequestIntroduction(const ports::NodeName& from_node, | 50 virtual void OnRequestIntroduction(const ports::NodeName& from_node, |
| 56 const ports::NodeName& name) = 0; | 51 const ports::NodeName& name) = 0; |
| 57 virtual void OnIntroduce(const ports::NodeName& from_node, | 52 virtual void OnIntroduce(const ports::NodeName& from_node, |
| 58 const ports::NodeName& name, | 53 const ports::NodeName& name, |
| 59 ScopedPlatformHandle channel_handle) = 0; | 54 ScopedPlatformHandle channel_handle) = 0; |
| 60 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
| 61 virtual void OnRelayPortsMessage(const ports::NodeName& from_node, | 56 virtual void OnRelayPortsMessage(const ports::NodeName& from_node, |
| 62 base::ProcessHandle from_process, | 57 base::ProcessHandle from_process, |
| 63 const ports::NodeName& destination, | 58 const ports::NodeName& destination, |
| 64 Channel::MessagePtr message) = 0; | 59 Channel::MessagePtr message) = 0; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 const ports::NodeName& token); | 91 const ports::NodeName& token); |
| 97 void AcceptParent(const ports::NodeName& token, | 92 void AcceptParent(const ports::NodeName& token, |
| 98 const ports::NodeName& child_name); | 93 const ports::NodeName& child_name); |
| 99 void AddBrokerClient(const ports::NodeName& client_name, | 94 void AddBrokerClient(const ports::NodeName& client_name, |
| 100 ScopedPlatformHandle process_handle); | 95 ScopedPlatformHandle process_handle); |
| 101 void BrokerClientAdded(const ports::NodeName& client_name, | 96 void BrokerClientAdded(const ports::NodeName& client_name, |
| 102 ScopedPlatformHandle broker_channel); | 97 ScopedPlatformHandle broker_channel); |
| 103 void AcceptBrokerClient(const ports::NodeName& broker_name, | 98 void AcceptBrokerClient(const ports::NodeName& broker_name, |
| 104 ScopedPlatformHandle broker_channel); | 99 ScopedPlatformHandle broker_channel); |
| 105 void PortsMessage(Channel::MessagePtr message); | 100 void PortsMessage(Channel::MessagePtr message); |
| 106 void RequestPortConnection(const ports::PortName& connector_port_name, | 101 void RequestPortMerge(const ports::PortName& connector_port_name, |
| 107 const std::string& token); | 102 const std::string& token); |
| 108 void ConnectToPort(const ports::PortName& connector_port_name, | |
| 109 const ports::PortName& connectee_port_name); | |
| 110 void RequestIntroduction(const ports::NodeName& name); | 103 void RequestIntroduction(const ports::NodeName& name); |
| 111 void Introduce(const ports::NodeName& name, | 104 void Introduce(const ports::NodeName& name, |
| 112 ScopedPlatformHandle channel_handle); | 105 ScopedPlatformHandle channel_handle); |
| 113 | 106 |
| 114 #if defined(OS_WIN) | 107 #if defined(OS_WIN) |
| 115 // Relay the message to the specified node via this channel. This is used to | 108 // Relay the message to the specified node via this channel. This is used to |
| 116 // pass windows handles between two processes that do not have permission to | 109 // pass windows handles between two processes that do not have permission to |
| 117 // duplicate handles into the other's address space. The relay process is | 110 // duplicate handles into the other's address space. The relay process is |
| 118 // assumed to have that permission. | 111 // assumed to have that permission. |
| 119 void RelayPortsMessage(const ports::NodeName& destination, | 112 void RelayPortsMessage(const ports::NodeName& destination, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 150 base::ProcessHandle remote_process_handle_ = base::kNullProcessHandle; | 143 base::ProcessHandle remote_process_handle_ = base::kNullProcessHandle; |
| 151 #endif | 144 #endif |
| 152 | 145 |
| 153 DISALLOW_COPY_AND_ASSIGN(NodeChannel); | 146 DISALLOW_COPY_AND_ASSIGN(NodeChannel); |
| 154 }; | 147 }; |
| 155 | 148 |
| 156 } // namespace edk | 149 } // namespace edk |
| 157 } // namespace mojo | 150 } // namespace mojo |
| 158 | 151 |
| 159 #endif // MOJO_EDK_SYSTEM_NODE_CHANNEL_H_ | 152 #endif // MOJO_EDK_SYSTEM_NODE_CHANNEL_H_ |
| OLD | NEW |