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

Side by Side Diff: device/generic_sensor/public/cpp/sensor_reading.h

Issue 2929603003: Add RELATIVE_ORIENTATION sensor implementation on macOS to //device/generic_sensor (Closed)
Patch Set: updated IsSignificantlyDifferent() Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_GENERIC_SENSOR_PUBLIC_CPP_SENSOR_READING_H_ 5 #ifndef DEVICE_GENERIC_SENSOR_PUBLIC_CPP_SENSOR_READING_H_
6 #define DEVICE_GENERIC_SENSOR_PUBLIC_CPP_SENSOR_READING_H_ 6 #define DEVICE_GENERIC_SENSOR_PUBLIC_CPP_SENSOR_READING_H_
7 7
8 #include "device/base/synchronization/one_writer_seqlock.h" 8 #include "device/base/synchronization/one_writer_seqlock.h"
9 #include "device/generic_sensor/public/cpp/generic_sensor_public_export.h" 9 #include "device/generic_sensor/public/cpp/generic_sensor_public_export.h"
10 #include "device/generic_sensor/public/interfaces/sensor.mojom.h" 10 #include "device/generic_sensor/public/interfaces/sensor.mojom.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 struct DEVICE_GENERIC_SENSOR_PUBLIC_EXPORT SensorReadingSharedBuffer { 104 struct DEVICE_GENERIC_SENSOR_PUBLIC_EXPORT SensorReadingSharedBuffer {
105 SensorReadingSharedBuffer(); 105 SensorReadingSharedBuffer();
106 ~SensorReadingSharedBuffer(); 106 ~SensorReadingSharedBuffer();
107 SensorReadingField<OneWriterSeqLock> seqlock; 107 SensorReadingField<OneWriterSeqLock> seqlock;
108 SensorReading reading; 108 SensorReading reading;
109 109
110 // Gets the shared reading buffer offset for the given sensor type. 110 // Gets the shared reading buffer offset for the given sensor type.
111 static uint64_t GetOffset(mojom::SensorType type); 111 static uint64_t GetOffset(mojom::SensorType type);
112 }; 112 };
113 113
114 bool DEVICE_GENERIC_SENSOR_PUBLIC_EXPORT
115 GetSensorReadingFromBuffer(const SensorReadingSharedBuffer* buffer,
116 SensorReading* result);
117
114 } // namespace device 118 } // namespace device
115 119
116 #endif // DEVICE_GENERIC_SENSOR_PUBLIC_CPP_SENSOR_READING_H_ 120 #endif // DEVICE_GENERIC_SENSOR_PUBLIC_CPP_SENSOR_READING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698