Use libappindicator to show icons in all cases

libappindicator will transparently use GtkStatusIcon if an AppIndicator
listener is not available. We will lose the left click action however,
and instead the right-click menu will be shown in all instances.

Using libappindicator in all cases not only reduces code complexity,
but also abstracts away the complexity of determining when to use
application indicators (vs legacy icons), which is a little more
complicated with newer versions of GNOME removing the legacy icon tray,
but older versions of GNOME not showing the application indicator by
default.

I also fixed an issue with detecting GNOME. The environment variable
value is often prefixed with the distro.

Bug: 799144, 797332, 419673
Change-Id: I156698f1b37ba216b4df11fa2f17dd7012c593fa
Reviewed-on: https://chromium-review.googlesource.com/911820
Reviewed-by: Elliot Glaysher <erg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Gabriel Charette <gab@chromium.org>
Commit-Queue: Tim Brown <timbrown@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538635}

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