| // Copyright 2018 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #include "base/memory/platform_shared_memory_region.h" |
| #include "base/memory/shared_memory_mapping.h" |
| PlatformSharedMemoryRegion PlatformSharedMemoryRegion::CreateWritable( |
| return Create(Mode::kWritable, size); |
| PlatformSharedMemoryRegion PlatformSharedMemoryRegion::CreateUnsafe( |
| return Create(Mode::kUnsafe, size); |
| PlatformSharedMemoryRegion::PlatformSharedMemoryRegion() = default; |
| PlatformSharedMemoryRegion::PlatformSharedMemoryRegion( |
| PlatformSharedMemoryRegion&& other) = default; |
| PlatformSharedMemoryRegion& PlatformSharedMemoryRegion::operator=( |
| PlatformSharedMemoryRegion&& other) = default; |
| PlatformSharedMemoryRegion::~PlatformSharedMemoryRegion() = default; |
| PlatformSharedMemoryRegion::ScopedPlatformHandle |
| PlatformSharedMemoryRegion::PassPlatformHandle() { |
| return std::move(handle_); |