Chromium Code Reviews| 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 "mojo/public/interfaces/bindings/tests/rect.mojom" | 5 import "mojo/public/interfaces/bindings/tests/rect.mojom" |
| 6 | 6 |
| 7 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] | 7 [JavaPackage="org.chromium.mojo.bindings.test.mojom.test_structs"] |
| 8 module mojo.test { | 8 module mojo.test { |
| 9 | 9 |
| 10 struct NamedRegion { | 10 struct NamedRegion { |
| 11 string? name; | 11 string? name; |
| 12 Rect[]? rects; | 12 Rect[]? rects; |
| 13 }; | 13 }; |
| 14 | 14 |
| 15 struct RectPair { | 15 struct RectPair { |
| 16 Rect? first; | 16 Rect? first; |
| 17 Rect? second; | 17 Rect? second; |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 struct EmptyStruct { | 20 struct EmptyStruct { |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 struct DefaultFieldValues { | |
| 24 bool f0; | |
| 25 int8 f1; | |
| 26 uint8 f2; | |
| 27 int16 f3; | |
|
yzshen1
2014/09/24 22:49:25
uint16 :)
hansmuller
2014/09/24 23:33:11
Done.
| |
| 28 int32 f4; | |
| 29 uint32 f5; | |
| 30 int64 f6; | |
| 31 uint64 f7; | |
| 32 float f8; | |
| 33 double f9; | |
| 34 string f10; | |
| 35 string? f11; | |
| 36 handle<message_pipe> f12; | |
| 37 handle<data_pipe_consumer> f13; | |
| 38 handle<data_pipe_producer> f14; | |
| 39 handle<message_pipe>? f15; | |
| 40 handle<data_pipe_consumer>? f16; | |
| 41 handle<data_pipe_producer>? f17; | |
|
yzshen1
2014/09/24 22:49:25
(optional; if you want to)
handle, handle?, handl
hansmuller
2014/09/24 23:33:11
I'd wanted to include all of the types, so yes. Th
| |
| 42 string[] f18; | |
| 43 string?[] f19; | |
| 44 string[]? f20; | |
| 45 string?[]? f21; | |
| 46 EmptyStruct f22; | |
| 47 EmptyStruct? f23; | |
| 48 }; | |
| 49 | |
| 50 struct ExplicitFieldValues { | |
| 51 const string kFoo = "foo"; | |
| 52 bool f0 = true; | |
| 53 int8 f1 = 100; | |
| 54 uint8 f2 = 100; | |
| 55 int16 f3 = 100; | |
|
yzshen1
2014/09/24 22:49:25
uint16 :)
hansmuller
2014/09/24 23:33:11
Done.
| |
| 56 int32 f4 = 100; | |
| 57 uint32 f5 = 100; | |
| 58 int64 f6 = 100; | |
| 59 uint64 f7 = 100; | |
| 60 float f8 = 100; | |
| 61 float f9 = 100.0; | |
| 62 double f10 = 100; | |
| 63 double f11 = 100.0; | |
| 64 string f12 = kFoo; | |
| 65 string? f13 = kFoo; | |
| 66 Rect f14 = default; | |
| 67 Rect? f15 = default; | |
| 68 }; | |
| 69 | |
| 23 } | 70 } |
| OLD | NEW |