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

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

Issue 2395853003: [Sensors] Improvements in shared buffer managing (Closed)
Patch Set: Pass task runner to PlatformSensor constructor Created 4 years, 2 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 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_FAKE_PLATFORM_SENSOR_H_ 5 #ifndef DEVICE_GENERIC_SENSOR_FAKE_PLATFORM_SENSOR_H_
6 #define DEVICE_GENERIC_SENSOR_FAKE_PLATFORM_SENSOR_H_ 6 #define DEVICE_GENERIC_SENSOR_FAKE_PLATFORM_SENSOR_H_
7 7
8 #include "device/generic_sensor/platform_sensor.h" 8 #include "device/generic_sensor/platform_sensor.h"
9 9
10 namespace device { 10 namespace device {
11 11
12 class FakePlatformSensor : public PlatformSensor { 12 class FakePlatformSensor : public PlatformSensor {
13 public: 13 public:
14 FakePlatformSensor(mojom::SensorType type, 14 FakePlatformSensor(mojom::SensorType type,
15 mojo::ScopedSharedBufferMapping mapping, 15 mojo::ScopedSharedBufferMapping mapping,
16 uint64_t buffer_size, 16 PlatformSensorProvider* provider,
17 PlatformSensorProvider* provider); 17 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
18 18
19 mojom::ReportingMode GetReportingMode() override; 19 mojom::ReportingMode GetReportingMode() override;
20 PlatformSensorConfiguration GetDefaultConfiguration() override; 20 PlatformSensorConfiguration GetDefaultConfiguration() override;
21 21
22 bool started() const { return started_; } 22 bool started() const { return started_; }
23 23
24 using PlatformSensor::NotifySensorReadingChanged; 24 using PlatformSensor::NotifySensorReadingChanged;
25 using PlatformSensor::NotifySensorError; 25 using PlatformSensor::NotifySensorError;
26 using PlatformSensor::config_map; 26 using PlatformSensor::config_map;
27 27
(...skipping 10 matching lines...) Expand all
38 PlatformSensorConfiguration config_; 38 PlatformSensorConfiguration config_;
39 39
40 bool started_; 40 bool started_;
41 41
42 DISALLOW_COPY_AND_ASSIGN(FakePlatformSensor); 42 DISALLOW_COPY_AND_ASSIGN(FakePlatformSensor);
43 }; 43 };
44 44
45 } // namespace device 45 } // namespace device
46 46
47 #endif // DEVICE_GENERIC_SENSOR_FAKE_PLATFORM_SENSOR_H 47 #endif // DEVICE_GENERIC_SENSOR_FAKE_PLATFORM_SENSOR_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698