Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 * Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 3 * for details. All rights reserved. Use of this source code is governed by a | 3 * for details. All rights reserved. Use of this source code is governed by a |
| 4 * BSD-style license that can be found in the LICENSE file. | 4 * BSD-style license that can be found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #ifndef INCLUDE_DART_NATIVE_API_H_ | 7 #ifndef INCLUDE_DART_NATIVE_API_H_ |
| 8 #define INCLUDE_DART_NATIVE_API_H_ | 8 #define INCLUDE_DART_NATIVE_API_H_ |
| 9 | 9 |
| 10 #include "include/dart_api.h" | 10 #include "include/dart_api.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 * restored. | 95 * restored. |
| 96 * | 96 * |
| 97 * \param port_id The destination port. | 97 * \param port_id The destination port. |
| 98 * \param message The message to send. | 98 * \param message The message to send. |
| 99 * | 99 * |
| 100 * \return True if the message was posted. | 100 * \return True if the message was posted. |
| 101 */ | 101 */ |
| 102 DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message); | 102 DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message); |
| 103 | 103 |
| 104 /** | 104 /** |
| 105 * Posts a simple message on some port. | |
| 106 * | |
| 107 * This can be used to handles obtained from Dart_Null(), Dart_True(), | |
| 108 * Dart_False(), Dart_EmptyString(), and Dart_NewInteger() for small integers. | |
| 109 * | |
| 110 * \param port_id The destination port. | |
| 111 * \param message The message to send. | |
| 112 * | |
| 113 * \return True if the message was posted. | |
| 114 */ | |
| 115 DART_EXPORT bool Dart_PostSimpleObject(Dart_Port port_id, Dart_Handle message); | |
|
Ivan Posva
2015/12/09 22:45:28
Please remove this as it should be handled by Dart
zra
2015/12/10 00:07:29
Done.
| |
| 116 | |
| 117 /** | |
| 118 * Posts a message on some port. The message will contain the integer 'message'. | |
| 119 * | |
| 120 * \param port_id The destination port. | |
| 121 * \param message The message to send. | |
| 122 * | |
| 123 * \return True if the message was posted. | |
| 124 */ | |
| 125 DART_EXPORT bool Dart_PostInteger(Dart_Port port_id, intptr_t message); | |
| 126 | |
| 127 /** | |
| 105 * A native message handler. | 128 * A native message handler. |
| 106 * | 129 * |
| 107 * This handler is associated with a native port by calling | 130 * This handler is associated with a native port by calling |
| 108 * Dart_NewNativePort. | 131 * Dart_NewNativePort. |
| 109 * | 132 * |
| 110 * The message received is decoded into the message structure. The | 133 * The message received is decoded into the message structure. The |
| 111 * lifetime of the message data is controlled by the caller. All the | 134 * lifetime of the message data is controlled by the caller. All the |
| 112 * data references from the message are allocated by the caller and | 135 * data references from the message are allocated by the caller and |
| 113 * will be reclaimed when returning to it. | 136 * will be reclaimed when returning to it. |
| 114 */ | 137 */ |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 | 177 |
| 155 /** | 178 /** |
| 156 * Forces all loaded classes and functions to be compiled eagerly in | 179 * Forces all loaded classes and functions to be compiled eagerly in |
| 157 * the current isolate.. | 180 * the current isolate.. |
| 158 * | 181 * |
| 159 * TODO(turnidge): Document. | 182 * TODO(turnidge): Document. |
| 160 */ | 183 */ |
| 161 DART_EXPORT Dart_Handle Dart_CompileAll(); | 184 DART_EXPORT Dart_Handle Dart_CompileAll(); |
| 162 | 185 |
| 163 #endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */ | 186 #endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */ |
| OLD | NEW |