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

Unified Diff: device/generic_sensor/public/cpp/platform_sensor_configuration.h

Issue 2927263002: Add |notify_client_on_reading_change| flag to sensor configuration (Closed)
Patch Set: fix browser test Created 3 years, 6 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/public/cpp/platform_sensor_configuration.h
diff --git a/device/generic_sensor/public/cpp/platform_sensor_configuration.h b/device/generic_sensor/public/cpp/platform_sensor_configuration.h
index e124eaa1e62a1900faf4d11e301d0c5524575ef4..9d36b552043e34bad17c5d599507a4bbc558d229 100644
--- a/device/generic_sensor/public/cpp/platform_sensor_configuration.h
+++ b/device/generic_sensor/public/cpp/platform_sensor_configuration.h
@@ -26,8 +26,17 @@ class DEVICE_GENERIC_SENSOR_PUBLIC_EXPORT PlatformSensorConfiguration {
void set_frequency(double frequency);
double frequency() const { return frequency_; }
+ void set_notify_client_on_reading_change(
+ bool notify_client_on_reading_change) {
+ notify_client_on_reading_change_ = notify_client_on_reading_change;
+ }
+ bool notify_client_on_reading_change() const {
+ return notify_client_on_reading_change_;
+ }
+
private:
double frequency_ = 1.0; // 1 Hz by default.
+ bool notify_client_on_reading_change_ = true;
Reilly Grant (use Gerrit) 2017/06/09 18:03:39 Because only ON_CHANGE sensors generate notificati
juncai 2017/06/09 19:00:51 Done.
};
} // namespace device
« no previous file with comments | « no previous file | device/generic_sensor/public/cpp/sensor_struct_traits.h » ('j') | device/generic_sensor/sensor_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698