| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 // Called in the parent process any time a new child is launched. | 56 // Called in the parent process any time a new child is launched. |
| 57 void AddChild(base::ProcessHandle process_handle, | 57 void AddChild(base::ProcessHandle process_handle, |
| 58 ScopedPlatformHandle platform_handle, | 58 ScopedPlatformHandle platform_handle, |
| 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 |
| 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 |
| 68 // channel. This returns one end of a message pipe to each process. |
| 69 ScopedMessagePipeHandle ConnectToPeerProcess( |
| 70 ScopedPlatformHandle pipe_handle); |
| 71 |
| 65 // Called in a child process exactly once during early initialization. | 72 // Called in a child process exactly once during early initialization. |
| 66 void InitChild(ScopedPlatformHandle platform_handle); | 73 void InitChild(ScopedPlatformHandle platform_handle); |
| 67 | 74 |
| 68 // Creates a message pipe endpoint connected to an endpoint in a remote | 75 // Creates a message pipe endpoint connected to an endpoint in a remote |
| 69 // embedder. |platform_handle| is used as a channel to negotiate the | 76 // embedder. |platform_handle| is used as a channel to negotiate the |
| 70 // connection. | 77 // connection. |
| 71 ScopedMessagePipeHandle CreateMessagePipe( | 78 ScopedMessagePipeHandle CreateMessagePipe( |
| 72 ScopedPlatformHandle platform_handle); | 79 ScopedPlatformHandle platform_handle); |
| 73 | 80 |
| 74 // Creates a message pipe endpoint associated with |token|, which a child | 81 // Creates a message pipe endpoint associated with |token|, which a child |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 // Properties that can be read using the MojoGetProperty() API. | 313 // Properties that can be read using the MojoGetProperty() API. |
| 307 bool property_sync_call_allowed_ = true; | 314 bool property_sync_call_allowed_ = true; |
| 308 | 315 |
| 309 DISALLOW_COPY_AND_ASSIGN(Core); | 316 DISALLOW_COPY_AND_ASSIGN(Core); |
| 310 }; | 317 }; |
| 311 | 318 |
| 312 } // namespace edk | 319 } // namespace edk |
| 313 } // namespace mojo | 320 } // namespace mojo |
| 314 | 321 |
| 315 #endif // MOJO_EDK_SYSTEM_CORE_H_ | 322 #endif // MOJO_EDK_SYSTEM_CORE_H_ |
| OLD | NEW |