| Index: device/device_sensors/device_sensors_orientation_impl.h
|
| diff --git a/device/device_sensors/device_sensors_orientation_impl.h b/device/device_sensors/device_sensors_orientation_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2f9ace25a60c692730dacc683328cda0c930545c
|
| --- /dev/null
|
| +++ b/device/device_sensors/device_sensors_orientation_impl.h
|
| @@ -0,0 +1,43 @@
|
| +// Copyright 2015 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 DEVICE_DEVICE_SENSORS_DEVICE_SENSORS_ORIENTATION_IMPL_H_
|
| +#define DEVICE_DEVICE_SENSORS_DEVICE_SENSORS_ORIENTATION_IMPL_H_
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/macros.h"
|
| +#include "base/single_thread_task_runner.h"
|
| +#include "device/device_sensors/device_sensors.mojom.h"
|
| +#include "device/device_sensors/device_sensors_export.h"
|
| +#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
|
| +
|
| +namespace device {
|
| +
|
| +class DeviceSensorsOrientationImpl : public DeviceSensorsOrientation {
|
| + public:
|
| + DEVICE_SENSORS_EXPORT static void Create(
|
| + scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
| + mojo::InterfaceRequest<DeviceSensorsOrientation> request);
|
| +
|
| + private:
|
| + explicit DeviceSensorsOrientationImpl(
|
| + mojo::InterfaceRequest<DeviceSensorsOrientation> request);
|
| + ~DeviceSensorsOrientationImpl() override;
|
| +
|
| + static void CreateOnTaskRunnerThread(
|
| + mojo::InterfaceRequest<DeviceSensorsOrientation> request);
|
| +
|
| + // DeviceSensorsOrientation methods:
|
| + void StartPolling(int32 peer_process_id,
|
| + const StartPollingCallback& callback) override;
|
| +
|
| + mojo::StrongBinding<DeviceSensorsOrientation> binding_;
|
| + bool is_started_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DeviceSensorsOrientationImpl);
|
| +};
|
| +
|
| +} // namespace device
|
| +
|
| +#endif // DEVICE_DEVICE_SENSORS_DEVICE_SENSORS_ORIENTATION_IMPL_H_
|
|
|