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

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

Issue 2927263002: Add |notify_client_on_reading_change| flag to sensor configuration (Closed)
Patch Set: address nit 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 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_SENSOR_IMPL_H_ 5 #ifndef DEVICE_GENERIC_SENSOR_SENSOR_IMPL_H_
6 #define DEVICE_GENERIC_SENSOR_SENSOR_IMPL_H_ 6 #define DEVICE_GENERIC_SENSOR_SENSOR_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "device/generic_sensor/platform_sensor.h" 9 #include "device/generic_sensor/platform_sensor.h"
10 #include "device/generic_sensor/public/interfaces/sensor.mojom.h" 10 #include "device/generic_sensor/public/interfaces/sensor.mojom.h"
(...skipping 22 matching lines...) Expand all
33 33
34 // device::Sensor::Client implementation. 34 // device::Sensor::Client implementation.
35 void OnSensorReadingChanged() override; 35 void OnSensorReadingChanged() override;
36 void OnSensorError() override; 36 void OnSensorError() override;
37 bool IsNotificationSuspended() override; 37 bool IsNotificationSuspended() override;
38 38
39 private: 39 private:
40 scoped_refptr<PlatformSensor> sensor_; 40 scoped_refptr<PlatformSensor> sensor_;
41 mojom::SensorClientPtr client_; 41 mojom::SensorClientPtr client_;
42 bool suspended_; 42 bool suspended_;
43 // The number of configurations that have |suppress_on_change_events_|
44 // flag set to true. If there is at least one configuration that sets this
45 // flag to true, SensorClient::SensorReadingChanged() is not called.
46 int suppress_on_change_events_count_;
43 47
44 DISALLOW_COPY_AND_ASSIGN(SensorImpl); 48 DISALLOW_COPY_AND_ASSIGN(SensorImpl);
45 }; 49 };
46 50
47 } // namespace device 51 } // namespace device
48 52
49 #endif // DEVICE_GENERIC_SENSOR_SENSOR_IMPL_H_ 53 #endif // DEVICE_GENERIC_SENSOR_SENSOR_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698