| Index: content/renderer/device_sensors/device_orientation_absolute_event_pump.h
|
| diff --git a/content/renderer/device_sensors/device_orientation_absolute_event_pump.h b/content/renderer/device_sensors/device_orientation_absolute_event_pump.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..43e2f5c70f854d1f4c7f308afafa56bdba4c3c4b
|
| --- /dev/null
|
| +++ b/content/renderer/device_sensors/device_orientation_absolute_event_pump.h
|
| @@ -0,0 +1,45 @@
|
| +// Copyright 2017 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_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_ABSOLUTE_EVENT_PUMP_H_
|
| +#define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_ABSOLUTE_EVENT_PUMP_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "content/renderer/device_sensors/device_sensor_event_pump.h"
|
| +#include "third_party/WebKit/public/platform/modules/device_orientation/WebDeviceOrientationData.h"
|
| +
|
| +namespace blink {
|
| +class WebDeviceOrientationListener;
|
| +}
|
| +
|
| +namespace content {
|
| +
|
| +class CONTENT_EXPORT DeviceOrientationAbsoluteEventPump
|
| + : public DeviceSensorEventPump<blink::WebDeviceOrientationListener> {
|
| + public:
|
| + explicit DeviceOrientationAbsoluteEventPump(RenderThread* thread);
|
| + ~DeviceOrientationAbsoluteEventPump() override;
|
| +
|
| + // PlatformEventObserver:
|
| + void SendStartMessage() override;
|
| + void SendFakeDataForTesting(void* fake_data) override;
|
| +
|
| + protected:
|
| + // DeviceSensorEventPump:
|
| + void FireEvent() override;
|
| +
|
| + private:
|
| + // DeviceSensorEventPump:
|
| + bool CanStart() const override;
|
| +
|
| + bool GetDataFromSharedMemory(blink::WebDeviceOrientationData* data);
|
| +
|
| + blink::WebDeviceOrientationData data_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DeviceOrientationAbsoluteEventPump);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_ABSOLUTE_EVENT_PUMP_H_
|
|
|