OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 DEVICE_GENERIC_SENSOR_SENSOR_IMPL_H_ | 5 #ifndef SERVICES_DEVICE_GENERIC_SENSOR_SENSOR_IMPL_H_ |
6 #define DEVICE_GENERIC_SENSOR_SENSOR_IMPL_H_ | 6 #define SERVICES_DEVICE_GENERIC_SENSOR_SENSOR_IMPL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "device/generic_sensor/platform_sensor.h" | 9 #include "services/device/generic_sensor/platform_sensor.h" |
10 #include "device/generic_sensor/public/interfaces/sensor.mojom.h" | 10 #include "services/device/public/interfaces/sensor.mojom.h" |
11 | 11 |
12 namespace device { | 12 namespace device { |
13 | 13 |
14 // Implementation of Sensor mojo interface. | 14 // Implementation of Sensor mojo interface. |
15 // Instances of this class are created by SensorProviderImpl. | 15 // Instances of this class are created by SensorProviderImpl. |
16 class SensorImpl final : public mojom::Sensor, public PlatformSensor::Client { | 16 class SensorImpl final : public mojom::Sensor, public PlatformSensor::Client { |
17 public: | 17 public: |
18 explicit SensorImpl(scoped_refptr<PlatformSensor> sensor); | 18 explicit SensorImpl(scoped_refptr<PlatformSensor> sensor); |
19 ~SensorImpl() override; | 19 ~SensorImpl() override; |
20 | 20 |
(...skipping 19 matching lines...) Expand all Loading... |
40 private: | 40 private: |
41 scoped_refptr<PlatformSensor> sensor_; | 41 scoped_refptr<PlatformSensor> sensor_; |
42 mojom::SensorClientPtr client_; | 42 mojom::SensorClientPtr client_; |
43 bool suspended_; | 43 bool suspended_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(SensorImpl); | 45 DISALLOW_COPY_AND_ASSIGN(SensorImpl); |
46 }; | 46 }; |
47 | 47 |
48 } // namespace device | 48 } // namespace device |
49 | 49 |
50 #endif // DEVICE_GENERIC_SENSOR_SENSOR_IMPL_H_ | 50 #endif // SERVICES_DEVICE_GENERIC_SENSOR_SENSOR_IMPL_H_ |
OLD | NEW |