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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle); | 46 scoped_refptr<Dispatcher> GetDispatcher(MojoHandle handle); |
47 | 47 |
48 // Called in the parent process any time a new child is launched. | 48 // Called in the parent process any time a new child is launched. |
49 void AddChild(base::ProcessHandle process_handle, | 49 void AddChild(base::ProcessHandle process_handle, |
50 ScopedPlatformHandle platform_handle); | 50 ScopedPlatformHandle platform_handle); |
51 | 51 |
52 // Called in a child process exactly once during early initialization. | 52 // Called in a child process exactly once during early initialization. |
53 void InitChild(ScopedPlatformHandle platform_handle); | 53 void InitChild(ScopedPlatformHandle platform_handle); |
54 | 54 |
| 55 // Creates a message pipe endpoint connected to an an endpoint in a remote |
| 56 // embedder. |platform_handle| is used as a channel to negotiate the |
| 57 // connection. |
| 58 ScopedMessagePipeHandle CreateMessagePipe( |
| 59 ScopedPlatformHandle platform_handle); |
| 60 |
55 // This creates a message pipe endpoint connected to an endpoint in a remote | 61 // This creates a message pipe endpoint connected to an endpoint in a remote |
56 // embedder. |platform_handle| is used as a channel to negotiate the | 62 // embedder. |platform_handle| is used as a channel to negotiate the |
57 // connection. This is only here to facilitate legacy embedder code. See | 63 // connection. DEPRECATED. Please use the above method instead. This is now |
58 // mojo::edk::CreateMessagePipe in mojo/edk/embedder/embedder.h. | 64 // merely an inconvenient wrapper for that. |
59 void CreateMessagePipe( | 65 void CreateMessagePipe( |
60 ScopedPlatformHandle platform_handle, | 66 ScopedPlatformHandle platform_handle, |
61 const base::Callback<void(ScopedMessagePipeHandle)>& callback); | 67 const base::Callback<void(ScopedMessagePipeHandle)>& callback); |
62 | 68 |
63 // Creates a message pipe endpoint associated with |token|, which a child | 69 // Creates a message pipe endpoint associated with |token|, which a child |
64 // holding the token can later locate and connect to. | 70 // holding the token can later locate and connect to. |
65 void CreateParentMessagePipe( | 71 void CreateParentMessagePipe( |
66 const std::string& token, | 72 const std::string& token, |
67 const base::Callback<void(ScopedMessagePipeHandle)>& callback); | 73 const base::Callback<void(ScopedMessagePipeHandle)>& callback); |
68 | 74 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 base::Lock mapping_table_lock_; // Protects |mapping_table_|. | 234 base::Lock mapping_table_lock_; // Protects |mapping_table_|. |
229 MappingTable mapping_table_; | 235 MappingTable mapping_table_; |
230 | 236 |
231 DISALLOW_COPY_AND_ASSIGN(Core); | 237 DISALLOW_COPY_AND_ASSIGN(Core); |
232 }; | 238 }; |
233 | 239 |
234 } // namespace edk | 240 } // namespace edk |
235 } // namespace mojo | 241 } // namespace mojo |
236 | 242 |
237 #endif // MOJO_EDK_SYSTEM_CORE_H_ | 243 #endif // MOJO_EDK_SYSTEM_CORE_H_ |
OLD | NEW |