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

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

Issue 2668173003: [Sensors] Remove SensorReading interfaces (Closed)
Patch Set: updated global-interface-listing.html Created 3 years, 11 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 db9977dd3c9e597bf965bfb98cafc44100ad0a75..b9264feccf38067aa77ae2724d5b0bc54338bd2c 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorProxy.h
+++ b/third_party/WebKit/Source/modules/sensor/SensorProxy.h
@@ -19,7 +19,6 @@ namespace blink {
class SensorProviderProxy;
class SensorReading;
-class SensorReadingFactory;
class SensorReadingUpdater;
// This class wraps 'Sensor' mojo interface and used by multiple
@@ -77,10 +76,8 @@ class SensorProxy final : public GarbageCollectedFinalized<SensorProxy>,
device::mojom::blink::SensorType type() const { return m_type; }
device::mojom::blink::ReportingMode reportingMode() const { return m_mode; }
- // The |SensorReading| instance which is shared between sensor instances
- // of the same type.
// Note: the returned value is reset after updateSensorReading() call.
- SensorReading* sensorReading() const { return m_reading; }
+ const device::SensorReading& reading() const { return m_reading; }
const device::mojom::blink::SensorConfiguration* defaultConfig() const;
@@ -97,10 +94,7 @@ class SensorProxy final : public GarbageCollectedFinalized<SensorProxy>,
friend class SensorProviderProxy;
friend class SensorReadingUpdaterContinuous;
friend class SensorReadingUpdaterOnChange;
- SensorProxy(device::mojom::blink::SensorType,
- SensorProviderProxy*,
- Page*,
- std::unique_ptr<SensorReadingFactory>);
+ SensorProxy(device::mojom::blink::SensorType, SensorProviderProxy*, Page*);
// Updates sensor reading from shared buffer.
void updateSensorReading();
@@ -145,8 +139,7 @@ class SensorProxy final : public GarbageCollectedFinalized<SensorProxy>,
mojo::ScopedSharedBufferHandle m_sharedBufferHandle;
mojo::ScopedSharedBufferMapping m_sharedBuffer;
bool m_suspended;
- Member<SensorReading> m_reading;
- std::unique_ptr<SensorReadingFactory> m_readingFactory;
+ device::SensorReading m_reading;
double m_maximumFrequency;
Member<SensorReadingUpdater> m_readingUpdater;

Powered by Google App Engine
This is Rietveld 408576698