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

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

Issue 2330943002: [Sensors] Handle default sensor configuration (Closed)
Patch Set: Rebased 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: 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 d49e087da0bcbb4775e7de6748aef1f325f2f620..ee94038adb06be1cd886bc184bd4bdac9c589798 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorProxy.h
+++ b/third_party/WebKit/Source/modules/sensor/SensorProxy.h
@@ -59,10 +59,12 @@ public:
double timestamp;
double reading[3];
};
- static_assert(sizeof(Reading) == device::mojom::blink::SensorReadBuffer::kReadBufferSize, "Check reading size");
+ static_assert(sizeof(Reading) == device::mojom::blink::SensorInitParams::kReadBufferSize, "Check reading size");
const Reading& reading() const { return m_reading; }
+ const device::mojom::blink::SensorConfiguration* defaultConfig() const;
+
// Updates internal reading from shared buffer.
void updateInternalReading();
@@ -79,7 +81,7 @@ private:
// Generic handler for a fatal error.
void handleSensorError();
- void onSensorCreated(device::mojom::blink::SensorReadBufferPtr, device::mojom::blink::SensorClientRequest);
+ void onSensorCreated(device::mojom::blink::SensorInitParamsPtr, device::mojom::blink::SensorClientRequest);
device::mojom::blink::SensorType m_type;
device::mojom::blink::ReportingMode m_mode;
@@ -88,7 +90,9 @@ private:
ObserversSet m_observers;
device::mojom::blink::SensorPtr m_sensor;
+ device::mojom::blink::SensorConfigurationPtr m_defaultConfig;
mojo::Binding<device::mojom::blink::SensorClient> m_clientBinding;
+
enum State {
Uninitialized,
Initializing,
« no previous file with comments | « third_party/WebKit/Source/modules/sensor/Sensor.cpp ('k') | third_party/WebKit/Source/modules/sensor/SensorProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698