Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: content/renderer/device_sensors/device_orientation_absolute_event_pump.h

Issue 2885203004: Refactor content/renderer/device_sensors to use device/generic_sensor instead of device/sensors (Closed)
Patch Set: updated content/renderer/BUILD.gn Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698