| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "content/browser/device_sensors/sensor_manager_chromeos.h" | 5 #include "device/device_sensors/sensor_manager_chromeos.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include "chromeos/accelerometer/accelerometer_reader.h" | 9 #include "chromeos/accelerometer/accelerometer_reader.h" |
| 10 #include "chromeos/accelerometer/accelerometer_types.h" | 10 #include "chromeos/accelerometer/accelerometer_types.h" |
| 11 #include "content/browser/device_sensors/inertial_sensor_consts.h" | 11 #include "device/device_sensors/inertial_sensor_consts.h" |
| 12 #include "ui/gfx/geometry/vector3d_f.h" | 12 //#include "ui/gfx/geometry/vector3d_f.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 // Conversion ratio from radians to degrees. | 15 // Conversion ratio from radians to degrees. |
| 16 const double kRad2deg = 180.0 / M_PI; | 16 const double kRad2deg = 180.0 / M_PI; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 | 20 |
| 21 SensorManagerChromeOS::SensorManagerChromeOS() | 21 SensorManagerChromeOS::SensorManagerChromeOS() |
| 22 : motion_buffer_(nullptr), orientation_buffer_(nullptr) { | 22 : motion_buffer_(nullptr), orientation_buffer_(nullptr) { |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 orientation_buffer_->seqlock.WriteBegin(); | 164 orientation_buffer_->seqlock.WriteBegin(); |
| 165 orientation_buffer_->data.beta = beta; | 165 orientation_buffer_->data.beta = beta; |
| 166 orientation_buffer_->data.hasBeta = true; | 166 orientation_buffer_->data.hasBeta = true; |
| 167 orientation_buffer_->data.gamma = gamma; | 167 orientation_buffer_->data.gamma = gamma; |
| 168 orientation_buffer_->data.hasGamma = true; | 168 orientation_buffer_->data.hasGamma = true; |
| 169 orientation_buffer_->data.allAvailableSensorsAreActive = true; | 169 orientation_buffer_->data.allAvailableSensorsAreActive = true; |
| 170 orientation_buffer_->seqlock.WriteEnd(); | 170 orientation_buffer_->seqlock.WriteEnd(); |
| 171 } | 171 } |
| 172 | 172 |
| 173 } // namespace content | 173 } // namespace content |
| OLD | NEW |