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

Unified Diff: runtime/vm/json_stream.h

Issue 22238002: Expose arguments and options to handlers through JSONStream (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « no previous file | runtime/vm/json_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/json_stream.h
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index 8afea7a56e7871fe3820a2ce96b6fc00eb31aa7a..79b1c69eb1b350769ea8c001a460d8de48f34f56 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -39,12 +39,33 @@ class JSONStream : ValueObject {
PRINTF_ATTRIBUTE(3, 4);
void PrintProperty(const char* name, const Object& o, bool ref = true);
+ void SetArguments(const char** arguments, intptr_t num_arguments);
+ void SetOptions(const char** option_keys, const char** option_values,
+ intptr_t num_options);
+
+ intptr_t num_arguments() const { return num_arguments_; }
+ const char* GetArgument(intptr_t i) const {
+ return arguments_[i];
+ }
+ intptr_t num_options() const { return num_options_; }
+ const char* GetOptionKey(intptr_t i) const {
+ return option_keys_[i];
+ }
+ const char* GetOptionValue(intptr_t i) const {
+ return option_values_[i];
+ }
+
private:
void PrintPropertyName(const char* name);
void PrintCommaIfNeeded();
bool NeedComma();
intptr_t open_objects_;
TextBuffer* buffer_;
+ const char** arguments_;
+ intptr_t num_arguments_;
+ const char** option_keys_;
+ const char** option_values_;
+ intptr_t num_options_;
};
} // namespace dart
« no previous file with comments | « no previous file | runtime/vm/json_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698