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

Side by Side Diff: ash/content/accelerometer/sensor_manager_delegate_chromeos.h

Issue 680383007: DeviceOrientation API on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_CONTENT_ACCELEROMETER_SENSOR_MANAGER_DELEGATE_CHROMEOS_H_
6 #define ASH_CONTENT_ACCELEROMETER_SENSOR_MANAGER_DELEGATE_CHROMEOS_H_
7
8 #include "content/public/browser/sensor_manager_delegate_chromeos.h"
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12 #include "chromeos/accelerometer/accelerometer_reader.h"
13
14 namespace ash {
15
16 // Chrome OS implementation of the Device Orientation API. Responsible for
17 // observing accelerometer events, and notifying content::SensorManagerChromeOS.
18 class SensorManagerDelegateChromeOS
19 : public chromeos::AccelerometerReader::Observer,
20 public content::SensorManagerDelegateChromeOS {
21 public:
22 SensorManagerDelegateChromeOS();
23 ~SensorManagerDelegateChromeOS() override;
24
25 // AccelerometerReader::Observer:
26 void OnAccelerometerUpdated(const ui::AccelerometerUpdate& update) override;
27
28 // content::SensorManagerDelegateChromeOS:
29 void StartFetchingDeviceOrientationData(
30 const content::OrientationDataCallback& callback) override;
31 void StopFetchingDeviceOrientationData() override;
32
33 private:
34 // Callback to direct accelerometer events to.
35 content::OrientationDataCallback orientation_callback_;
36
37 DISALLOW_COPY_AND_ASSIGN(SensorManagerDelegateChromeOS);
38 };
39
40 } // namespace ash
41
42 #endif // ASH_CONTENT_ACCELEROMETER_SENSOR_MANAGER_DELEGATE_CHROMEOS_H_
OLDNEW
« no previous file with comments | « ash/content/accelerometer/DEPS ('k') | ash/content/accelerometer/sensor_manager_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698