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

Unified Diff: runtime/vm/service.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
« no previous file with comments | « runtime/vm/object_id_ring_test.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.h
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index a635dc30d08c7e37cdc9bb0bba341da412552605..4ca3eb01c83f22fcfa962e7b646825159d0e30bf 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -8,6 +8,7 @@
#include "include/dart_api.h"
#include "vm/allocation.h"
+#include "vm/object_id_ring.h"
#include "vm/os_thread.h"
namespace dart {
@@ -15,6 +16,7 @@ namespace dart {
class Array;
class EmbedderServiceHandler;
class GCEvent;
+class GrowableObjectArray;
class Instance;
class Isolate;
class JSONStream;
@@ -23,6 +25,40 @@ class RawInstance;
class ServiceEvent;
class String;
+class ServiceIdZone {
+ public:
+ ServiceIdZone();
+ virtual ~ServiceIdZone();
+
+ // Returned string will be zone allocated.
+ virtual char* GetServiceId(const Object& obj) = 0;
+
+ private:
+};
+
+
+class RingServiceIdZone : public ServiceIdZone {
+ public:
+ explicit RingServiceIdZone(ObjectIdRing* ring, ObjectIdRing::IdPolicy policy);
+ virtual ~RingServiceIdZone();
+
+ // Returned string will be zone allocated.
+ virtual char* GetServiceId(const Object& obj);
+
+ void set_policy(ObjectIdRing::IdPolicy policy) {
+ policy_ = policy;
+ }
+
+ ObjectIdRing::IdPolicy policy() const {
+ return policy_;
+ }
+
+ private:
+ ObjectIdRing* ring_;
+ ObjectIdRing::IdPolicy policy_;
+};
+
+
class Service : public AllStatic {
public:
// Handles a message which is not directed to an isolate.
« no previous file with comments | « runtime/vm/object_id_ring_test.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698