Refactor management of overview window copy lifetime into a separate class.
[chromium-blink-merge.git] / content / renderer / gamepad_shared_memory_reader.h
blob8c10b90797d7f16da7d5cf43b73bf569c0b2b483
1 // Copyright (c) 2011 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.
5 #ifndef CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_
6 #define CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/shared_memory.h"
10 #include "third_party/WebKit/public/platform/WebGamepads.h"
12 namespace content {
14 struct GamepadHardwareBuffer;
16 class GamepadSharedMemoryReader {
17 public:
18 GamepadSharedMemoryReader();
19 virtual ~GamepadSharedMemoryReader();
20 void SampleGamepads(WebKit::WebGamepads&);
22 private:
23 base::SharedMemoryHandle renderer_shared_memory_handle_;
24 scoped_ptr<base::SharedMemory> renderer_shared_memory_;
25 GamepadHardwareBuffer* gamepad_hardware_buffer_;
27 bool ever_interacted_with_;
30 } // namespace content
32 #endif // CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_