| 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 | 67 |
| 68 // Must be called first, or just after setting configuration parameters, to | 68 // Must be called first, or just after setting configuration parameters, to |
| 69 // initialize the (global, singleton) system. | 69 // initialize the (global, singleton) system. |
| 70 MOJO_SYSTEM_IMPL_EXPORT void Init(); | 70 MOJO_SYSTEM_IMPL_EXPORT void Init(); |
| 71 | 71 |
| 72 // Sets a default callback to invoke when an internal error is reported but | 72 // Sets a default callback to invoke when an internal error is reported but |
| 73 // cannot be associated with a specific child process. | 73 // cannot be associated with a specific child process. |
| 74 MOJO_SYSTEM_IMPL_EXPORT void SetDefaultProcessErrorCallback( | 74 MOJO_SYSTEM_IMPL_EXPORT void SetDefaultProcessErrorCallback( |
| 75 const ProcessErrorCallback& callback); | 75 const ProcessErrorCallback& callback); |
| 76 | 76 |
| 77 // Used to select whether mojo:edk::Channel should use the legacy or normal |
| 78 // header. |
| 79 // TODO(jcivelli): http://crbug.com/695645 remove this when legacy mode is not |
| 80 // in use anymore. |
| 81 MOJO_SYSTEM_IMPL_EXPORT void SetUseLegacyTransportProtocol( |
| 82 bool use_legacy_protocol); |
| 83 |
| 77 // Basic functions ------------------------------------------------------------- | 84 // Basic functions ------------------------------------------------------------- |
| 78 | 85 |
| 79 // The functions in this section are available once |Init()| has been called. | 86 // The functions in this section are available once |Init()| has been called. |
| 80 | 87 |
| 81 // Creates a |MojoHandle| that wraps the given |PlatformHandle| (taking | 88 // Creates a |MojoHandle| that wraps the given |PlatformHandle| (taking |
| 82 // ownership of it). This |MojoHandle| can then, e.g., be passed through message | 89 // 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 | 90 // 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 | 91 // failure, which is different from what you'd expect from a Mojo API, but it |
| 85 // makes for a more convenient embedder API. | 92 // makes for a more convenient embedder API. |
| 86 MOJO_SYSTEM_IMPL_EXPORT MojoResult | 93 MOJO_SYSTEM_IMPL_EXPORT MojoResult |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 // | 171 // |
| 165 // Default property values: | 172 // Default property values: |
| 166 // |MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED| - true | 173 // |MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED| - true |
| 167 MOJO_SYSTEM_IMPL_EXPORT MojoResult SetProperty(MojoPropertyType type, | 174 MOJO_SYSTEM_IMPL_EXPORT MojoResult SetProperty(MojoPropertyType type, |
| 168 const void* value); | 175 const void* value); |
| 169 | 176 |
| 170 } // namespace edk | 177 } // namespace edk |
| 171 } // namespace mojo | 178 } // namespace mojo |
| 172 | 179 |
| 173 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 180 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
| OLD | NEW |