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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // is no common ancestor for the processes involved within this mojo system. | 67 // is no common ancestor for the processes involved within this mojo system. |
68 // Both processes must call this function, each passing one end of a platform | 68 // Both processes must call this function, each passing one end of a platform |
69 // channel. This returns one end of a message pipe to each process. | 69 // channel. This returns one end of a message pipe to each process. |
70 ScopedMessagePipeHandle ConnectToPeerProcess(ScopedPlatformHandle pipe_handle, | 70 ScopedMessagePipeHandle ConnectToPeerProcess(ScopedPlatformHandle pipe_handle, |
71 const std::string& peer_token); | 71 const std::string& peer_token); |
72 void ClosePeerConnection(const std::string& peer_token); | 72 void ClosePeerConnection(const std::string& peer_token); |
73 | 73 |
74 // Called in a child process exactly once during early initialization. | 74 // Called in a child process exactly once during early initialization. |
75 void InitChild(ScopedPlatformHandle platform_handle); | 75 void InitChild(ScopedPlatformHandle platform_handle); |
76 | 76 |
77 // Creates a message pipe endpoint connected to an endpoint in a remote | |
78 // embedder. |platform_handle| is used as a channel to negotiate the | |
79 // connection. | |
80 ScopedMessagePipeHandle CreateMessagePipe( | |
81 ScopedPlatformHandle platform_handle); | |
82 | |
83 // Creates a message pipe endpoint associated with |token|, which a child | 77 // Creates a message pipe endpoint associated with |token|, which a child |
84 // holding the token can later locate and connect to. | 78 // holding the token can later locate and connect to. |
85 ScopedMessagePipeHandle CreateParentMessagePipe( | 79 ScopedMessagePipeHandle CreateParentMessagePipe( |
86 const std::string& token, const std::string& child_token); | 80 const std::string& token, const std::string& child_token); |
87 | 81 |
88 // Creates a message pipe endpoint and connects it to a pipe the parent has | 82 // Creates a message pipe endpoint and connects it to a pipe the parent has |
89 // associated with |token|. | 83 // associated with |token|. |
90 ScopedMessagePipeHandle CreateChildMessagePipe(const std::string& token); | 84 ScopedMessagePipeHandle CreateChildMessagePipe(const std::string& token); |
91 | 85 |
92 // Sets the mach port provider for this process. | 86 // Sets the mach port provider for this process. |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 // Properties that can be read using the MojoGetProperty() API. | 309 // Properties that can be read using the MojoGetProperty() API. |
316 bool property_sync_call_allowed_ = true; | 310 bool property_sync_call_allowed_ = true; |
317 | 311 |
318 DISALLOW_COPY_AND_ASSIGN(Core); | 312 DISALLOW_COPY_AND_ASSIGN(Core); |
319 }; | 313 }; |
320 | 314 |
321 } // namespace edk | 315 } // namespace edk |
322 } // namespace mojo | 316 } // namespace mojo |
323 | 317 |
324 #endif // MOJO_EDK_SYSTEM_CORE_H_ | 318 #endif // MOJO_EDK_SYSTEM_CORE_H_ |
OLD | NEW |