| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CORE_H_ | 5 #ifndef MOJO_EDK_SYSTEM_CORE_H_ |
| 6 #define MOJO_EDK_SYSTEM_CORE_H_ | 6 #define MOJO_EDK_SYSTEM_CORE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 const std::string& child_token, | 59 const std::string& child_token, |
| 60 const ProcessErrorCallback& process_error_callback); | 60 const ProcessErrorCallback& process_error_callback); |
| 61 | 61 |
| 62 // Called in the parent process when a child process fails to launch. | 62 // Called in the parent process when a child process fails to launch. |
| 63 void ChildLaunchFailed(const std::string& child_token); | 63 void ChildLaunchFailed(const std::string& child_token); |
| 64 | 64 |
| 65 // Called to connect to a peer process. This should be called only if there | 65 // Called to connect to a peer process. This should be called only if there |
| 66 // is no common ancestor for the processes involved within this mojo system. | 66 // is no common ancestor for the processes involved within this mojo system. |
| 67 // Both processes must call this function, each passing one end of a platform | 67 // Both processes must call this function, each passing one end of a platform |
| 68 // channel. This returns one end of a message pipe to each process. | 68 // channel. This returns one end of a message pipe to each process. |
| 69 ScopedMessagePipeHandle ConnectToPeerProcess( | 69 ScopedMessagePipeHandle ConnectToPeerProcess(ScopedPlatformHandle pipe_handle, |
| 70 ScopedPlatformHandle pipe_handle); | 70 const std::string& peer_token); |
| 71 void ClosePeerConnection(const std::string& peer_token); |
| 71 | 72 |
| 72 // Called in a child process exactly once during early initialization. | 73 // Called in a child process exactly once during early initialization. |
| 73 void InitChild(ScopedPlatformHandle platform_handle); | 74 void InitChild(ScopedPlatformHandle platform_handle); |
| 74 | 75 |
| 75 // Creates a message pipe endpoint connected to an endpoint in a remote | 76 // Creates a message pipe endpoint connected to an endpoint in a remote |
| 76 // embedder. |platform_handle| is used as a channel to negotiate the | 77 // embedder. |platform_handle| is used as a channel to negotiate the |
| 77 // connection. | 78 // connection. |
| 78 ScopedMessagePipeHandle CreateMessagePipe( | 79 ScopedMessagePipeHandle CreateMessagePipe( |
| 79 ScopedPlatformHandle platform_handle); | 80 ScopedPlatformHandle platform_handle); |
| 80 | 81 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 // Properties that can be read using the MojoGetProperty() API. | 314 // Properties that can be read using the MojoGetProperty() API. |
| 314 bool property_sync_call_allowed_ = true; | 315 bool property_sync_call_allowed_ = true; |
| 315 | 316 |
| 316 DISALLOW_COPY_AND_ASSIGN(Core); | 317 DISALLOW_COPY_AND_ASSIGN(Core); |
| 317 }; | 318 }; |
| 318 | 319 |
| 319 } // namespace edk | 320 } // namespace edk |
| 320 } // namespace mojo | 321 } // namespace mojo |
| 321 | 322 |
| 322 #endif // MOJO_EDK_SYSTEM_CORE_H_ | 323 #endif // MOJO_EDK_SYSTEM_CORE_H_ |
| OLD | NEW |