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

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: 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 // TODO(jonross): Once accelerometer reading has been moved to
21 // content/browser/device_sensors/ remove this delegate. Instead have
22 // content/public/browser expose an observer for ChromeOS. crbug.com/431865
timvolodine 2014/12/03 13:19:55 nit: ". crbug.com/431865" -> "(crbug.com/431865)."
jonross 2014/12/03 14:43:58 Done.
23 class CONTENT_EXPORT SensorManagerDelegateChromeOS {
24 public:
25 virtual ~SensorManagerDelegateChromeOS();
26
27 // Allows platforms to provide a delegate.
28 static void SetDelegate(SensorManagerDelegateChromeOS* delegate);
29
30 // Start processing accelerometer events for orientation. The values can be
31 // passed via |callback|
32 virtual void StartFetchingDeviceOrientationData(
33 const OrientationDataCallback& callback) = 0;
34
35 // Stop processing accelerometer events for orientation.
36 virtual void StopFetchingDeviceOrientationData() = 0;
37
38 protected:
39 SensorManagerDelegateChromeOS();
40
41 private:
42 DISALLOW_COPY_AND_ASSIGN(SensorManagerDelegateChromeOS);
43 };
44
45 } // namespace content
46
47 #endif // CONTENT_PUBLIC_BROWSER_SENSOR_MANAGER_DELEGATE_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698