OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 import "sample_import.mojom" | 5 import "sample_import.mojom" |
6 import "sample_import2.mojom" | 6 import "sample_import2.mojom" |
7 | 7 |
8 [JavaPackage="org.chromium.mojo.bindings.test.mojom.sample"] | 8 [JavaPackage="org.chromium.mojo.bindings.test.mojom.sample"] |
9 module sample { | 9 module sample { |
10 | 10 |
11 const uint8 kTwelve = 12; | 11 const uint8 kTwelve = 12; |
| 12 const uint64 kTooBigForSignedInt64 = 9999999999999999999; |
12 | 13 |
13 struct Bar { | 14 struct Bar { |
14 enum Type { | 15 enum Type { |
15 TYPE_VERTICAL = 1, | 16 TYPE_VERTICAL = 1, |
16 TYPE_HORIZONTAL, | 17 TYPE_HORIZONTAL, |
17 TYPE_BOTH, | 18 TYPE_BOTH, |
18 TYPE_INVALID | 19 TYPE_INVALID |
19 }; | 20 }; |
20 uint8 alpha@0 = 0xff; | 21 uint8 alpha@0 = 0xff; |
21 uint8 beta@1; | 22 uint8 beta@1; |
(...skipping 20 matching lines...) Expand all Loading... |
42 string[][][] multi_array_of_strings@13; | 43 string[][][] multi_array_of_strings@13; |
43 bool[] array_of_bools@14; | 44 bool[] array_of_bools@14; |
44 }; | 45 }; |
45 | 46 |
46 struct DefaultsTest { | 47 struct DefaultsTest { |
47 int8 a0@0 = -12; | 48 int8 a0@0 = -12; |
48 uint8 a1@1 = sample.kTwelve; | 49 uint8 a1@1 = sample.kTwelve; |
49 int16 a2@2 = 1234; | 50 int16 a2@2 = 1234; |
50 uint16 a3@3 = 34567; | 51 uint16 a3@3 = 34567; |
51 int32 a4@4 = 123456; | 52 int32 a4@4 = 123456; |
52 // TODO(vtl): crbug.com/375522 | 53 uint32 a5@5 = 3456789012; |
53 uint32 a5@5 /* = 3456789012 */; | |
54 int64 a6@6 = 111111111111; | 54 int64 a6@6 = 111111111111; |
55 // TODO(vtl): crbug.com/375522 | 55 uint64 a7@7 = 9999999999999999999; |
56 uint64 a7@7 /* = 9999999999999999999 */; | |
57 int32 a8@8 = 0x12345; | 56 int32 a8@8 = 0x12345; |
58 int32 a9@9 = -0x12345; | 57 int32 a9@9 = -0x12345; |
59 int32 a10@10 = +1234; | 58 int32 a10@10 = +1234; |
60 bool a11@11 = true; | 59 bool a11@11 = true; |
61 bool a12@12 = false; | 60 bool a12@12 = false; |
62 float a13@13 = 123.25; | 61 float a13@13 = 123.25; |
63 double a14@14 = 1234567890.123; | 62 double a14@14 = 1234567890.123; |
64 double a15@15 = 1E10; | 63 double a15@15 = 1E10; |
65 double a16@16 = -1.2E+20; | 64 double a16@16 = -1.2E+20; |
66 double a17@17 = +1.23E-20; | 65 double a17@17 = +1.23E-20; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 DidFrobinate@0(int32 result@0); | 100 DidFrobinate@0(int32 result@0); |
102 }; | 101 }; |
103 | 102 |
104 // This interface is referenced above where it is defined. It also refers to | 103 // This interface is referenced above where it is defined. It also refers to |
105 // itself from a method. | 104 // itself from a method. |
106 interface Port { | 105 interface Port { |
107 PostMessage@0(string message_text@0, Port port@1); | 106 PostMessage@0(string message_text@0, Port port@1); |
108 }; | 107 }; |
109 | 108 |
110 } | 109 } |
OLD | NEW |