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

Side by Side Diff: runtime/vm/json_stream.h

Issue 243973002: - Add a minimal implementation of Capability. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_JSON_STREAM_H_ 5 #ifndef VM_JSON_STREAM_H_
6 #define VM_JSON_STREAM_H_ 6 #define VM_JSON_STREAM_H_
7 7
8 #include "include/dart_api.h" // for Dart_Port 8 #include "include/dart_api.h" // for Dart_Port
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
11 11
12 namespace dart { 12 namespace dart {
13 13
14 class Field; 14 class Field;
15 class GrowableObjectArray; 15 class GrowableObjectArray;
16 class Instance; 16 class Instance;
17 class JSONArray; 17 class JSONArray;
18 class JSONObject; 18 class JSONObject;
19 class Object; 19 class Object;
20 class SourceBreakpoint; 20 class SourceBreakpoint;
21 class Zone; 21 class Zone;
22 22
23 class JSONStream : ValueObject { 23 class JSONStream : ValueObject {
24 public: 24 public:
25 explicit JSONStream(intptr_t buf_size = 256); 25 explicit JSONStream(intptr_t buf_size = 256);
26 ~JSONStream(); 26 ~JSONStream();
27 27
28 void Setup(Zone* zone, 28 void Setup(Zone* zone,
29 const Instance& reply_port, 29 Dart_Port reply_port,
30 const GrowableObjectArray& path, 30 const GrowableObjectArray& path,
31 const GrowableObjectArray& option_keys, 31 const GrowableObjectArray& option_keys,
32 const GrowableObjectArray& option_values); 32 const GrowableObjectArray& option_values);
33 void PostReply(); 33 void PostReply();
34 34
35 TextBuffer* buffer() { return &buffer_; } 35 TextBuffer* buffer() { return &buffer_; }
36 const char* ToCString() { return buffer_.buf(); } 36 const char* ToCString() { return buffer_.buf(); }
37 37
38 void set_reply_port(Dart_Port port); 38 void set_reply_port(Dart_Port port);
39 void SetArguments(const char** arguments, intptr_t num_arguments); 39 void SetArguments(const char** arguments, intptr_t num_arguments);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 friend class JSONObject; 201 friend class JSONObject;
202 202
203 DISALLOW_ALLOCATION(); 203 DISALLOW_ALLOCATION();
204 DISALLOW_COPY_AND_ASSIGN(JSONArray); 204 DISALLOW_COPY_AND_ASSIGN(JSONArray);
205 }; 205 };
206 206
207 } // namespace dart 207 } // namespace dart
208 208
209 #endif // VM_JSON_STREAM_H_ 209 #endif // VM_JSON_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698