Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1163)

Unified Diff: runtime/include/dart_api.h

Issue 8588040: Add a mid-sized integration test for the Dart Embedding Api which (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/custom_isolate_test.cc » ('j') | runtime/vm/custom_isolate_test.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
===================================================================
--- runtime/include/dart_api.h (revision 1518)
+++ runtime/include/dart_api.h (working copy)
@@ -390,6 +390,15 @@
const Dart_Port kCloseAllPorts = 0;
/**
+ * A create port callback.
+ *
+ * This callback allows the embedder to receive notification when a
+ * port is created.
+ */
+typedef void (*Dart_CreatePortCallback)(Dart_Isolate isolate,
+ Dart_Port port);
+
+/**
* A close port callback.
*
* This callback allows the embedder to receive notification when a
@@ -409,6 +418,7 @@
* execution begins, the embedder is responsible for threading issues.
*/
DART_EXPORT void Dart_SetMessageCallbacks(
+ Dart_CreatePortCallback create_port_callback,
Dart_PostMessageCallback post_message_callback,
Dart_ClosePortCallback close_port_callback);
// TODO(turnidge): Consider moving this to isolate creation so that it
@@ -445,6 +455,16 @@
// TODO(turnidge): Should this be removed from the public api?
/**
+ * Creates a Dart_Port and associates it with the current isolate.
+ */
+DART_EXPORT Dart_Port Dart_CreatePort();
+
+/**
+ * Does the current isolate have active ports?
+ */
+DART_EXPORT bool Dart_IsolateHasActivePorts();
+
+/**
* Posts a message for some isolate. The message is built from a raw
* array.
*
« no previous file with comments | « no previous file | runtime/vm/custom_isolate_test.cc » ('j') | runtime/vm/custom_isolate_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698