OLD | NEW |
---|---|
(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 "ash/accelerometer/accelerometer_observer.h" | |
11 #include "base/callback.h" | |
12 #include "base/macros.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 | |
Charlie Reis
2014/12/10 01:02:41
This class name should probably be prefixed with A
| |
19 : public AccelerometerObserver, | |
20 public content::SensorManagerDelegateChromeOS { | |
21 public: | |
22 SensorManagerDelegateChromeOS(); | |
23 ~SensorManagerDelegateChromeOS() override; | |
24 | |
25 // AccelerometerObserver: | |
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_ | |
OLD | NEW |