diff options
author | yzshen <yzshen@chromium.org> | 2016-03-15 07:26:22 +0900 |
---|---|---|
committer | Qijiang Fan <fqj@google.com> | 2020-06-05 02:44:02 +0900 |
commit | 6f546f5b30ebc96984b86fe48012997649ed8281 (patch) | |
tree | 6f1cc5bb8ede63f93104e163faff1bef1ccda344 /mojo/public/tools/bindings/pylib/mojom/generate/generator.py | |
parent | 499a0ffa847ed097689b8776b17a8e443b7f4bf9 (diff) | |
download | libchrome-6f546f5b30ebc96984b86fe48012997649ed8281.tar.gz |
Mojo C++ bindings: support mapping mojo string to WTF::String.
The generator now supports a "--for_blink" flag. When it is specified, the generator will map mojo string to WTF::String.
BUG=583738
Review URL: https://codereview.chromium.org/1751563002
Cr-Commit-Position: refs/heads/master@{#381091}
CrOS-Libchrome-Original-Commit: 791f9b24ca1758ced39235bda1a4e0411801309c
Diffstat (limited to 'mojo/public/tools/bindings/pylib/mojom/generate/generator.py')
-rw-r--r-- | mojo/public/tools/bindings/pylib/mojom/generate/generator.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/generator.py b/mojo/public/tools/bindings/pylib/mojom/generate/generator.py index 0ecc615c18..a97d2eac3a 100644 --- a/mojo/public/tools/bindings/pylib/mojom/generate/generator.py +++ b/mojo/public/tools/bindings/pylib/mojom/generate/generator.py @@ -37,12 +37,13 @@ class Generator(object): # Pass |output_dir| to emit files to disk. Omit |output_dir| to echo all # files to stdout. def __init__(self, module, output_dir=None, typemap=None, variant=None, - bytecode_path=None): + bytecode_path=None, for_blink=False): self.module = module self.output_dir = output_dir self.typemap = typemap or {} self.variant = variant self.bytecode_path = bytecode_path + self.for_blink = for_blink def GetStructsFromMethods(self): result = [] |