| Index: content/browser/device_orientation/device_motion_provider.h
|
| diff --git a/content/browser/device_orientation/device_motion_provider.h b/content/browser/device_orientation/device_motion_provider.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3371ed4a060b64bd72390576b47517d0d22bddb9
|
| --- /dev/null
|
| +++ b/content/browser/device_orientation/device_motion_provider.h
|
| @@ -0,0 +1,44 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_MOTION_PROVIDER_H_
|
| +#define CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_MOTION_PROVIDER_H_
|
| +
|
| +#include "base/shared_memory.h"
|
| +#include "content/common/content_export.h"
|
| +
|
| +namespace content {
|
| +
|
| +class DeviceMotionHardwareBuffer;
|
| +
|
| +// TODO(timvolodine) Implement this class properly.
|
| +
|
| +class CONTENT_EXPORT DeviceMotionProvider {
|
| + public:
|
| + DeviceMotionProvider();
|
| + virtual ~DeviceMotionProvider();
|
| +
|
| + // Returns the shared memory handle of the device motion data duplicated
|
| + // into the given process.
|
| + base::SharedMemoryHandle GetSharedMemoryHandleForProcess(
|
| + base::ProcessHandle renderer_process);
|
| +
|
| + // Pause and resume the background polling thread. Can be called from any
|
| + // thread.
|
| + void StartFetchingDeviceMotionData();
|
| + void StopFetchingDeviceMotionData();
|
| +
|
| + private:
|
| + static DeviceMotionProvider* instance_;
|
| +
|
| + base::SharedMemory device_motion_shared_memory_;
|
| +
|
| + DeviceMotionHardwareBuffer* SharedMemoryAsHardwareBuffer();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DeviceMotionProvider);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_DEVICE_ORIENTATION_DEVICE_MOTION_PROVIDER_H_
|
|
|