Home | History | Annotate | Download | only in base
      1 // Copyright 2018 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 module mojo_base.mojom;
      6 
      7 // Wraps a shared memory handle with additional type information to convey that
      8 // the handle is only mappable to read-only memory.
      9 struct ReadOnlySharedMemoryRegion {
     10   handle<shared_buffer> buffer;
     11 };
     12 
     13 // Wraps a shared memory handle with additional type information to convey that
     14 // the handle is mappable to writable memory but can also be converted to
     15 // a ReadOnlySharedMemoryRegion for sharing with other clients.
     16 struct WritableSharedMemoryRegion {
     17   handle<shared_buffer> buffer;
     18 };
     19 
     20 // Wraps a shared memory handle with additional type information to convey that
     21 // the handle is always mappable to writable memory by any client which obtains
     22 // a handle duplicated from this one.
     23 struct UnsafeSharedMemoryRegion {
     24   handle<shared_buffer> buffer;
     25 };
     26