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

Side by Side Diff: content/renderer/device_orientation/device_motion_shared_memory_reader.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: implemented async messaging for obtaining the shared memory handle 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_DEVICE_MOTION_SHARED_MEMORY_READER_H_
6 #define CONTENT_RENDERER_DEVICE_MOTION_SHARED_MEMORY_READER_H_
7
8 #include "base/shared_memory.h"
9 #include "base/memory/scoped_ptr.h"
10
11 namespace WebKit {
12 class WebDeviceMotionData;
13 }
14
15 namespace content {
16
17 struct DeviceMotionHardwareBuffer;
18
19 class DeviceMotionSharedMemoryReader {
20 public:
21 DeviceMotionSharedMemoryReader();
22 virtual ~DeviceMotionSharedMemoryReader() { }
23
24 virtual bool GetLatestDeviceMotionData(WebKit::WebDeviceMotionData& data);
darin (slow to review) 2013/06/17 05:27:46 nit: google c++ style disallows non-const referenc
timvolodine 2013/06/17 20:10:55 Done.
25 virtual bool Initialize(base::SharedMemoryHandle shared_memory_handle);
26
27 private:
28 base::SharedMemoryHandle renderer_shared_memory_handle_;
29 scoped_ptr<base::SharedMemory> renderer_shared_memory_;
30 DeviceMotionHardwareBuffer* device_motion_hardware_buffer_;
31 };
32
33 } // namespace content
34
35 #endif // CONTENT_RENDERER_DEVICE_MOTION_SHARED_MEMORY_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698