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

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

Issue 2306333002: [sensors] Add Generic Sensor platform unit tests. (Closed)
Patch Set: mock->fake naming 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 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_PLATFORM_SENSOR_H_ 5 #ifndef DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_H_
6 #define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_H_ 6 #define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 const PlatformSensorConfiguration& configuration) = 0; 65 const PlatformSensorConfiguration& configuration) = 0;
66 66
67 void NotifySensorReadingChanged(); 67 void NotifySensorReadingChanged();
68 void NotifySensorError(); 68 void NotifySensorError();
69 69
70 mojo::ScopedSharedBufferMapping shared_buffer_mapping_; 70 mojo::ScopedSharedBufferMapping shared_buffer_mapping_;
71 71
72 private: 72 private:
73 friend class base::RefCountedThreadSafe<PlatformSensor>; 73 friend class base::RefCountedThreadSafe<PlatformSensor>;
74 74
75 // For testing purposes.
76 friend class FakePlatformSensor;
timvolodine 2016/09/21 13:07:48 if it's only to return the config map, maybe just
maksims (do not use this acc) 2016/09/26 07:09:15 Done.
77
75 mojom::SensorType type_; 78 mojom::SensorType type_;
76 base::ObserverList<Client, true> clients_; 79 base::ObserverList<Client, true> clients_;
77 ConfigMap config_map_; 80 ConfigMap config_map_;
78 PlatformSensorProvider* provider_; 81 PlatformSensorProvider* provider_;
79 base::WeakPtrFactory<PlatformSensor> weak_factory_; 82 base::WeakPtrFactory<PlatformSensor> weak_factory_;
80 DISALLOW_COPY_AND_ASSIGN(PlatformSensor); 83 DISALLOW_COPY_AND_ASSIGN(PlatformSensor);
81 }; 84 };
82 85
83 } // namespace device 86 } // namespace device
84 87
85 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_H_ 88 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698