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

Unified Diff: third_party/WebKit/Source/modules/sensor/SensorProxy.h

Issue 2704123006: [Sensors] Clamp given sampling frequency to the minimum supported one (Closed)
Patch Set: Created 3 years, 10 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: third_party/WebKit/Source/modules/sensor/SensorProxy.h
diff --git a/third_party/WebKit/Source/modules/sensor/SensorProxy.h b/third_party/WebKit/Source/modules/sensor/SensorProxy.h
index b9264feccf38067aa77ae2724d5b0bc54338bd2c..f440b1e14db0387fedd92eb520574cb7b29bd6e3 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorProxy.h
+++ b/third_party/WebKit/Source/modules/sensor/SensorProxy.h
@@ -81,7 +81,9 @@ class SensorProxy final : public GarbageCollectedFinalized<SensorProxy>,
const device::mojom::blink::SensorConfiguration* defaultConfig() const;
- double maximumFrequency() const { return m_maximumFrequency; }
+ const std::pair<double, double>& frequencyLimits() const {
+ return m_frequencyLimits;
+ }
Document* document() const;
const WTF::Vector<double>& frequenciesUsed() const {
@@ -140,7 +142,7 @@ class SensorProxy final : public GarbageCollectedFinalized<SensorProxy>,
mojo::ScopedSharedBufferMapping m_sharedBuffer;
bool m_suspended;
device::SensorReading m_reading;
- double m_maximumFrequency;
+ std::pair<double, double> m_frequencyLimits;
Member<SensorReadingUpdater> m_readingUpdater;
WTF::Vector<double> m_frequenciesUsed;

Powered by Google App Engine
This is Rietveld 408576698