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 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] | 5 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] |
6 module mojo.test; | 6 module mojo.test; |
7 | 7 |
8 import "mojo/public/interfaces/bindings/tests/rect.mojom"; | 8 import "mojo/public/interfaces/bindings/tests/rect.mojom"; |
9 | 9 |
10 struct NamedRegion { | 10 struct NamedRegion { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 struct ScopedConstants { | 90 struct ScopedConstants { |
91 const int32 TEN = 10; | 91 const int32 TEN = 10; |
92 const int32 ALSO_TEN = TEN; | 92 const int32 ALSO_TEN = TEN; |
93 enum EType { | 93 enum EType { |
94 E0, | 94 E0, |
95 E1, | 95 E1, |
96 E2 = 10, | 96 E2 = 10, |
97 E3 = E2, | 97 E3 = E2, |
98 E4, | 98 E4, |
99 }; | 99 }; |
100 const int32 TEN_TOO = EType.E2; | |
101 EType f0 = E0; // 0 | 100 EType f0 = E0; // 0 |
102 EType f1 = E1; // 1 | 101 EType f1 = E1; // 1 |
103 EType f2 = E2; // 10 | 102 EType f2 = E2; // 10 |
104 EType f3 = E3; // 10 | 103 EType f3 = E3; // 10 |
105 EType f4 = E4; // 11 | 104 EType f4 = E4; // 11 |
106 int32 f5 = TEN; | 105 int32 f5 = TEN; |
107 int32 f6 = ALSO_TEN; | 106 int32 f6 = ALSO_TEN; |
108 }; | 107 }; |
109 | 108 |
110 // Used to verify that all possible Map key field types can be encoded and | 109 // Used to verify that all possible Map key field types can be encoded and |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 | 367 |
369 struct ContainsOther { | 368 struct ContainsOther { |
370 int32 other; | 369 int32 other; |
371 }; | 370 }; |
372 | 371 |
373 // Used to verify that structs can contain interface requests. | 372 // Used to verify that structs can contain interface requests. |
374 | 373 |
375 struct ContainsInterfaceRequest { | 374 struct ContainsInterfaceRequest { |
376 SomeInterface& request; | 375 SomeInterface& request; |
377 }; | 376 }; |
OLD | NEW |