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..d7259a76b6a3589621d0d2c6e4769ec034fd405b 100755 |
| --- a/mojo/dart/embedder/tools/dart_list_generated_bindings.py |
| +++ b/mojo/dart/embedder/tools/dart_list_generated_bindings.py |
| @@ -21,9 +21,14 @@ def main(args): |
| metavar='relative_directory_root', |
| help='Path to directory which all outputted paths will' |
| 'be relative to.') |
| + parser.add_argument('is_bindings_types', |
| + metavar='is_bindings_types', |
| + 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 +38,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/15 21:01:34
What would be a non-hacky solution?
It sounds lik
alexfandrianto
2016/01/20 00:08:29
The weird thing about the files in //mojo/public/i
|
| + # 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 +59,3 @@ def main(args): |
| if __name__ == '__main__': |
| sys.exit(main(sys.argv[1:])) |
| - |