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

Unified Diff: device/generic_sensor/platform_sensor.h

Issue 2306333002: [sensors] Add Generic Sensor platform unit tests. (Closed)
Patch Set: Generic Sensor Unittest Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: device/generic_sensor/platform_sensor.h
diff --git a/device/generic_sensor/platform_sensor.h b/device/generic_sensor/platform_sensor.h
index 2019d343af4eb9410b82e75a36c84029f356725c..a12bb394ddbca51a239b3fd41d90d3cc30ee6728 100644
--- a/device/generic_sensor/platform_sensor.h
+++ b/device/generic_sensor/platform_sensor.h
@@ -57,7 +57,10 @@ class PlatformSensor : public base::RefCountedThreadSafe<PlatformSensor> {
using ConfigMap = std::map<Client*, std::list<PlatformSensorConfiguration>>;
- virtual bool UpdateSensorInternal(const ConfigMap& configurations) = 0;
+ virtual bool UpdateSensorInternal(const ConfigMap& configurations);
+ virtual bool StartSensor(
+ const PlatformSensorConfiguration& configuration) = 0;
+ virtual void StopSensor() = 0;
virtual bool CheckSensorConfiguration(
const PlatformSensorConfiguration& configuration) = 0;
@@ -68,6 +71,7 @@ class PlatformSensor : public base::RefCountedThreadSafe<PlatformSensor> {
private:
friend class base::RefCountedThreadSafe<PlatformSensor>;
+ friend class MockPlatformSensor;
shalamov 2016/09/07 09:53:01 Is this needed?
maksims (do not use this acc) 2016/09/09 10:39:06 Otherwise I cannot get config_map_. It's private.
mojom::SensorType type_;
base::ObserverList<Client, true> clients_;

Powered by Google App Engine
This is Rietveld 408576698