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

Unified Diff: runtime/vm/service.h

Issue 1232193003: Provide stdout and stderr output in the Observatory debugger. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tidy up Created 5 years, 5 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
Index: runtime/vm/service.h
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index 85c607f309c1194a7da7488d709b6977fd67edd2..001a65d03050c34ae8f7cd56075f71217802b95e 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -73,7 +73,7 @@ class Service : public AllStatic {
static bool NeedsEchoEvents() { return needs_echo_events_; }
static bool NeedsGraphEvents() { return needs_graph_events_; }
- static void ListenStream(const char* stream_id);
+ static bool ListenStream(const char* stream_id);
static void CancelStream(const char* stream_id);
static void HandleEvent(ServiceEvent* event);
@@ -88,10 +88,34 @@ class Service : public AllStatic {
Dart_ServiceRequestCallback callback,
void* user_data);
+ static void SetEmbedderStreamCallbacks(
+ Dart_ServiceStreamListenCallback listen_callback,
+ Dart_ServiceStreamCancelCallback cancel_callback);
+
static void SendEchoEvent(Isolate* isolate, const char* text);
static void SendGraphEvent(Isolate* isolate);
static void SendInspectEvent(Isolate* isolate, const Object& inspectee);
+ static void SendEmbedderEvent(Isolate* isolate,
+ const char* stream_id,
+ const char* event_kind,
+ const uint8_t* bytes,
+ intptr_t bytes_len);
+
+ static Dart_ServiceStreamListenCallback stream_listen_callback() {
+ return stream_listen_callback_;
+ }
+ static Dart_ServiceStreamCancelCallback stream_cancel_callback() {
+ return stream_cancel_callback_;
+ }
+
+ // Well-known stream ids.
+ static const char* const kIsolateStreamId;
+ static const char* const kDebugStreamId;
+ static const char* const kGCStreamId;
+ static const char* const kEchoStreamId;
+ static const char* const kGraphStreamId;
+
private:
static void InvokeMethod(Isolate* isolate, const Array& message);
@@ -113,6 +137,8 @@ class Service : public AllStatic {
static EmbedderServiceHandler* isolate_service_handler_head_;
static EmbedderServiceHandler* root_service_handler_head_;
+ static Dart_ServiceStreamListenCallback stream_listen_callback_;
+ static Dart_ServiceStreamCancelCallback stream_cancel_callback_;
static bool needs_isolate_events_;
static bool needs_debug_events_;

Powered by Google App Engine
This is Rietveld 408576698