Create a broker interface for the new Mojo EDK so that the browser can create and duplicate message pipes.

This is needed on Windows because sandboxed processes can't create named pipes or duplicate their handles to other processes. Since the new EDK uses one OS pipe per Mojo pipe, child processes need the parent process' help. When a message pipe is created in a child process, it will ask the browser process to do it. When a child process wants to send a mojo pipe to another process, it exchanges the pipe handle with an integer token that it sends instead. The receiving process can exchange that token with a pipe handle.

With this patch, --use-new-edk works with chrome's sandbox.

BUG=478251
R=rickyz@chromium.org, tsepez@chromium.org, yzshen@chromium.org

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

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


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