OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EMBEDDER_EMBEDDER_H_ | 5 #ifndef MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
6 #define MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 6 #define MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 const std::string& child_token); | 63 const std::string& child_token); |
64 | 64 |
65 // Should be called as early as possible in the child process with the handle | 65 // Should be called as early as possible in the child process with the handle |
66 // that the parent received from ChildProcessLaunched. | 66 // that the parent received from ChildProcessLaunched. |
67 MOJO_SYSTEM_IMPL_EXPORT void SetParentPipeHandle(ScopedPlatformHandle pipe); | 67 MOJO_SYSTEM_IMPL_EXPORT void SetParentPipeHandle(ScopedPlatformHandle pipe); |
68 | 68 |
69 // Same as above but extracts the pipe handle from the command line. See | 69 // Same as above but extracts the pipe handle from the command line. See |
70 // PlatformChannelPair for details. | 70 // PlatformChannelPair for details. |
71 MOJO_SYSTEM_IMPL_EXPORT void SetParentPipeHandleFromCommandLine(); | 71 MOJO_SYSTEM_IMPL_EXPORT void SetParentPipeHandleFromCommandLine(); |
72 | 72 |
73 // Called to connect to a peer process. A process is a peer when there exists no | |
Ken Rockot(use gerrit already)
2016/08/09 20:54:56
nit: Not strictly true. Though we don't expose a "
Sam McNally
2016/08/10 01:40:14
Done.
| |
74 // common ancestor within this mojo system. Both processes must call this | |
75 // function, each passing one end of a platform channel. This returns one end of | |
76 // a message pipe to each process. | |
77 MOJO_SYSTEM_IMPL_EXPORT ScopedMessagePipeHandle | |
78 ConnectToPeerProcess(ScopedPlatformHandle pipe); | |
79 | |
73 // Must be called first, or just after setting configuration parameters, to | 80 // Must be called first, or just after setting configuration parameters, to |
74 // initialize the (global, singleton) system. | 81 // initialize the (global, singleton) system. |
75 MOJO_SYSTEM_IMPL_EXPORT void Init(); | 82 MOJO_SYSTEM_IMPL_EXPORT void Init(); |
76 | 83 |
77 // Sets a default callback to invoke when an internal error is reported but | 84 // Sets a default callback to invoke when an internal error is reported but |
78 // cannot be associated with a specific child process. | 85 // cannot be associated with a specific child process. |
79 MOJO_SYSTEM_IMPL_EXPORT void SetDefaultProcessErrorCallback( | 86 MOJO_SYSTEM_IMPL_EXPORT void SetDefaultProcessErrorCallback( |
80 const ProcessErrorCallback& callback); | 87 const ProcessErrorCallback& callback); |
81 | 88 |
82 // Basic functions ------------------------------------------------------------- | 89 // Basic functions ------------------------------------------------------------- |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 // | 198 // |
192 // Default property values: | 199 // Default property values: |
193 // |MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED| - true | 200 // |MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED| - true |
194 MOJO_SYSTEM_IMPL_EXPORT MojoResult SetProperty(MojoPropertyType type, | 201 MOJO_SYSTEM_IMPL_EXPORT MojoResult SetProperty(MojoPropertyType type, |
195 const void* value); | 202 const void* value); |
196 | 203 |
197 } // namespace edk | 204 } // namespace edk |
198 } // namespace mojo | 205 } // namespace mojo |
199 | 206 |
200 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 207 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
OLD | NEW |