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

Unified Diff: runtime/vm/json_stream.h

Issue 1132323002: Add Service ID zones to service protocol (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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/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);
}
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/json_stream.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698