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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 170943003: Allow for embedder provided service request handlers (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months 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 | « runtime/platform/json.cc ('k') | runtime/vm/json_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 17c7f33dec6a0f4fba2f44cd9ccf32a77acf52cd..bcd860f1e039b57824057497b8df8f79873ee11f 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -4555,4 +4555,25 @@ DART_EXPORT Dart_Isolate Dart_GetServiceIsolate(void* callback_data) {
return Api::CastIsolate(Service::GetServiceIsolate(callback_data));
}
+
+DART_EXPORT bool Dart_IsServiceRunning() {
+ return Service::IsRunning();
+}
+
+
+DART_EXPORT void Dart_RegisterIsolateServiceRequestCallback(
+ const char* name,
+ Dart_ServiceRequestCallback callback,
+ void* user_data) {
+ Service::RegisterIsolateEmbedderCallback(name, callback, user_data);
+}
+
+
+DART_EXPORT void Dart_RegisterRootServiceRequestCallback(
+ const char* name,
+ Dart_ServiceRequestCallback callback,
+ void* user_data) {
+ Service::RegisterRootEmbedderCallback(name, callback, user_data);
+}
+
} // namespace dart
« no previous file with comments | « runtime/platform/json.cc ('k') | runtime/vm/json_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698