| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 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 #ifndef CONTENT_REF_COUNTED_SHARED_MEMORY_H_ |
| 6 #define CONTENT_REF_COUNTED_SHARED_MEMORY_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/shared_memory.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 class RefCountedSharedMemory final |
| 14 : public base::RefCounted<RefCountedSharedMemory> { |
| 15 public: |
| 16 RefCountedSharedMemory(base::SharedMemoryHandle handle, bool read_only); |
| 17 |
| 18 base::SharedMemory& memory() { return memory_; } |
| 19 const base::SharedMemory& memory() const { return memory_; } |
| 20 |
| 21 private: |
| 22 friend class base::RefCounted<RefCountedSharedMemory>; |
| 23 ~RefCountedSharedMemory(); |
| 24 |
| 25 base::SharedMemory memory_; |
| 26 |
| 27 DISALLOW_COPY_AND_ASSIGN(RefCountedSharedMemory); |
| 28 }; |
| 29 |
| 30 } // namespace content |
| 31 |
| 32 #endif // #ifndef CONTENT_REF_COUNTED_SHARED_MEMORY_H_ |
| OLD | NEW |