// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef BASE_MEMORY_WRITABLE_SHARED_MEMORY_REGION_H_ #define BASE_MEMORY_WRITABLE_SHARED_MEMORY_REGION_H_ #include "base/base_export.h" #include "base/check.h" #include "base/memory/platform_shared_memory_region.h" #include "base/memory/read_only_shared_memory_region.h" #include "base/memory/shared_memory_mapping.h" #include "base/memory/unsafe_shared_memory_region.h" #include "build/build_config.h" #include <stdint.h> namespace base { // Scoped move-only handle to a region of platform shared memory. The instance // owns the platform handle it wraps. Mappings created by this region are // writable. These mappings remain valid even after the region handle is moved // or destroyed. // // This region can be locked to read-only access by converting it to a // ReadOnlySharedMemoryRegion. However, unlike ReadOnlySharedMemoryRegion and // UnsafeSharedMemoryRegion, ownership of this region (while writable) is unique // and may only be transferred, not duplicated. // // Unlike ReadOnlySharedMemoryRegion and UnsafeSharedMemoryRegion, // WritableSharedMemoryRegion doesn't provide GetPlatformHandle() method to // ensure that the region is never duplicated while writable. class BASE_EXPORT WritableSharedMemoryRegion { … }; } // namespace base #endif // BASE_MEMORY_WRITABLE_SHARED_MEMORY_REGION_H_