| Index: mojo/public/tools/bindings/mojom_bindings_generator.py
|
| diff --git a/mojo/public/tools/bindings/mojom_bindings_generator.py b/mojo/public/tools/bindings/mojom_bindings_generator.py
|
| index c8ffc6e168cbc9780dd6cbb81f2a82227fe556c6..a7f62337695dcdc07d93d482efed2ec8171a452f 100755
|
| --- a/mojo/public/tools/bindings/mojom_bindings_generator.py
|
| +++ b/mojo/public/tools/bindings/mojom_bindings_generator.py
|
| @@ -204,7 +204,7 @@ class MojomProcessor(object):
|
| variant=args.variant, bytecode_path=args.bytecode_path,
|
| for_blink=args.for_blink,
|
| use_once_callback=args.use_once_callback,
|
| - use_new_js_bindings=args.use_new_js_bindings,
|
| + js_bindings_mode=args.js_bindings_mode,
|
| export_attribute=args.export_attribute,
|
| export_header=args.export_header,
|
| generate_non_variant_code=args.generate_non_variant_code)
|
| @@ -336,9 +336,12 @@ def main():
|
| "--use_once_callback", action="store_true",
|
| help="Use base::OnceCallback instead of base::RepeatingCallback.")
|
| generate_parser.add_argument(
|
| - "--use_new_js_bindings", action="store_true",
|
| - help="Use the new module loading approach and the core API exposed by "
|
| - "Web IDL. This option only affects the JavaScript bindings.")
|
| + "--js_bindings_mode", choices=["new", "both", "old"], default="new",
|
| + help="This option only affects the JavaScript bindings. The value could "
|
| + "be: \"new\" - generate only the new-style JS bindings, which use the "
|
| + "new module loading approach and the core api exposed by Web IDL; "
|
| + "\"both\" - generate both the old- and new-style bindings; \"old\" - "
|
| + "generate only the old-style bindings.")
|
| generate_parser.add_argument(
|
| "--export_attribute", default="",
|
| help="Optional attribute to specify on class declaration to export it "
|
|
|