| 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 <queue> | 8 #include <queue> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 #include <unordered_set> | 10 #include <unordered_set> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 scoped_ptr<PortsMessage>* message); | 83 scoped_ptr<PortsMessage>* message); |
| 84 | 84 |
| 85 // Reserves a local port |port| associated with |token|. A peer holding a copy | 85 // Reserves a local port |port| associated with |token|. A peer holding a copy |
| 86 // of |token| can merge one of its own ports into this one. | 86 // of |token| can merge one of its own ports into this one. |
| 87 void ReservePort(const std::string& token, const ports::PortRef& port); | 87 void ReservePort(const std::string& token, const ports::PortRef& port); |
| 88 | 88 |
| 89 // Merges a local port |port| into a port reserved by |token| in the parent. | 89 // Merges a local port |port| into a port reserved by |token| in the parent. |
| 90 void MergePortIntoParent(const std::string& token, | 90 void MergePortIntoParent(const std::string& token, |
| 91 const ports::PortRef& port); | 91 const ports::PortRef& port); |
| 92 | 92 |
| 93 // Merges two local ports together. |
| 94 int MergeLocalPorts(const ports::PortRef& port0, const ports::PortRef& port1); |
| 95 |
| 93 // Creates a new shared buffer for use in the current process. | 96 // Creates a new shared buffer for use in the current process. |
| 94 scoped_refptr<PlatformSharedBuffer> CreateSharedBuffer(size_t num_bytes); | 97 scoped_refptr<PlatformSharedBuffer> CreateSharedBuffer(size_t num_bytes); |
| 95 | 98 |
| 96 // Request that the Node be shut down cleanly. This may take an arbitrarily | 99 // Request that the Node be shut down cleanly. This may take an arbitrarily |
| 97 // long time to complete, at which point |callback| will be called. | 100 // long time to complete, at which point |callback| will be called. |
| 98 // | 101 // |
| 99 // Note that while it is safe to continue using the NodeController's public | 102 // Note that while it is safe to continue using the NodeController's public |
| 100 // interface after requesting shutdown, you do so at your own risk and there | 103 // interface after requesting shutdown, you do so at your own risk and there |
| 101 // is NO guarantee that new messages will be sent or ports will complete | 104 // is NO guarantee that new messages will be sent or ports will complete |
| 102 // transfer. | 105 // transfer. |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 scoped_ptr<Broker> broker_; | 258 scoped_ptr<Broker> broker_; |
| 256 #endif | 259 #endif |
| 257 | 260 |
| 258 DISALLOW_COPY_AND_ASSIGN(NodeController); | 261 DISALLOW_COPY_AND_ASSIGN(NodeController); |
| 259 }; | 262 }; |
| 260 | 263 |
| 261 } // namespace edk | 264 } // namespace edk |
| 262 } // namespace mojo | 265 } // namespace mojo |
| 263 | 266 |
| 264 #endif // MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_ | 267 #endif // MOJO_EDK_SYSTEM_NODE_CONTROLLER_H_ |
| OLD | NEW |