[reland] Support generation of component targets for Mojom C++ bindings

NOTE: Reland of https://chromium-review.googlesource.com/c/497830/,
with component dependency fixed. Variant components needed to depend
on the shared component. This also means struct *_Data classes need
to be exported, which in turn required moving all their method
definitions out-of-line.

This allows developers to force the mojom GN template to emit a
component target for C++ bindings rather than a source_set and updates
some existing uses of the export_class_attribute etc parameters to use
explicit component generation instead.

This is a step towards using mojom component targets by default, but
that is currently impossible without additional GN support.

BUG=718098
TBR=jam@chromium.org
TBR=yzshen@chromium.org

Change-Id: I715c7a66fb40bab3d45474af81aaecd124cb9f71
Reviewed-on: https://chromium-review.googlesource.com/502087
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#471238}

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