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

Side by Side Diff: device/sensor/sensor_manager.h

Issue 1892083002: Generic Sensor API : Ambient Light Sensor API. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: re entrancy fix Created 4 years, 6 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
« no previous file with comments | « device/sensor/sensor_impl.cc ('k') | device/sensor/sensor_manager_default.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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 DEVICE_SENSOR_SENSOR_MANAGER_H_
6 #define DEVICE_SENSOR_SENSOR_MANAGER_H_
7
8 #include <memory>
9 #include "device/sensor/sensor_service.h"
10
11 namespace device {
12
13 // Platform specific manager class for fetching sensor data (as of now only
14 // ALS).
15 class SensorManager {
16 public:
17 // Creates a SensorManager object. |callback| should be called when the
18 // ALS reading changes.
19 static std::unique_ptr<SensorManager> Create(
20 const SensorService::SensorUpdateCallback& callback);
21
22 virtual ~SensorManager() {}
23
24 // Start listening for sensor reading changes. New updates are signalled
25 // by invoking the callback provided at construction time.
26 // Note that this is called in the IO thread.
27 virtual bool StartListeningSensorChange() = 0;
28
29 // Stop listening for sensor reading changes.
30 // Note that this is called in the IO thread.
31 virtual void StopListeningSensorChange() = 0;
32 };
33
34 } // namespace device
35
36 #endif // DEVICE_SENSOR_SENSOR_MANAGER_H_
OLDNEW
« no previous file with comments | « device/sensor/sensor_impl.cc ('k') | device/sensor/sensor_manager_default.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698