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

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

Issue 2415083002: Move Device Sensors client files from Blink to //device/sensors client lib (Closed)
Patch Set: Revert licenses change for similarity Created 4 years, 2 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 10 matching lines...) Expand all
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebDeviceMotionData_h 31 #ifndef MotionData_h
32 #define WebDeviceMotionData_h 32 #define MotionData_h
33 33
34 #include "public/platform/WebCommon.h" 34 namespace device {
35
36 namespace blink {
37 35
38 #pragma pack(push, 1) 36 #pragma pack(push, 1)
39 37
40 class WebDeviceMotionData { 38 class MotionData {
41 public: 39 public:
42 BLINK_PLATFORM_EXPORT WebDeviceMotionData(); 40 MotionData();
43 ~WebDeviceMotionData() {} 41 MotionData(const MotionData& other);
blundell 2016/10/14 07:32:52 Had to define the default copy constructor out-of-
42 ~MotionData() {}
44 43
45 double accelerationX; 44 double accelerationX;
46 double accelerationY; 45 double accelerationY;
47 double accelerationZ; 46 double accelerationZ;
48 47
49 double accelerationIncludingGravityX; 48 double accelerationIncludingGravityX;
50 double accelerationIncludingGravityY; 49 double accelerationIncludingGravityY;
51 double accelerationIncludingGravityZ; 50 double accelerationIncludingGravityZ;
52 51
53 double rotationRateAlpha; 52 double rotationRateAlpha;
(...skipping 10 matching lines...) Expand all
64 bool hasAccelerationIncludingGravityY : 1; 63 bool hasAccelerationIncludingGravityY : 1;
65 bool hasAccelerationIncludingGravityZ : 1; 64 bool hasAccelerationIncludingGravityZ : 1;
66 65
67 bool hasRotationRateAlpha : 1; 66 bool hasRotationRateAlpha : 1;
68 bool hasRotationRateBeta : 1; 67 bool hasRotationRateBeta : 1;
69 bool hasRotationRateGamma : 1; 68 bool hasRotationRateGamma : 1;
70 69
71 bool allAvailableSensorsAreActive : 1; 70 bool allAvailableSensorsAreActive : 1;
72 }; 71 };
73 72
74 static_assert(sizeof(WebDeviceMotionData) == 73 static_assert(sizeof(MotionData) == (10 * sizeof(double) + 2 * sizeof(char)),
75 (10 * sizeof(double) + 2 * sizeof(char)), 74 "MotionData has wrong size");
76 "WebDeviceMotionData has wrong size");
77 75
78 #pragma pack(pop) 76 #pragma pack(pop)
79 77
80 } // namespace blink 78 } // namespace device
81 79
82 #endif // WebDeviceMotionData_h 80 #endif // MotionData_h
OLDNEW
« no previous file with comments | « device/sensors/public/cpp/device_orientation_hardware_buffer.h ('k') | device/sensors/public/cpp/motion_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698