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 module sample { | 5 module sample { |
6 | 6 |
7 enum BarType { | 7 enum BarType { |
8 BAR_VERTICAL = 1 << 0, | 8 BAR_VERTICAL = 1 << 0, |
9 BAR_HORIZONTAL = (1 << 1) + 0, | 9 BAR_HORIZONTAL = (1 << 1) + 0, |
10 BAR_BOTH = BAR_VERTICAL | BAR_HORIZONTAL, | 10 BAR_BOTH = BAR_VERTICAL | BAR_HORIZONTAL, |
(...skipping 10 matching lines...) Expand all Loading... |
21 [RequiredFields=7] | 21 [RequiredFields=7] |
22 struct Foo { | 22 struct Foo { |
23 string name = "Fooby" @8; | 23 string name = "Fooby" @8; |
24 int32 x @0; | 24 int32 x @0; |
25 int32 y @1; | 25 int32 y @1; |
26 bool a = true @2; | 26 bool a = true @2; |
27 bool b @3; | 27 bool b @3; |
28 bool c @4; | 28 bool c @4; |
29 Bar bar @5; | 29 Bar bar @5; |
30 Bar[] extra_bars @7; | 30 Bar[] extra_bars @7; |
31 uint8[] data @6; | 31 uint8[] data = [1,2,3] @6; |
32 handle<message_pipe> source @9; | 32 handle<message_pipe> source @9; |
33 handle<data_pipe_consumer>[] input_streams @10; | 33 handle<data_pipe_consumer>[] input_streams @10; |
34 handle<data_pipe_producer>[] output_streams @11; | 34 handle<data_pipe_producer>[] output_streams @11; |
35 }; | 35 }; |
36 | 36 |
37 [Peer=ServiceClient] | 37 [Peer=ServiceClient] |
38 interface Service { | 38 interface Service { |
39 enum BazOptions { | 39 enum BazOptions { |
40 BAZ_REGULAR = 0, | 40 BAZ_REGULAR = 0, |
41 BAZ_EXTRA | 41 BAZ_EXTRA |
42 }; | 42 }; |
43 void Frobinate(Foo foo @0, int32 baz @1, handle<message_pipe> port @2) @0; | 43 void Frobinate(Foo foo @0, int32 baz @1, handle<message_pipe> port @2) @0; |
44 }; | 44 }; |
45 | 45 |
46 [Peer=Service] | 46 [Peer=Service] |
47 interface ServiceClient { | 47 interface ServiceClient { |
48 void DidFrobinate(int32 result @0) @0; | 48 void DidFrobinate(int32 result @0) @0; |
49 }; | 49 }; |
50 | 50 |
51 } | 51 } |
OLD | NEW |