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

Side by Side Diff: device/generic_sensor/fake_platform_sensor.h

Issue 2865263002: Move //device/generic_sensor to be part of the internal implementation of the Device Service. (Closed)
Patch Set: code rebase 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 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_GENERIC_SENSOR_FAKE_PLATFORM_SENSOR_H_
6 #define DEVICE_GENERIC_SENSOR_FAKE_PLATFORM_SENSOR_H_
7
8 #include "device/generic_sensor/platform_sensor.h"
9
10 namespace device {
11
12 class FakePlatformSensor : public PlatformSensor {
13 public:
14 FakePlatformSensor(mojom::SensorType type,
15 mojo::ScopedSharedBufferMapping mapping,
16 PlatformSensorProvider* provider);
17
18 mojom::ReportingMode GetReportingMode() override;
19 PlatformSensorConfiguration GetDefaultConfiguration() override;
20
21 bool started() const { return started_; }
22
23 using PlatformSensor::NotifySensorReadingChanged;
24 using PlatformSensor::NotifySensorError;
25 using PlatformSensor::config_map;
26
27 protected:
28 ~FakePlatformSensor() override;
29 bool StartSensor(const PlatformSensorConfiguration& configuration) override;
30 void StopSensor() override;
31 bool CheckSensorConfiguration(
32 const PlatformSensorConfiguration& configuration) override;
33
34 private:
35 static constexpr double kMaxFrequencyValueForTests = 50.0;
36
37 PlatformSensorConfiguration config_;
38
39 bool started_;
40
41 DISALLOW_COPY_AND_ASSIGN(FakePlatformSensor);
42 };
43
44 } // namespace device
45
46 #endif // DEVICE_GENERIC_SENSOR_FAKE_PLATFORM_SENSOR_H
OLDNEW
« no previous file with comments | « device/generic_sensor/android/sensors_jni_registrar.cc ('k') | device/generic_sensor/fake_platform_sensor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698