| Index: content/renderer/device_sensors/device_orientation_event_pump.h
|
| diff --git a/content/renderer/device_sensors/device_orientation_event_pump.h b/content/renderer/device_sensors/device_orientation_event_pump.h
|
| index 8c3ef14935b6511270d8da5faae93c9a974e2da9..9e724c6fba2bf76d50a73d1b4fa786274009a325 100644
|
| --- a/content/renderer/device_sensors/device_orientation_event_pump.h
|
| +++ b/content/renderer/device_sensors/device_orientation_event_pump.h
|
| @@ -5,13 +5,9 @@
|
| #ifndef CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_EVENT_PUMP_H_
|
| #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_EVENT_PUMP_H_
|
|
|
| -#include <memory>
|
| -
|
| #include "base/macros.h"
|
| #include "content/renderer/device_sensors/device_sensor_event_pump.h"
|
| -#include "content/renderer/shared_memory_seqlock_reader.h"
|
| -#include "device/sensors/public/cpp/orientation_data.h"
|
| -#include "device/sensors/public/interfaces/orientation.mojom.h"
|
| +#include "third_party/WebKit/public/platform/modules/device_orientation/WebDeviceOrientationData.h"
|
|
|
| namespace blink {
|
| class WebDeviceOrientationListener;
|
| @@ -19,41 +15,30 @@ class WebDeviceOrientationListener;
|
|
|
| namespace content {
|
|
|
| -typedef SharedMemorySeqLockReader<device::OrientationData>
|
| - DeviceOrientationSharedMemoryReader;
|
| -
|
| -class CONTENT_EXPORT DeviceOrientationEventPumpBase
|
| +class CONTENT_EXPORT DeviceOrientationEventPump
|
| : public DeviceSensorEventPump<blink::WebDeviceOrientationListener> {
|
| public:
|
| - // Angle threshold beyond which two orientation events are considered
|
| - // sufficiently different.
|
| - static const double kOrientationThreshold;
|
| -
|
| - explicit DeviceOrientationEventPumpBase(RenderThread* thread);
|
| - ~DeviceOrientationEventPumpBase() override;
|
| + explicit DeviceOrientationEventPump(RenderThread* thread);
|
| + ~DeviceOrientationEventPump() override;
|
|
|
| - // PlatformEventObserver.
|
| - void SendFakeDataForTesting(void* data) override;
|
| + // PlatformEventObserver:
|
| + void SendStartMessage() override;
|
| + void SendFakeDataForTesting(void* fake_data) override;
|
|
|
| protected:
|
| + // DeviceSensorEventPump:
|
| void FireEvent() override;
|
| - bool InitializeReader(base::SharedMemoryHandle handle) override;
|
|
|
| - bool ShouldFireEvent(const device::OrientationData& data) const;
|
| + virtual bool GetDataFromSharedMemory(blink::WebDeviceOrientationData* data);
|
|
|
| - device::OrientationData data_;
|
| - std::unique_ptr<DeviceOrientationSharedMemoryReader> reader_;
|
| + private:
|
| + // DeviceSensorEventPump:
|
| + bool CanStart() const override;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(DeviceOrientationEventPumpBase);
|
| -};
|
| -
|
| -using DeviceOrientationEventPump =
|
| - DeviceSensorMojoClientMixin<DeviceOrientationEventPumpBase,
|
| - device::mojom::OrientationSensor>;
|
| + blink::WebDeviceOrientationData data_;
|
|
|
| -using DeviceOrientationAbsoluteEventPump =
|
| - DeviceSensorMojoClientMixin<DeviceOrientationEventPumpBase,
|
| - device::mojom::OrientationAbsoluteSensor>;
|
| + DISALLOW_COPY_AND_ASSIGN(DeviceOrientationEventPump);
|
| +};
|
|
|
| } // namespace content
|
|
|
|
|