IPC::Message Refactoring: Move POSIX specific bits to PlatformFileAttachment

This change:

 * Gets rid of MessageAttachmentSet::owning_descriptors_ by moving
   the responsibility to PlatformFileAttachment, where owning_
   member variable is used to track the lifetime
 * Replaces MessageAttachmetnSet::Add*File() and TakePlatformFile()
   with platform agnostic AddAttachment() and GetAttachmentAt()
 * Repalces Message::ReadFile(), Write*File() with ReadAttachment()
   and WriteAttachmente(), which are also platform agnostic.

This also adds MessageAttachment::TakePlatformFile() virtual function,
which will be implemented by upcoming MojoHandleAttachment as well.

This is another preparation for introducing MojoHandleAttachment,
but it also simplifies Message and MessageAttachmentSet.

R=agl@chromium.org
TBR=mtomasz@chromium.org
BUG=448190

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

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


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