| 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 9e41bd3a56bb3ccf5cfecc56dc02410bf4f824f2..82e5e3164160bf45792ddb1a54681c32d2d88a8f 100644
|
| --- a/third_party/WebKit/Source/modules/sensor/SensorProxy.h
|
| +++ b/third_party/WebKit/Source/modules/sensor/SensorProxy.h
|
| @@ -5,6 +5,7 @@
|
| #ifndef SensorProxy_h
|
| #define SensorProxy_h
|
|
|
| +#include "device/base/synchronization/shared_memory_seqlock_buffer.h"
|
| #include "device/generic_sensor/public/interfaces/sensor.mojom-blink.h"
|
| #include "device/generic_sensor/public/interfaces/sensor_provider.mojom-blink.h"
|
| #include "mojo/public/cpp/bindings/binding.h"
|
| @@ -57,13 +58,7 @@ class SensorProxy final : public GarbageCollectedFinalized<SensorProxy>,
|
| device::mojom::blink::SensorType type() const { return m_type; }
|
| device::mojom::blink::ReportingMode reportingMode() const { return m_mode; }
|
|
|
| - struct Reading {
|
| - double timestamp;
|
| - double reading[3];
|
| - };
|
| - static_assert(sizeof(Reading) ==
|
| - device::mojom::blink::SensorInitParams::kReadBufferSize,
|
| - "Check reading size");
|
| + using Reading = device::mojom::blink::SensorReading;
|
|
|
| const Reading& reading() const { return m_reading; }
|
|
|
| @@ -104,6 +99,7 @@ class SensorProxy final : public GarbageCollectedFinalized<SensorProxy>,
|
| mojo::ScopedSharedBufferMapping m_sharedBuffer;
|
| Reading m_reading;
|
| bool m_suspended;
|
| + using ReadingBuffer = device::SharedMemorySeqLockBuffer<Reading>;
|
| };
|
|
|
| } // namespace blink
|
|
|