OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 | 6 |
7 module imported { | 7 module imported { |
8 | 8 |
9 // This sample adds more types and constants to the "imported" namespace, | 9 // This sample adds more types and constants to the "imported" namespace, |
10 // to test a bug with importing multiple modules with the same namespace. | 10 // to test a bug with importing multiple modules with the same namespace. |
11 | 11 |
12 enum Color { | 12 enum Color { |
13 COLOR_RED, | 13 COLOR_RED, |
14 COLOR_BLACK, | 14 COLOR_BLACK, |
15 }; | 15 }; |
16 | 16 |
17 struct Size { | 17 struct Size { |
18 int32 width; | 18 int32 width; |
19 int32 height; | 19 int32 height; |
20 }; | 20 }; |
21 | 21 |
22 struct Thing { | 22 struct Thing { |
23 imported.Shape shape = SHAPE_RECTANGLE; | 23 imported.Shape shape = SHAPE_RECTANGLE; |
24 int32 color = COLOR_BLACK; | 24 int32 color = COLOR_BLACK; |
25 Point location = {0, 0}; | 25 Point location = {0, 0}; |
26 Size size; | 26 Size size; |
27 }; | 27 }; |
28 | 28 |
29 } // module imported | 29 } // module imported |
OLD | NEW |