OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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_SENSORS_DEVICE_ORIENTATION_ABSOLUTE_EVENT_PUMP_H
_ |
| 6 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_ABSOLUTE_EVENT_PUMP_H
_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "content/renderer/device_sensors/device_sensor_event_pump.h" |
| 10 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic
eOrientationData.h" |
| 11 |
| 12 namespace blink { |
| 13 class WebDeviceOrientationListener; |
| 14 } |
| 15 |
| 16 namespace content { |
| 17 |
| 18 class CONTENT_EXPORT DeviceOrientationAbsoluteEventPump |
| 19 : public DeviceSensorEventPump<blink::WebDeviceOrientationListener> { |
| 20 public: |
| 21 explicit DeviceOrientationAbsoluteEventPump(RenderThread* thread); |
| 22 ~DeviceOrientationAbsoluteEventPump() override; |
| 23 |
| 24 // PlatformEventObserver: |
| 25 void SendStartMessage() override; |
| 26 void SendFakeDataForTesting(void* fake_data) override; |
| 27 |
| 28 protected: |
| 29 // DeviceSensorEventPump: |
| 30 void FireEvent() override; |
| 31 |
| 32 private: |
| 33 // DeviceSensorEventPump: |
| 34 bool CanStart() const override; |
| 35 |
| 36 bool GetDataFromSharedMemory(blink::WebDeviceOrientationData* data); |
| 37 |
| 38 blink::WebDeviceOrientationData data_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(DeviceOrientationAbsoluteEventPump); |
| 41 }; |
| 42 |
| 43 } // namespace content |
| 44 |
| 45 #endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_ABSOLUTE_EVENT_PUM
P_H_ |
OLD | NEW |