mojo: Support sync calls through ThreadSafeInterfacePtr

Previously ThreadSafeInterfacePtr only supported async calls. Now it
also supports sync calls.

The one caveat to be aware of is that sync calls will block both the
calling thread and the thread that the underlying InterfacePtr is bound
to. That means, e.g., that the InterfacePtr can't be bound to the IO
thread. Letting the call be async on the InterfacePtr thread is left as
a TODO.

BUG=668565

Review-Url: https://codereview.chromium.org/2770153003
Cr-Commit-Position: refs/heads/master@{#461016}


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