OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module mojo.common.mojom; | 5 module mojo.common.mojom; |
6 | 6 |
7 union Value { | |
8 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
| |
9 bool bool_value; | |
10 int32 int_value; | |
11 double double_value; | |
12 string string_value; | |
13 array<uint8> binary_value; | |
14 DictionaryValue dictionary_value; | |
15 ListValue list_value; | |
16 }; | |
17 | |
18 struct ListValue { | |
19 array<Value> values; | |
20 }; | |
21 | |
22 struct DictionaryValue { | |
23 map<string, Value> values; | |
24 }; | |
25 | |
26 // An empty struct representing a null base::Value. | |
27 struct NullValue { | |
28 }; | |
29 | |
30 // To avoid versioning problems for arc. TODO(sammc): Remove ASAP. | |
7 [Native] | 31 [Native] |
8 struct ListValue; | 32 struct LegacyListValue; |
9 | |
10 [Native] | |
11 struct DictionaryValue; | |
OLD | NEW |