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 module sample { | 8 module sample { |
9 | 9 |
10 struct Bar { | 10 struct Bar { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 struct DefaultsTest { | 46 struct DefaultsTest { |
47 sample.DefaultsTestInner[] people = [{32, ["Bob", "Bobby"]}] @1; | 47 sample.DefaultsTestInner[] people = [{32, ["Bob", "Bobby"]}] @1; |
48 uint8[] data = [1, 2, 3] @2; | 48 uint8[] data = [1, 2, 3] @2; |
49 imported.Point point = {7, 15} @3; | 49 imported.Point point = {7, 15} @3; |
50 int32[] shape_masks = [1 << imported.SHAPE_RECTANGLE] @4; | 50 int32[] shape_masks = [1 << imported.SHAPE_RECTANGLE] @4; |
51 imported.Thing thing = {imported.SHAPE_CIRCLE, imported.COLOR_BLACK}; | 51 imported.Thing thing = {imported.SHAPE_CIRCLE, imported.COLOR_BLACK}; |
52 Bar.Type bar_type = Bar.TYPE_BOTH; | 52 Bar.Type bar_type = Bar.TYPE_BOTH; |
53 }; | 53 }; |
54 | 54 |
55 [Peer=ServiceClient] | |
56 interface Service { | 55 interface Service { |
57 enum BazOptions { | 56 enum BazOptions { |
58 BAZ_REGULAR = 0, | 57 BAZ_REGULAR = 0, |
59 BAZ_EXTRA | 58 BAZ_EXTRA |
60 }; | 59 }; |
61 Frobinate@0(Foo foo @0, BazOptions baz @1, Port port @2); | 60 Frobinate@0(Foo foo @0, BazOptions baz @1, Port port @2); |
62 }; | 61 }; |
63 | 62 |
64 [Peer=Service] | |
65 interface ServiceClient { | |
66 DidFrobinate@0(int32 result @0); | |
67 }; | |
68 | |
69 // This interface is referenced above where it is defined. It also refers to | 63 // This interface is referenced above where it is defined. It also refers to |
70 // itself from a method. | 64 // itself from a method. |
71 interface Port { | 65 interface Port { |
72 PostMessage@0(string message_text @0, Port[] extra_ports@1); | 66 // XXX PostMessage@0(string message_text @0, Port[] extra_ports@1); |
| 67 PostMessage@0(string message_text @0, Port port@1); |
73 }; | 68 }; |
74 | 69 |
75 } | 70 } |
OLD | NEW |