| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 void SetIOTaskRunner(scoped_refptr<base::TaskRunner> io_task_runner); | 47 void SetIOTaskRunner(scoped_refptr<base::TaskRunner> io_task_runner); |
| 48 | 48 |
| 49 // Retrieves the NodeController for the current process. | 49 // Retrieves the NodeController for the current process. |
| 50 NodeController* GetNodeController(); | 50 NodeController* GetNodeController(); |
| 51 | 51 |
| 52 scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle); | 52 scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle); |
| 53 | 53 |
| 54 // Called in the parent process any time a new child is launched. | 54 // Called in the parent process any time a new child is launched. |
| 55 void AddChild(base::ProcessHandle process_handle, | 55 void AddChild(base::ProcessHandle process_handle, |
| 56 ScopedPlatformHandle platform_handle, | 56 ScopedPlatformHandle platform_handle, |
| 57 const std::string& child_token); | 57 const std::string& child_token, |
| 58 const ProcessErrorCallback& process_error_callback); |
| 58 | 59 |
| 59 // Called in the parent process when a child process fails to launch. | 60 // Called in the parent process when a child process fails to launch. |
| 60 void ChildLaunchFailed(const std::string& child_token); | 61 void ChildLaunchFailed(const std::string& child_token); |
| 61 | 62 |
| 62 // Called in a child process exactly once during early initialization. | 63 // Called in a child process exactly once during early initialization. |
| 63 void InitChild(ScopedPlatformHandle platform_handle); | 64 void InitChild(ScopedPlatformHandle platform_handle); |
| 64 | 65 |
| 65 // Creates a message pipe endpoint connected to an endpoint in a remote | 66 // Creates a message pipe endpoint connected to an endpoint in a remote |
| 66 // embedder. |platform_handle| is used as a channel to negotiate the | 67 // embedder. |platform_handle| is used as a channel to negotiate the |
| 67 // connection. | 68 // connection. |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 MojoHandle* handles, | 194 MojoHandle* handles, |
| 194 uint32_t* num_handles, | 195 uint32_t* num_handles, |
| 195 MojoReadMessageFlags flags); | 196 MojoReadMessageFlags flags); |
| 196 MojoResult ReadMessageNew(MojoHandle message_pipe_handle, | 197 MojoResult ReadMessageNew(MojoHandle message_pipe_handle, |
| 197 MojoMessageHandle* message, | 198 MojoMessageHandle* message, |
| 198 uint32_t* num_bytes, | 199 uint32_t* num_bytes, |
| 199 MojoHandle* handles, | 200 MojoHandle* handles, |
| 200 uint32_t* num_handles, | 201 uint32_t* num_handles, |
| 201 MojoReadMessageFlags flags); | 202 MojoReadMessageFlags flags); |
| 202 MojoResult FuseMessagePipes(MojoHandle handle0, MojoHandle handle1); | 203 MojoResult FuseMessagePipes(MojoHandle handle0, MojoHandle handle1); |
| 204 MojoResult NotifyBadMessage(MojoMessageHandle message, |
| 205 const char* error, |
| 206 size_t error_num_bytes); |
| 203 | 207 |
| 204 // These methods correspond to the API functions defined in | 208 // These methods correspond to the API functions defined in |
| 205 // "mojo/public/c/system/data_pipe.h": | 209 // "mojo/public/c/system/data_pipe.h": |
| 206 MojoResult CreateDataPipe( | 210 MojoResult CreateDataPipe( |
| 207 const MojoCreateDataPipeOptions* options, | 211 const MojoCreateDataPipeOptions* options, |
| 208 MojoHandle* data_pipe_producer_handle, | 212 MojoHandle* data_pipe_producer_handle, |
| 209 MojoHandle* data_pipe_consumer_handle); | 213 MojoHandle* data_pipe_consumer_handle); |
| 210 MojoResult WriteData(MojoHandle data_pipe_producer_handle, | 214 MojoResult WriteData(MojoHandle data_pipe_producer_handle, |
| 211 const void* elements, | 215 const void* elements, |
| 212 uint32_t* num_bytes, | 216 uint32_t* num_bytes, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 base::Lock mapping_table_lock_; // Protects |mapping_table_|. | 301 base::Lock mapping_table_lock_; // Protects |mapping_table_|. |
| 298 MappingTable mapping_table_; | 302 MappingTable mapping_table_; |
| 299 | 303 |
| 300 DISALLOW_COPY_AND_ASSIGN(Core); | 304 DISALLOW_COPY_AND_ASSIGN(Core); |
| 301 }; | 305 }; |
| 302 | 306 |
| 303 } // namespace edk | 307 } // namespace edk |
| 304 } // namespace mojo | 308 } // namespace mojo |
| 305 | 309 |
| 306 #endif // MOJO_EDK_SYSTEM_CORE_H_ | 310 #endif // MOJO_EDK_SYSTEM_CORE_H_ |
| OLD | NEW |