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

Side by Side Diff: content/public/browser/sensor_manager_delegate_chromeos.h

Issue 680383007: DeviceOrientation API on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reduce Singleton Usage Created 6 years 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 CONTENT_PUBLIC_BROWSER_SENSOR_MANAGER_DELEGATE_CHROMEOS_H_
6 #define CONTENT_PUBLIC_BROWSER_SENSOR_MANAGER_DELEGATE_CHROMEOS_H_
7
8 #include "base/callback.h"
9 #include "base/macros.h"
10 #include "content/common/content_export.h"
11
12 namespace content {
13
14 typedef base::Callback<void(double x, double y, double z)>
15 OrientationDataCallback;
16
17 // For platforms with a push API for accelerometer sensors this delegate can be
18 // implemented. Once notified to start fetching data, the callback provided can
19 // be used to send the data.
20 class CONTENT_EXPORT SensorManagerDelegateChromeOS {
21 public:
22 virtual ~SensorManagerDelegateChromeOS();
23
24 // Allows platforms to provide a delegate.
25 static void SetDelegate(SensorManagerDelegateChromeOS* delegate);
26
27 // Start processing accelerometer events for orientation. The values can be
28 // passed via |callback|
29 virtual void StartFetchingDeviceOrientationData(
30 const OrientationDataCallback& callback) = 0;
31
32 // Stop processing accelerometer events for orientation.
33 virtual void StopFetchingDeviceOrientationData() = 0;
34
35 protected:
36 SensorManagerDelegateChromeOS();
37
38 private:
39 DISALLOW_COPY_AND_ASSIGN(SensorManagerDelegateChromeOS);
40 };
41
42 } // namespace content
43
44 #endif // CONTENT_PUBLIC_BROWSER_SENSOR_MANAGER_DELEGATE_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698