Chromium Code Reviews| Index: runtime/include/dart_api.h |
| diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h |
| index 3cc6fb5ea0ef0eb286a367088c1d494e35155959..b05cd160022f4688eba771c0921c0f0278325e17 100755 |
| --- a/runtime/include/dart_api.h |
| +++ b/runtime/include/dart_api.h |
| @@ -1477,7 +1477,7 @@ DART_EXPORT Dart_Handle Dart_StringToUTF8(Dart_Handle str, |
| /** |
| * Gets the data corresponding to the string object. This function returns |
| * the data only for Latin-1 (ISO-8859-1) string objects. For all other |
| - * string objects it return and error. |
| + * string objects it returns an error. |
| * |
| * \param str A string. |
| * \param latin1_array An array allocated by the caller, used to return |
| @@ -2106,6 +2106,38 @@ typedef Dart_NativeFunction (*Dart_NativeEntryResolver)(Dart_Handle name, |
| /* TODO(turnidge): Consider renaming to NativeFunctionResolver or |
| * NativeResolver. */ |
| +/* |
| + * ============== |
| + * Configurations |
|
Ivan Posva
2013/10/29 21:42:59
Environment here and everywhere else.
Please see
Søren Gjesse
2013/10/30 11:44:02
Done.
|
| + * ============== |
| + */ |
| + |
| +typedef enum { |
| + kStringConfig = 0, |
| + kIntegerConfig, |
| + kBoolConfig |
| +} Dart_ConfigType; |
| + |
| +/** |
| + * A configuration callback function. |
| + * |
| + * \param type The type used when asking for the configuration parameter. |
| + * \param name The name of the configuration parameter. |
| + * |
| + * \return A valid handle to a string if the configuration parameter exists. |
| + * A string must be returned for all configuration types as the Vm will parse |
| + * the value returned. If the configuration parameter does not exist return |
| + * Dart_Null(). |
| + */ |
| +typedef Dart_Handle (*Dart_ConfigCallback)(Dart_ConfigType type, |
| + Dart_Handle name); |
| + |
| +/** |
| + * Sets the configuration callback for the current isolate. This callback is |
| + * used to lookup configuration values by name in the current environment. |
| + */ |
| +DART_EXPORT Dart_Handle Dart_SetConfigCallback(Dart_ConfigCallback callback); |
| + |
| /** |
| * Sets the callback used to resolve native functions for a library. |
| * |