Index: services/device/generic_sensor/platform_sensor_reader_win.cc |
diff --git a/device/generic_sensor/platform_sensor_reader_win.cc b/services/device/generic_sensor/platform_sensor_reader_win.cc |
similarity index 91% |
rename from device/generic_sensor/platform_sensor_reader_win.cc |
rename to services/device/generic_sensor/platform_sensor_reader_win.cc |
index d158b99f33c1050101f85dd249382b6e1b795475..b8a16d39a2672de8ea765986f35d33949c7276a2 100644 |
--- a/device/generic_sensor/platform_sensor_reader_win.cc |
+++ b/services/device/generic_sensor/platform_sensor_reader_win.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "device/generic_sensor/platform_sensor_reader_win.h" |
+#include "services/device/generic_sensor/platform_sensor_reader_win.h" |
#include <Sensors.h> |
#include <objbase.h> |
@@ -13,9 +13,9 @@ |
#include "base/time/time.h" |
#include "base/win/iunknown_impl.h" |
#include "base/win/scoped_propvariant.h" |
-#include "device/generic_sensor/generic_sensor_consts.h" |
-#include "device/generic_sensor/public/cpp/platform_sensor_configuration.h" |
-#include "device/generic_sensor/public/cpp/sensor_reading.h" |
+#include "services/device/generic_sensor/generic_sensor_consts.h" |
+#include "services/device/public/cpp/generic_sensor/platform_sensor_configuration.h" |
+#include "services/device/public/cpp/generic_sensor/sensor_reading.h" |
namespace device { |
@@ -105,31 +105,31 @@ std::unique_ptr<ReaderInitParams> CreateAccelerometerReaderInitParams() { |
std::unique_ptr<ReaderInitParams> CreateGyroscopeReaderInitParams() { |
auto params = base::MakeUnique<ReaderInitParams>(); |
params->sensor_type_id = SENSOR_TYPE_GYROMETER_3D; |
- params->reader_func = base::Bind([](ISensorDataReport* report, |
- SensorReading* reading) { |
- double x = 0.0; |
- double y = 0.0; |
- double z = 0.0; |
- if (!GetReadingValueForProperty( |
- SENSOR_DATA_TYPE_ANGULAR_VELOCITY_X_DEGREES_PER_SECOND, report, |
- &x) || |
- !GetReadingValueForProperty( |
- SENSOR_DATA_TYPE_ANGULAR_VELOCITY_Y_DEGREES_PER_SECOND, report, |
- &y) || |
- !GetReadingValueForProperty( |
- SENSOR_DATA_TYPE_ANGULAR_VELOCITY_Z_DEGREES_PER_SECOND, report, |
- &z)) { |
- return E_FAIL; |
- } |
+ params->reader_func = |
+ base::Bind([](ISensorDataReport* report, SensorReading* reading) { |
+ double x = 0.0; |
+ double y = 0.0; |
+ double z = 0.0; |
+ if (!GetReadingValueForProperty( |
+ SENSOR_DATA_TYPE_ANGULAR_VELOCITY_X_DEGREES_PER_SECOND, report, |
+ &x) || |
+ !GetReadingValueForProperty( |
+ SENSOR_DATA_TYPE_ANGULAR_VELOCITY_Y_DEGREES_PER_SECOND, report, |
+ &y) || |
+ !GetReadingValueForProperty( |
+ SENSOR_DATA_TYPE_ANGULAR_VELOCITY_Z_DEGREES_PER_SECOND, report, |
+ &z)) { |
+ return E_FAIL; |
+ } |
- // Windows uses coordinate system where Z axis points down from device |
- // screen, therefore, using right hand notation, we have to reverse |
- // sign for each axis. Values are converted from deg to rad. |
- reading->values[0] = -x * kRadiansInDegrees; |
- reading->values[1] = -y * kRadiansInDegrees; |
- reading->values[2] = -z * kRadiansInDegrees; |
- return S_OK; |
- }); |
+ // Windows uses coordinate system where Z axis points down from device |
+ // screen, therefore, using right hand notation, we have to reverse |
+ // sign for each axis. Values are converted from deg to rad. |
+ reading->values[0] = -x * kRadiansInDegrees; |
+ reading->values[1] = -y * kRadiansInDegrees; |
+ reading->values[2] = -z * kRadiansInDegrees; |
+ return S_OK; |
+ }); |
return params; |
} |