OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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_RENDERER_SHARED_MEMORY_SEQLOCK_READER_BASE_H_ |
| 6 #define CONTENT_RENDERER_SHARED_MEMORY_SEQLOCK_READER_BASE_H_ |
| 7 |
| 8 #include "base/shared_memory.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/common/shared_memory_seqlock_buffer.h" |
| 11 |
| 12 namespace content { |
| 13 |
| 14 class SharedMemorySeqLockReaderBase { |
| 15 protected: |
| 16 SharedMemorySeqLockReaderBase() { } |
| 17 virtual ~SharedMemorySeqLockReaderBase() { } |
| 18 |
| 19 SharedMemorySeqLockBufferBase* InitializeSharedMemory( |
| 20 base::SharedMemoryHandle shared_memory_handle, |
| 21 size_t buffer_size); |
| 22 |
| 23 bool FetchFromBuffer(void* final, void* temp, void* from, size_t size); |
| 24 |
| 25 static const int kMaximumContentionCount = 10; |
| 26 base::SharedMemoryHandle renderer_shared_memory_handle_; |
| 27 scoped_ptr<base::SharedMemory> renderer_shared_memory_; |
| 28 SharedMemorySeqLockBufferBase* base_buffer_; |
| 29 }; |
| 30 |
| 31 } // namespace content |
| 32 |
| 33 #endif // CONTENT_RENDERER_SHARED_MEMORY_SEQLOCK_READER_BASE_H_ |
OLD | NEW |