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

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

Issue 2929603003: Add RELATIVE_ORIENTATION sensor implementation on macOS to //device/generic_sensor (Closed)
Patch Set: updated OnSensorError() 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef DEVICE_GENERIC_SENSOR_PUBLIC_CPP_SENSOR_SHARED_BUFFER_READER_H_
6 #define DEVICE_GENERIC_SENSOR_PUBLIC_CPP_SENSOR_SHARED_BUFFER_READER_H_
7
8 #include "base/macros.h"
9 #include "device/generic_sensor/public/cpp/generic_sensor_public_export.h"
10
11 namespace device {
12
13 struct SensorReading;
14 struct SensorReadingSharedBuffer;
15
16 class DEVICE_GENERIC_SENSOR_PUBLIC_EXPORT SensorSharedBufferReader {
Mikhail 2017/06/20 13:50:00 It's a good idea to export this functionality sinc
juncai 2017/06/20 19:50:55 Done.
17 public:
18 explicit SensorSharedBufferReader(const SensorReadingSharedBuffer* buffer);
19 ~SensorSharedBufferReader();
20
21 // Get sensor reading from shared buffer.
22 bool GetSensorReading(SensorReading* result);
23
24 private:
25 bool TryReadFromBuffer(SensorReading* result);
26
27 const SensorReadingSharedBuffer* buffer_;
28
29 DISALLOW_COPY_AND_ASSIGN(SensorSharedBufferReader);
30 };
31
32 } // namespace device
33
34 #endif // DEVICE_GENERIC_SENSOR_PUBLIC_CPP_SENSOR_SHARED_BUFFER_READER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698