Chromium Code Reviews| Index: mojo/dart/embedder/tools/dart_list_generated_bindings.py |
| diff --git a/mojo/dart/embedder/tools/dart_list_generated_bindings.py b/mojo/dart/embedder/tools/dart_list_generated_bindings.py |
| index a630ad15ec3ddd5d1c9e7774877a6c823f5ac841..6c3f7258cbc5f159fdad9c81732125e8a12f0991 100755 |
| --- a/mojo/dart/embedder/tools/dart_list_generated_bindings.py |
| +++ b/mojo/dart/embedder/tools/dart_list_generated_bindings.py |
| @@ -21,9 +21,15 @@ def main(args): |
| metavar='relative_directory_root', |
| help='Path to directory which all outputted paths will' |
| 'be relative to.') |
| + parser.add_argument('--bindings-types', |
| + dest='is_bindings_types', |
| + action="store_true", |
| + help='Whether or not the source directory is generating' |
| + 'for mojo.bindings.types or not.') |
| args = parser.parse_args() |
| # Directory to start searching for .mojom files. |
| source_directory = args.source_directory |
| + |
| # Prefix to chop off output. |
| root_prefix = os.path.abspath(args.relative_directory_root) |
| for dirname, _, filenames in os.walk(source_directory): |
| @@ -33,6 +39,19 @@ def main(args): |
| # Ignore tests. |
| if dirname.endswith('tests'): |
| continue; |
| + |
| + # A hacky solution that splits the interface_control_messages.mojom file |
|
zra
2016/01/27 18:15:11
@johnmccutchan Please review the changes to this s
|
| + # away from the other *.mojom files in the bindings directory. These |
| + # other mojom files have a different module, so they belong in a different |
| + # location. |
| + if dirname.endswith('bindings'): |
| + if args.is_bindings_types: |
| + if f.endswith('interface_control_messages.mojom'): |
| + continue |
| + else: |
| + if not f.endswith('interface_control_messages.mojom'): |
| + continue |
| + |
| path = os.path.abspath(os.path.join(dirname, f)) |
| path = os.path.relpath(path, root_prefix) |
| # Append .dart. |
| @@ -41,4 +60,3 @@ def main(args): |
| if __name__ == '__main__': |
| sys.exit(main(sys.argv[1:])) |
| - |