Move Mojo internals to new base shared memory API

Replaces the internal ref-counted PlatformSharedBuffer type with
base::subtle::PlatformSharedMemoryRegion throughout the EDK.

Takes egregious liberties abusing the new base shared memory API's
serialization and deserialization support interfaces to support Mojo API
behavior within the boundaries of the base API's constraints.

This *should* just work, though there is some risk of one or more Mojo
shared buffer consumers engaging in the following no-longer-supported
sequence of operations:

  1. Allocating a shared buffer
  2. Duplicating it non-read-only at least once
  3. Duplicating it read-only

Step 3 will always fail now.


This is a precursor to adding a creation flag to the Mojo API to support
distinction between "safe" writable-by-one-owner buffers and "unsafe"
writable-by-anyone buffers and deprecating the READ_ONLY duplication
flag in favor of this more explicit choice.

Bug: 826213
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I0ef125fdb7f512c045463dd54c7a43f3a19c60a3
Reviewed-on: https://chromium-review.googlesource.com/987318
Reviewed-by: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552818}

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