[mojo] Add typemap and variant support to generators

This introduces two new flags for the mojom bindings generator:

  --typemap can be used to provide typemap (JSON) files
    to the bindings generator.

  --variant specifies the name of the bindings variant to emit.

Both of these new flags only affect C++ generation, and specifying
--variant at all prevents JS or Java bindings from being emitted.

Both of these new flags have GN mojom template variables associated
with them as well.

Part of a series of changes to support custom mojom serialization:

  1. https://codereview.chromium.org/1515423002
  2. This CL
  3. https://codereview.chromium.org/1524693002
  4. https://codereview.chromium.org/1520153002
  5. https://codereview.chromium.org/1524613002
  6. https://codereview.chromium.org/1526533002
  7. https://codereview.chromium.org/1524703002

BUG=569669

Review URL: https://codereview.chromium.org/1517043004

Cr-Commit-Position: refs/heads/master@{#365674}


CrOS-Libchrome-Original-Commit: 103fd974609482f3179a7a2c15d2d21760524fb2
12 files changed
tree: ead8a90489b3e47f99532a48da358cfdba01acd6
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/