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

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

Issue 2368193003: [sensors] Introduce asynchronous way to create sensors. (Closed)
Patch Set: A comment from Mikhail Created 4 years, 2 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/fake_platform_sensor_provider.cc » ('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_FAKE_PLATFORM_SENSOR_PROVIDER_H_ 5 #ifndef DEVICE_GENERIC_SENSOR_FAKE_PLATFORM_SENSOR_PROVIDER_H_
6 #define DEVICE_GENERIC_SENSOR_FAKE_PLATFORM_SENSOR_PROVIDER_H_ 6 #define DEVICE_GENERIC_SENSOR_FAKE_PLATFORM_SENSOR_PROVIDER_H_
7 7
8 #include "device/generic_sensor/platform_sensor_provider.h" 8 #include "device/generic_sensor/platform_sensor_provider.h"
9 9
10 namespace device { 10 namespace device {
11 11
12 class FakePlatformSensorProvider : public PlatformSensorProvider { 12 class FakePlatformSensorProvider : public PlatformSensorProvider {
13 public: 13 public:
14 FakePlatformSensorProvider(); 14 FakePlatformSensorProvider();
15 ~FakePlatformSensorProvider() override; 15 ~FakePlatformSensorProvider() override;
16 16
17 static FakePlatformSensorProvider* GetInstance(); 17 static FakePlatformSensorProvider* GetInstance();
18 18
19 protected: 19 protected:
20 scoped_refptr<PlatformSensor> CreateSensorInternal( 20 void CreateSensorInternal(mojom::SensorType type,
21 mojom::SensorType type, 21 mojo::ScopedSharedBufferMapping mapping,
22 mojo::ScopedSharedBufferMapping mapping, 22 uint64_t buffer_size,
23 uint64_t buffer_size) override; 23 const CreateSensorCallback& callback) override;
24 24
25 private: 25 private:
26 DISALLOW_COPY_AND_ASSIGN(FakePlatformSensorProvider); 26 DISALLOW_COPY_AND_ASSIGN(FakePlatformSensorProvider);
27 }; 27 };
28 28
29 } // namespace device 29 } // namespace device
30 30
31 #endif // DEVICE_GENERIC_SENSOR_MOCK_PLATFORM_SENSOR_PROVIDER_H_ 31 #endif // DEVICE_GENERIC_SENSOR_MOCK_PLATFORM_SENSOR_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | device/generic_sensor/fake_platform_sensor_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698