Mojo: use OS whitelists to specify OS-specific typemaps.

Per-OS typemaps are specified by listing them separately, requiring
non-trivial busywork to add an OS-specific typemap, especially for the
first typemap restricted to a particular OS.

Add a new typemap field os_whitelist. If specified in a typemap,
only apply that typemap when targeting an OS included in the whitelist.
For example,

os_whitelist = [ "android", "win" ]

would enable the typemap only if is_android or is_win is true.

Change-Id: I54c32cb131e67b083a4245d171c6d927f6d9df24
Tbr: jam@chromium.org, dcheng@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/784371
Commit-Queue: Sam McNally <sammc@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518859}

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