| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // Must be called first, or just after setting configuration parameters, to | 73 // Must be called first, or just after setting configuration parameters, to |
| 74 // initialize the (global, singleton) system. | 74 // initialize the (global, singleton) system. |
| 75 MOJO_SYSTEM_IMPL_EXPORT void Init(); | 75 MOJO_SYSTEM_IMPL_EXPORT void Init(); |
| 76 | 76 |
| 77 // Sets a default callback to invoke when an internal error is reported but |
| 78 // cannot be associated with a specific child process. |
| 79 MOJO_SYSTEM_IMPL_EXPORT void SetDefaultProcessErrorCallback( |
| 80 const ProcessErrorCallback& callback); |
| 81 |
| 77 // Basic functions ------------------------------------------------------------- | 82 // Basic functions ------------------------------------------------------------- |
| 78 | 83 |
| 79 // The functions in this section are available once |Init()| has been called. | 84 // The functions in this section are available once |Init()| has been called. |
| 80 | 85 |
| 81 // Creates a |MojoHandle| that wraps the given |PlatformHandle| (taking | 86 // Creates a |MojoHandle| that wraps the given |PlatformHandle| (taking |
| 82 // ownership of it). This |MojoHandle| can then, e.g., be passed through message | 87 // ownership of it). This |MojoHandle| can then, e.g., be passed through message |
| 83 // pipes. Note: This takes ownership (and thus closes) |platform_handle| even on | 88 // pipes. Note: This takes ownership (and thus closes) |platform_handle| even on |
| 84 // failure, which is different from what you'd expect from a Mojo API, but it | 89 // failure, which is different from what you'd expect from a Mojo API, but it |
| 85 // makes for a more convenient embedder API. | 90 // makes for a more convenient embedder API. |
| 86 MOJO_SYSTEM_IMPL_EXPORT MojoResult | 91 MOJO_SYSTEM_IMPL_EXPORT MojoResult |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // | 191 // |
| 187 // Default property values: | 192 // Default property values: |
| 188 // |MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED| - true | 193 // |MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED| - true |
| 189 MOJO_SYSTEM_IMPL_EXPORT MojoResult SetProperty(MojoPropertyType type, | 194 MOJO_SYSTEM_IMPL_EXPORT MojoResult SetProperty(MojoPropertyType type, |
| 190 const void* value); | 195 const void* value); |
| 191 | 196 |
| 192 } // namespace edk | 197 } // namespace edk |
| 193 } // namespace mojo | 198 } // namespace mojo |
| 194 | 199 |
| 195 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 200 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
| OLD | NEW |