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

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

Issue 2812223006: Replace device_sensor browsertest by service unittest. (Closed)
Patch Set: eliminate "unreachable code" warning. Created 3 years, 8 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_EVENT_PUMP_H_ 5 #ifndef CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_EVENT_PUMP_H_
6 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_EVENT_PUMP_H_ 6 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_EVENT_PUMP_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "content/renderer/device_sensors/device_sensor_event_pump.h" 11 #include "content/renderer/device_sensors/device_sensor_event_pump.h"
12 #include "content/renderer/shared_memory_seqlock_reader.h"
13 #include "device/sensors/public/cpp/orientation_data.h" 12 #include "device/sensors/public/cpp/orientation_data.h"
13 #include "device/sensors/public/cpp/shared_memory_seqlock_reader.h"
14 #include "device/sensors/public/interfaces/orientation.mojom.h" 14 #include "device/sensors/public/interfaces/orientation.mojom.h"
15 15
16 namespace blink { 16 namespace blink {
17 class WebDeviceOrientationListener; 17 class WebDeviceOrientationListener;
18 } 18 }
19 19
20 namespace content { 20 namespace content {
21 21
22 typedef SharedMemorySeqLockReader<device::OrientationData> 22 typedef device::SharedMemorySeqLockReader<device::OrientationData>
23 DeviceOrientationSharedMemoryReader; 23 DeviceOrientationSharedMemoryReader;
24 24
25 class CONTENT_EXPORT DeviceOrientationEventPumpBase 25 class CONTENT_EXPORT DeviceOrientationEventPumpBase
26 : public DeviceSensorEventPump<blink::WebDeviceOrientationListener> { 26 : public DeviceSensorEventPump<blink::WebDeviceOrientationListener> {
27 public: 27 public:
28 // Angle threshold beyond which two orientation events are considered 28 // Angle threshold beyond which two orientation events are considered
29 // sufficiently different. 29 // sufficiently different.
30 static const double kOrientationThreshold; 30 static const double kOrientationThreshold;
31 31
32 explicit DeviceOrientationEventPumpBase(RenderThread* thread); 32 explicit DeviceOrientationEventPumpBase(RenderThread* thread);
(...skipping 18 matching lines...) Expand all
51 DeviceSensorMojoClientMixin<DeviceOrientationEventPumpBase, 51 DeviceSensorMojoClientMixin<DeviceOrientationEventPumpBase,
52 device::mojom::OrientationSensor>; 52 device::mojom::OrientationSensor>;
53 53
54 using DeviceOrientationAbsoluteEventPump = 54 using DeviceOrientationAbsoluteEventPump =
55 DeviceSensorMojoClientMixin<DeviceOrientationEventPumpBase, 55 DeviceSensorMojoClientMixin<DeviceOrientationEventPumpBase,
56 device::mojom::OrientationAbsoluteSensor>; 56 device::mojom::OrientationAbsoluteSensor>;
57 57
58 } // namespace content 58 } // namespace content
59 59
60 #endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_EVENT_PUMP_H_ 60 #endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_ORIENTATION_EVENT_PUMP_H_
OLDNEW
« no previous file with comments | « content/renderer/device_sensors/device_motion_event_pump.h ('k') | content/renderer/shared_memory_seqlock_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698