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

Unified Diff: device/device_sensors/data_fetcher_shared_memory_mac.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, 7 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 side-by-side diff with in-line comments
Download patch
Index: device/device_sensors/data_fetcher_shared_memory_mac.cc
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_mac.cc b/device/device_sensors/data_fetcher_shared_memory_mac.cc
similarity index 95%
rename from content/browser/device_sensors/data_fetcher_shared_memory_mac.cc
rename to device/device_sensors/data_fetcher_shared_memory_mac.cc
index 4a1644ffb68e599ed6a260fa1cb9d9ada8c2bbea..66ee66b1d8a14f26a153d7d37c79375a5af71070 100644
--- a/content/browser/device_sensors/data_fetcher_shared_memory_mac.cc
+++ b/device/device_sensors/data_fetcher_shared_memory_mac.cc
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/device_sensors/data_fetcher_shared_memory.h"
+#include "device/device_sensors/data_fetcher_shared_memory.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
-#include "content/browser/device_sensors/ambient_light_mac.h"
+#include "device/device_sensors/ambient_light_mac.h"
#include "third_party/sudden_motion_sensor/sudden_motion_sensor_mac.h"
namespace {
@@ -52,7 +52,7 @@ void FetchLight(content::AmbientLightSensor* sensor,
}
void FetchMotion(SuddenMotionSensor* sensor,
- content::DeviceMotionHardwareBuffer* buffer) {
+ content::DeviceMotionHardwareBuffer* buffer) {
DCHECK(sensor);
DCHECK(buffer);
@@ -72,7 +72,7 @@ void FetchMotion(SuddenMotionSensor* sensor,
}
void FetchOrientation(SuddenMotionSensor* sensor,
- content::DeviceOrientationHardwareBuffer* buffer) {
+ content::DeviceOrientationHardwareBuffer* buffer) {
DCHECK(sensor);
DCHECK(buffer);
@@ -115,9 +115,9 @@ void FetchOrientation(SuddenMotionSensor* sensor,
// At this point, DCHECKing is paranoia. Never hurts.
DCHECK_GE(beta, -180.0);
- DCHECK_LT(beta, 180.0);
+ DCHECK_LT(beta, 180.0);
DCHECK_GE(gamma, -90.0);
- DCHECK_LT(gamma, 90.0);
+ DCHECK_LT(gamma, 90.0);
buffer->seqlock.WriteBegin();
buffer->data.beta = beta;
@@ -169,7 +169,7 @@ bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) {
motion_buffer_ = static_cast<DeviceMotionHardwareBuffer*>(buffer);
UMA_HISTOGRAM_BOOLEAN("InertialSensor.MotionMacAvailable",
- sudden_motion_sensor_available);
+ sudden_motion_sensor_available);
if (!sudden_motion_sensor_available) {
// No motion sensor available, fire an all-null event.
motion_buffer_->seqlock.WriteBegin();
@@ -187,7 +187,7 @@ bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) {
orientation_buffer_ =
static_cast<DeviceOrientationHardwareBuffer*>(buffer);
UMA_HISTOGRAM_BOOLEAN("InertialSensor.OrientationMacAvailable",
- sudden_motion_sensor_available);
+ sudden_motion_sensor_available);
if (sudden_motion_sensor_available) {
// On Mac we cannot provide absolute orientation.
orientation_buffer_->seqlock.WriteBegin();
« no previous file with comments | « device/device_sensors/data_fetcher_shared_memory_default.cc ('k') | device/device_sensors/data_fetcher_shared_memory_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698