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

Unified Diff: mojo/common/values.mojom

Issue 2577563002: Add struct traits for base::Value. (Closed)
Patch Set: Created 4 years 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: mojo/common/values.mojom
diff --git a/mojo/common/values.mojom b/mojo/common/values.mojom
index 822df34a1ed61caa3269164567930fcf13631362..722198c56ac51d45c444576d55b4d0346e9a1d0b 100644
--- a/mojo/common/values.mojom
+++ b/mojo/common/values.mojom
@@ -4,8 +4,29 @@
module mojo.common.mojom;
-[Native]
-struct ListValue;
+union Value {
+ NullValue? null_value;
dcheng 2016/12/21 02:23:04 Btw, why does this need to be nullable?
Sam McNally 2016/12/21 02:32:53 It's so the traits can return a null NullValuePtr
+ bool bool_value;
+ int32 int_value;
+ double double_value;
+ string string_value;
+ array<uint8> binary_value;
+ DictionaryValue dictionary_value;
+ ListValue list_value;
+};
+
+struct ListValue {
+ array<Value> values;
+};
+
+struct DictionaryValue {
+ map<string, Value> values;
+};
+
+// An empty struct representing a null base::Value.
+struct NullValue {
+};
+// To avoid versioning problems for arc. TODO(sammc): Remove ASAP.
[Native]
-struct DictionaryValue;
+struct LegacyListValue;

Powered by Google App Engine
This is Rietveld 408576698