 Chromium Code Reviews
 Chromium Code Reviews Issue 2927263002:
  Add |notify_client_on_reading_change| flag to sensor configuration  (Closed)
    
  
    Issue 2927263002:
  Add |notify_client_on_reading_change| flag to sensor configuration  (Closed) 
  | 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 |