Chromium Code Reviews| Index: third_party/WebKit/Source/platform/inspector_protocol/CodeGenerator.py |
| diff --git a/third_party/WebKit/Source/platform/inspector_protocol/CodeGenerator.py b/third_party/WebKit/Source/platform/inspector_protocol/CodeGenerator.py |
| index 97eda508091bf297c9f9a711437ee93ca3f355cd..84b426d18d98a2bea1ebe3006010110f75031b79 100644 |
| --- a/third_party/WebKit/Source/platform/inspector_protocol/CodeGenerator.py |
| +++ b/third_party/WebKit/Source/platform/inspector_protocol/CodeGenerator.py |
| @@ -52,6 +52,7 @@ def read_config(): |
| cmdline_parser.add_option("--output_base") |
| cmdline_parser.add_option("--jinja_dir") |
| cmdline_parser.add_option("--config") |
| + cmdline_parser.add_option("--imported_protocol_path") |
|
dgozman
2016/10/17 19:16:38
I don't really like this parameter being that spec
|
| arg_options, _ = cmdline_parser.parse_args() |
| jinja_dir = arg_options.jinja_dir |
| if not jinja_dir: |
| @@ -62,6 +63,7 @@ def read_config(): |
| config_file = arg_options.config |
| if not config_file: |
| raise Exception("Config file name must be specified") |
| + imported_protocol_path = arg_options.imported_protocol_path |
| config_base = os.path.dirname(config_file) |
| except Exception: |
| # Work with python 2 and 3 http://docs.python.org/py3k/howto/pyporting.html |
| @@ -89,6 +91,8 @@ def read_config(): |
| ".lib.export_macro": "", |
| ".lib.export_header": False, |
| } |
| + if imported_protocol_path: |
| + defaults[".imported.path"] = imported_protocol_path |
| return (jinja_dir, config_file, init_defaults(config_partial, "", defaults)) |
| except Exception: |
| # Work with python 2 and 3 http://docs.python.org/py3k/howto/pyporting.html |