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

Unified Diff: device/generic_sensor/public/cpp/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: Rebase to master. 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 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 8cebb0ca8dd0aa2f564de6dbda2c3d1e68e7edda..b8fe00057678e7b1d996faa62a1e5bc8c7be111e 100644
--- a/device/generic_sensor/public/cpp/platform_sensor_configuration.h
+++ b/device/generic_sensor/public/cpp/platform_sensor_configuration.h
@@ -17,6 +17,11 @@ class 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