| 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 <queue> | 8 #include <queue> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 static void GetPortsMessageData(Channel::Message* message, void** data, | 95 static void GetPortsMessageData(Channel::Message* message, void** data, |
| 96 size_t* num_data_bytes); | 96 size_t* num_data_bytes); |
| 97 | 97 |
| 98 // Start receiving messages. | 98 // Start receiving messages. |
| 99 void Start(); | 99 void Start(); |
| 100 | 100 |
| 101 // Permanently stop the channel from sending or receiving messages. | 101 // Permanently stop the channel from sending or receiving messages. |
| 102 void ShutDown(); | 102 void ShutDown(); |
| 103 | 103 |
| 104 // Leaks the pipe handle instead of closing it on shutdown. |
| 105 void LeakHandleOnShutdown(); |
| 106 |
| 104 // Invokes the bad message callback for this channel, if any. | 107 // Invokes the bad message callback for this channel, if any. |
| 105 void NotifyBadMessage(const std::string& error); | 108 void NotifyBadMessage(const std::string& error); |
| 106 | 109 |
| 107 void SetRemoteProcessHandle(base::ProcessHandle process_handle); | 110 void SetRemoteProcessHandle(base::ProcessHandle process_handle); |
| 108 bool HasRemoteProcessHandle(); | 111 bool HasRemoteProcessHandle(); |
| 109 // Note: The returned |ProcessHandle| is owned by the caller and should be | 112 // Note: The returned |ProcessHandle| is owned by the caller and should be |
| 110 // freed if necessary. | 113 // freed if necessary. |
| 111 base::ProcessHandle CopyRemoteProcessHandle(); | 114 base::ProcessHandle CopyRemoteProcessHandle(); |
| 112 | 115 |
| 113 // Used for context in Delegate calls (via |from_node| arguments.) | 116 // Used for context in Delegate calls (via |from_node| arguments.) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 PendingRelayMessageQueue pending_relay_messages_; | 195 PendingRelayMessageQueue pending_relay_messages_; |
| 193 #endif | 196 #endif |
| 194 | 197 |
| 195 DISALLOW_COPY_AND_ASSIGN(NodeChannel); | 198 DISALLOW_COPY_AND_ASSIGN(NodeChannel); |
| 196 }; | 199 }; |
| 197 | 200 |
| 198 } // namespace edk | 201 } // namespace edk |
| 199 } // namespace mojo | 202 } // namespace mojo |
| 200 | 203 |
| 201 #endif // MOJO_EDK_SYSTEM_NODE_CHANNEL_H_ | 204 #endif // MOJO_EDK_SYSTEM_NODE_CHANNEL_H_ |
| OLD | NEW |