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

Unified Diff: device/generic_sensor/platform_sensor_configuration.h

Issue 2284613002: [sensors] Android platform adaptation for Generic Sensor API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded dependencies. Created 4 years, 4 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_configuration.h
diff --git a/device/generic_sensor/platform_sensor_configuration.h b/device/generic_sensor/platform_sensor_configuration.h
index 83a2d9bd8f4684924fb64baca09293b7b03a4ed3..6a70e4dda4d11121018eb88082576a40a343b6ce 100644
--- a/device/generic_sensor/platform_sensor_configuration.h
+++ b/device/generic_sensor/platform_sensor_configuration.h
@@ -18,6 +18,11 @@ class DEVICE_SENSOR_EXPORT PlatformSensorConfiguration {
bool operator==(const PlatformSensorConfiguration& other) const;
+ // Platform dependent implementations can override this operator if different
+ // optimal configuration comparison is required. By default, only frequency is
+ // used to compare two configurations.
+ virtual bool operator>(const PlatformSensorConfiguration& other) const;
+
void set_frequency(double frequency) {
DCHECK(frequency_ <= kMaxAllowedFrequency && frequency_ > 0.0);
frequency_ = frequency;

Powered by Google App Engine
This is Rietveld 408576698