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

Side by Side Diff: device/sensors/sensor_type_converters.h

Issue 2078433002: [sensors] Introduce Generic Sensor API interfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes for review comments. Created 4 years, 5 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 2016 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 DEVICE_SENSORS_SENSOR_TYPE_CONVERTERS_H_
6 #define DEVICE_SENSORS_SENSOR_TYPE_CONVERTERS_H_
7
8 #include "device/sensors/public/interfaces/sensor.mojom.h"
9 #include "mojo/public/cpp/bindings/type_converter.h"
10
11 namespace device {
12 class PlatformSensorConfiguration;
13 enum class SensorType : int32_t;
14 enum class ReportingMode : int32_t;
15 }
16
17 namespace mojo {
18
19 template <>
20 struct TypeConverter<device::PlatformSensorConfiguration,
21 device::mojom::SensorConfigurationPtr> {
22 static device::PlatformSensorConfiguration Convert(
23 const device::mojom::SensorConfigurationPtr& sensor_configuration);
24 };
25
26 template <>
27 struct TypeConverter<device::SensorType, device::mojom::SensorType> {
28 static device::SensorType Convert(device::mojom::SensorType sensor_type);
29 };
30
31 template <>
32 struct TypeConverter<device::mojom::ReportingMode, device::ReportingMode> {
33 static device::mojom::ReportingMode Convert(
34 device::ReportingMode reporting_mode);
35 };
36
37 } // namespace mojo
38
39 #endif // DEVICE_SENSORS_SENSOR_TYPE_CONVERTERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698