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

Side by Side Diff: device/device_sensors/sensor_manager_chromeos.cc

Issue 1164563003: Extract device_sensors to /device via Mojofication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 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
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
OLDNEW
« no previous file with comments | « device/device_sensors/sensor_manager_chromeos.h ('k') | device/device_sensors/sensor_manager_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698