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 | |
84 // Basic functions ------------------------------------------------------------- | 77 // Basic functions ------------------------------------------------------------- |
85 | 78 |
86 // The functions in this section are available once |Init()| has been called. | 79 // The functions in this section are available once |Init()| has been called. |
87 | 80 |
88 // Creates a |MojoHandle| that wraps the given |PlatformHandle| (taking | 81 // Creates a |MojoHandle| that wraps the given |PlatformHandle| (taking |
89 // ownership of it). This |MojoHandle| can then, e.g., be passed through message | 82 // ownership of it). This |MojoHandle| can then, e.g., be passed through message |
90 // pipes. Note: This takes ownership (and thus closes) |platform_handle| even on | 83 // pipes. Note: This takes ownership (and thus closes) |platform_handle| even on |
91 // failure, which is different from what you'd expect from a Mojo API, but it | 84 // failure, which is different from what you'd expect from a Mojo API, but it |
92 // makes for a more convenient embedder API. | 85 // makes for a more convenient embedder API. |
93 MOJO_SYSTEM_IMPL_EXPORT MojoResult | 86 MOJO_SYSTEM_IMPL_EXPORT MojoResult |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // | 164 // |
172 // Default property values: | 165 // Default property values: |
173 // |MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED| - true | 166 // |MOJO_PROPERTY_TYPE_SYNC_CALL_ALLOWED| - true |
174 MOJO_SYSTEM_IMPL_EXPORT MojoResult SetProperty(MojoPropertyType type, | 167 MOJO_SYSTEM_IMPL_EXPORT MojoResult SetProperty(MojoPropertyType type, |
175 const void* value); | 168 const void* value); |
176 | 169 |
177 } // namespace edk | 170 } // namespace edk |
178 } // namespace mojo | 171 } // namespace mojo |
179 | 172 |
180 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 173 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
OLD | NEW |