Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: content/renderer/shared_memory_seqlock_reader_base.h

Issue 14678012: Implement the content/renderer and content/browser part of the Device Motion API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: factored out as much code as possible from the templated reader Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698