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

Side by Side Diff: device/generic_sensor/platform_sensor.h

Issue 2288103002: [sensors] Add GetDefaultConfiguration() to generic sensor mojo interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 | « no previous file | device/generic_sensor/public/interfaces/sensor.mojom » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_H_ 5 #ifndef DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_H_
6 #define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_H_ 6 #define DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 10
(...skipping 18 matching lines...) Expand all
29 public: 29 public:
30 virtual void OnSensorReadingChanged() = 0; 30 virtual void OnSensorReadingChanged() = 0;
31 virtual void OnSensorError() = 0; 31 virtual void OnSensorError() = 0;
32 virtual bool IsNotificationSuspended() = 0; 32 virtual bool IsNotificationSuspended() = 0;
33 33
34 protected: 34 protected:
35 virtual ~Client() {} 35 virtual ~Client() {}
36 }; 36 };
37 37
38 virtual mojom::ReportingMode GetReportingMode() = 0; 38 virtual mojom::ReportingMode GetReportingMode() = 0;
39 virtual PlatformSensorConfiguration GetDefaultConfiguration() = 0;
39 40
40 mojom::SensorType GetType() const; 41 mojom::SensorType GetType() const;
41 42
42 bool StartListening(Client* client, 43 bool StartListening(Client* client,
43 const PlatformSensorConfiguration& config); 44 const PlatformSensorConfiguration& config);
44 bool StopListening(Client* client, const PlatformSensorConfiguration& config); 45 bool StopListening(Client* client, const PlatformSensorConfiguration& config);
45 46
46 void UpdateSensor(); 47 void UpdateSensor();
47 48
48 void AddClient(Client*); 49 void AddClient(Client*);
(...skipping 23 matching lines...) Expand all
72 base::ObserverList<Client, true> clients_; 73 base::ObserverList<Client, true> clients_;
73 ConfigMap config_map_; 74 ConfigMap config_map_;
74 PlatformSensorProvider* provider_; 75 PlatformSensorProvider* provider_;
75 base::WeakPtrFactory<PlatformSensor> weak_factory_; 76 base::WeakPtrFactory<PlatformSensor> weak_factory_;
76 DISALLOW_COPY_AND_ASSIGN(PlatformSensor); 77 DISALLOW_COPY_AND_ASSIGN(PlatformSensor);
77 }; 78 };
78 79
79 } // namespace device 80 } // namespace device
80 81
81 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_H_ 82 #endif // DEVICE_GENERIC_SENSOR_PLATFORM_SENSOR_H_
OLDNEW
« no previous file with comments | « no previous file | device/generic_sensor/public/interfaces/sensor.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698