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

Unified Diff: content/browser/device_sensors/data_fetcher_shared_memory_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, 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: content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc
diff --git a/content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc b/content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc
deleted file mode 100644
index 76349d2a37d37726b80f8bcde6cef78c181e6e30..0000000000000000000000000000000000000000
--- a/content/browser/device_sensors/data_fetcher_shared_memory_chromeos.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// 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 "content/browser/device_sensors/sensor_manager_chromeos.h"
-
-namespace content {
-
-DataFetcherSharedMemory::DataFetcherSharedMemory() {
-}
-
-DataFetcherSharedMemory::~DataFetcherSharedMemory() {
-}
-
-bool DataFetcherSharedMemory::Start(ConsumerType consumer_type, void* buffer) {
- DCHECK(buffer);
- if (!sensor_manager_)
- sensor_manager_.reset(new SensorManagerChromeOS);
-
- switch (consumer_type) {
- case CONSUMER_TYPE_MOTION:
- sensor_manager_->StartFetchingDeviceMotionData(
- static_cast<DeviceMotionHardwareBuffer*>(buffer));
- return true;
- case CONSUMER_TYPE_ORIENTATION:
- sensor_manager_->StartFetchingDeviceOrientationData(
- static_cast<DeviceOrientationHardwareBuffer*>(buffer));
- return true;
- case CONSUMER_TYPE_LIGHT:
- NOTIMPLEMENTED();
- return false;
- }
- NOTREACHED();
- return false;
-}
-
-bool DataFetcherSharedMemory::Stop(ConsumerType consumer_type) {
- switch (consumer_type) {
- case CONSUMER_TYPE_MOTION:
- return sensor_manager_->StopFetchingDeviceMotionData();
- case CONSUMER_TYPE_ORIENTATION:
- return sensor_manager_->StopFetchingDeviceOrientationData();
- case CONSUMER_TYPE_LIGHT:
- NOTIMPLEMENTED();
- return false;
- }
- NOTREACHED();
- return false;
-}
-
-} // namespace content

Powered by Google App Engine
This is Rietveld 408576698