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

Side by Side Diff: device/sensors/public/cpp/motion_data.h

Issue 2763333002: Convert device sensors structs from Blink to Chromium naming (Closed)
Patch Set: Rebase Created 3 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SENSORS_PUBLIC_CPP_MOTION_DATA_H_ 5 #ifndef DEVICE_SENSORS_PUBLIC_CPP_MOTION_DATA_H_
6 #define DEVICE_SENSORS_PUBLIC_CPP_MOTION_DATA_H_ 6 #define DEVICE_SENSORS_PUBLIC_CPP_MOTION_DATA_H_
7 7
8 namespace device { 8 namespace device {
9 9
10 #pragma pack(push, 1) 10 #pragma pack(push, 1)
11 11
12 class MotionData { 12 class MotionData {
13 public: 13 public:
14 MotionData(); 14 MotionData();
15 MotionData(const MotionData& other); 15 MotionData(const MotionData& other);
16 ~MotionData() {} 16 ~MotionData() {}
17 17
18 double accelerationX; 18 double acceleration_x;
19 double accelerationY; 19 double acceleration_y;
20 double accelerationZ; 20 double acceleration_z;
21 21
22 double accelerationIncludingGravityX; 22 double acceleration_including_gravity_x;
23 double accelerationIncludingGravityY; 23 double acceleration_including_gravity_y;
24 double accelerationIncludingGravityZ; 24 double acceleration_including_gravity_z;
25 25
26 double rotationRateAlpha; 26 double rotation_rate_alpha;
27 double rotationRateBeta; 27 double rotation_rate_beta;
28 double rotationRateGamma; 28 double rotation_rate_gamma;
29 29
30 double interval; 30 double interval;
31 31
32 bool hasAccelerationX : 1; 32 bool has_acceleration_x : 1;
33 bool hasAccelerationY : 1; 33 bool has_acceleration_y : 1;
34 bool hasAccelerationZ : 1; 34 bool has_acceleration_z : 1;
35 35
36 bool hasAccelerationIncludingGravityX : 1; 36 bool has_acceleration_including_gravity_x : 1;
37 bool hasAccelerationIncludingGravityY : 1; 37 bool has_acceleration_including_gravity_y : 1;
38 bool hasAccelerationIncludingGravityZ : 1; 38 bool has_acceleration_including_gravity_z : 1;
39 39
40 bool hasRotationRateAlpha : 1; 40 bool has_rotation_rate_alpha : 1;
41 bool hasRotationRateBeta : 1; 41 bool has_rotation_rate_beta : 1;
42 bool hasRotationRateGamma : 1; 42 bool has_rotation_rate_gamma : 1;
43 43
44 bool allAvailableSensorsAreActive : 1; 44 bool all_available_sensors_are_active : 1;
45 }; 45 };
46 46
47 static_assert(sizeof(MotionData) == (10 * sizeof(double) + 2 * sizeof(char)), 47 static_assert(sizeof(MotionData) == (10 * sizeof(double) + 2 * sizeof(char)),
48 "MotionData has wrong size"); 48 "MotionData has wrong size");
49 49
50 #pragma pack(pop) 50 #pragma pack(pop)
51 51
52 } // namespace device 52 } // namespace device
53 53
54 #endif // DEVICE_SENSORS_PUBLIC_CPP_MOTION_DATA_H_ 54 #endif // DEVICE_SENSORS_PUBLIC_CPP_MOTION_DATA_H_
OLDNEW
« no previous file with comments | « device/sensors/data_fetcher_shared_memory_win.cc ('k') | device/sensors/public/cpp/orientation_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698