Chromium Code Reviews| Index: runtime/vm/json_stream.h |
| diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h |
| index 12bd79873538217b4bd99974912d12f632c5ed6f..12175ac99206aad313a206e28ae903c866f49e0a 100644 |
| --- a/runtime/vm/json_stream.h |
| +++ b/runtime/vm/json_stream.h |
| @@ -8,6 +8,7 @@ |
| #include "include/dart_api.h" // for Dart_Port |
| #include "platform/json.h" |
| #include "vm/allocation.h" |
| +#include "vm/service.h" |
| namespace dart { |
| @@ -20,7 +21,9 @@ class JSONObject; |
| class MessageQueue; |
| class Metric; |
| class Object; |
| +class RingIdZone; |
| class ServiceEvent; |
| +class ServiceIdZone; |
| class SourceBreakpoint; |
| class String; |
| class Zone; |
| @@ -40,6 +43,13 @@ class JSONStream : ValueObject { |
| void PostReply(); |
| + void set_service_id_zone(ServiceIdZone* service_id_zone) { |
| + service_id_zone_ = service_id_zone; |
| + } |
| + ServiceIdZone* service_id_zone() { |
| + return service_id_zone_; |
| + } |
| + |
| TextBuffer* buffer() { return &buffer_; } |
| const char* ToCString() { return buffer_.buf(); } |
| @@ -96,6 +106,7 @@ class JSONStream : ValueObject { |
| void PrintValue(Isolate* isolate, bool ref = true); |
| bool PrintValueStr(const String& s, intptr_t limit); |
| + void PrintServiceId(const char* name, const Object& o); |
| void PrintPropertyBool(const char* name, bool b); |
| void PrintProperty(const char* name, intptr_t i); |
| void PrintProperty64(const char* name, int64_t i); |
| @@ -124,6 +135,9 @@ class JSONStream : ValueObject { |
| intptr_t open_objects_; |
| TextBuffer buffer_; |
| + // Default service id zone. |
| + RingServiceIdZone ring_service_id_zone_; |
|
turnidge
2015/05/11 19:48:45
Call this default_service_id_zone? Also, stray sp
turnidge
2015/05/11 20:01:04
Or default_id_zone.
Cutch
2015/05/12 14:59:56
Done.
|
| + ServiceIdZone* service_id_zone_; |
| Dart_Port reply_port_; |
| const char* seq_; |
| const char* method_; |
| @@ -151,6 +165,10 @@ class JSONObject : public ValueObject { |
| stream_->CloseObject(); |
| } |
| + void AddServiceId(const char* name, const Object& o) const { |
| + stream_->PrintServiceId(name, o); |
| + } |
| + |
| void AddProperty(const char* name, bool b) const { |
| stream_->PrintPropertyBool(name, b); |
| } |