Chromium Code Reviews| Index: device/sensors/public/cpp/orientation_data.h |
| diff --git a/device/sensors/public/cpp/orientation_data.h b/device/sensors/public/cpp/orientation_data.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e81bf8a06c55c3fabb1b4faeb87e0844e3761116 |
| --- /dev/null |
| +++ b/device/sensors/public/cpp/orientation_data.h |
| @@ -0,0 +1,38 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef DEVICE_SENSORS_PUBLIC_CPP_ORIENTATION_DATA_H_ |
| +#define DEVICE_SENSORS_PUBLIC_CPP_ORIENTATION_DATA_H_ |
| + |
| +namespace device { |
| + |
| +#pragma pack(push, 1) |
| + |
| +class OrientationData { |
| + public: |
| + OrientationData(); |
|
timvolodine
2016/10/24 16:23:43
so here we don't need a copy-constructor like in m
blundell
2016/10/24 16:25:58
That's correct. MotionData is copied but Orientati
timvolodine
2016/10/24 18:13:20
hmm that's weird, not sure where that would happen
|
| + ~OrientationData() {} |
| + |
| + double alpha; |
| + double beta; |
| + double gamma; |
| + |
| + bool hasAlpha : 1; |
| + bool hasBeta : 1; |
| + bool hasGamma : 1; |
| + |
| + bool absolute : 1; |
| + |
| + bool allAvailableSensorsAreActive : 1; |
| +}; |
| + |
| +static_assert(sizeof(OrientationData) == |
| + (3 * sizeof(double) + 1 * sizeof(char)), |
| + "OrientationData has wrong size"); |
| + |
| +#pragma pack(pop) |
| + |
| +} // namespace device |
| + |
| +#endif // DEVICE_SENSORS_PUBLIC_CPP_ORIENTATION_DATA_H_ |