Chromium Code Reviews| Index: test/protos/dart_options.proto |
| diff --git a/test/protos/dart_options.proto b/test/protos/dart_options.proto |
| index 7a16d818606f5a865c456b856ee29380b84ec3e5..7de2170eb7133a287e5872e6e3e0f8c7ce701e22 100644 |
| --- a/test/protos/dart_options.proto |
| +++ b/test/protos/dart_options.proto |
| @@ -10,8 +10,38 @@ package dart_options; |
| import "descriptor_2_5_opensource.proto"; |
| +// A mixin to be applied in the 'with' clause of a generated proto in dart. |
| +message DartMixin { |
| + // Class name of the mixin class. |
| + optional string name = 1; |
| + |
| + // File from which the mixin class is imported. |
| + // The generated Dart code will use this in an import statement. |
| + optional string import_from = 2; |
| + |
| + // Used to apply multiple mixins to a proto. |
| + // The mixin listed in parent will always be applied before this one, |
| + // making the generated proto implement both mixins. |
| + optional string parent = 3; |
| +} |
| + |
| +// Defines mixins imported from dart files to be used on messages in this file. |
| +message ImportedMixins { |
|
skybrian
2016/06/27 23:33:37
On second thought, maybe just "Imports". This will
|
| + |
| + // The DartMixins to be imported. |
| + repeated DartMixin mixins = 1; |
| +} |
| + |
| extend google.protobuf.FileOptions { |
| + // Defines the named mixins to be used on messages in this file. |
| + // These mixins are in addition to internally defined mixins (e.g PbMapMixin) |
| + // and may override them. |
| + // Warning: there is no checking at compile time for name conflicts between |
| + // identifiers defined in the mixin and proto-generated identifiers. |
| + // Running dartanalyzer on the generated file might find some of them. |
| + optional ImportedMixins imported_mixins = 28125061; |
|
skybrian
2016/06/27 23:33:37
rename to "imports". Most of the comment can be mo
|
| + |
| // Applies the named mixin to all messages in this file. |
| // (May be overridden by the "mixin" option on a message.) |
| // For now, "PbMapMixin" is the only available mixin. |