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 |
(...skipping 15 matching lines...) Expand all Loading... |
26 | 26 |
27 [RequiredFields=7] | 27 [RequiredFields=7] |
28 struct Foo { | 28 struct Foo { |
29 const string kFooby = "Fooby"; | 29 const string kFooby = "Fooby"; |
30 string name@8 = kFooby; | 30 string name@8 = kFooby; |
31 int32 x@0; | 31 int32 x@0; |
32 int32 y@1; | 32 int32 y@1; |
33 bool a@2 = true; | 33 bool a@2 = true; |
34 bool b@3; | 34 bool b@3; |
35 bool c@4; | 35 bool c@4; |
36 Bar bar@5; | 36 Bar? bar@5; |
37 Bar[] extra_bars@7; | 37 Bar[]? extra_bars@7; |
38 uint8[] data@6; | 38 uint8[]? data@6; |
39 handle<message_pipe> source@9; | 39 handle<message_pipe>? source@9; |
40 handle<data_pipe_consumer>[] input_streams@10; | 40 handle<data_pipe_consumer>[]? input_streams@10; |
41 handle<data_pipe_producer>[] output_streams@11; | 41 handle<data_pipe_producer>[]? output_streams@11; |
42 bool[][] array_of_array_of_bools@12; | 42 bool[][]? array_of_array_of_bools@12; |
43 string[][][] multi_array_of_strings@13; | 43 string[][][]? multi_array_of_strings@13; |
44 bool[] array_of_bools@14; | 44 bool[]? array_of_bools@14; |
45 }; | 45 }; |
46 | 46 |
47 struct DefaultsTest { | 47 struct DefaultsTest { |
48 int8 a0@0 = -12; | 48 int8 a0@0 = -12; |
49 uint8 a1@1 = sample.kTwelve; | 49 uint8 a1@1 = sample.kTwelve; |
50 int16 a2@2 = 1234; | 50 int16 a2@2 = 1234; |
51 uint16 a3@3 = 34567; | 51 uint16 a3@3 = 34567; |
52 int32 a4@4 = 123456; | 52 int32 a4@4 = 123456; |
53 uint32 a5@5 = 3456789012; | 53 uint32 a5@5 = 3456789012; |
54 int64 a6@6 = -111111111111; | 54 int64 a6@6 = -111111111111; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 int32 v3 = 3; | 89 int32 v3 = 3; |
90 }; | 90 }; |
91 | 91 |
92 [Client=ServiceClient] | 92 [Client=ServiceClient] |
93 interface Service { | 93 interface Service { |
94 enum BazOptions { | 94 enum BazOptions { |
95 REGULAR = 0, | 95 REGULAR = 0, |
96 EXTRA | 96 EXTRA |
97 }; | 97 }; |
98 const uint8 kFavoriteBaz = 1; | 98 const uint8 kFavoriteBaz = 1; |
99 Frobinate@0(Foo foo@0, BazOptions baz@1, Port port@2); | 99 Frobinate@0(Foo? foo@0, BazOptions baz@1, Port? port@2); |
100 GetPort@1(Port& port @0); | 100 GetPort@1(Port& port @0); |
101 }; | 101 }; |
102 | 102 |
103 interface ServiceClient { | 103 interface ServiceClient { |
104 DidFrobinate@0(int32 result@0); | 104 DidFrobinate@0(int32 result@0); |
105 }; | 105 }; |
106 | 106 |
107 // This interface is referenced above where it is defined. It also refers to | 107 // This interface is referenced above where it is defined. It also refers to |
108 // itself from a method. | 108 // itself from a method. |
109 interface Port { | 109 interface Port { |
110 PostMessage@0(string message_text@0, Port port@1); | 110 PostMessage@0(string message_text@0, Port port@1); |
111 }; | 111 }; |
112 | 112 |
113 } | 113 } |
OLD | NEW |