OLD | NEW |
---|---|
(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 BLIMP_CLIENT_CORE_GEOLOCATION_BLIMP_LOCATION_PROVIDER_H_ | |
6 #define BLIMP_CLIENT_CORE_GEOLOCATION_BLIMP_LOCATION_PROVIDER_H_ | |
7 | |
8 #include <memory> | |
9 | |
10 #include "device/geolocation/geolocation_delegate.h" | |
11 #include "device/geolocation/geoposition.h" | |
12 #include "device/geolocation/location_provider.h" | |
13 | |
14 namespace blimp { | |
15 namespace client { | |
16 | |
17 // Client-side location provider that handles frequency of geolocation updates. | |
18 class BlimpLocationProvider : public device::LocationProvider { | |
Kevin M
2016/08/19 17:51:37
Perhaps we could provide it with a more descriptiv
CJ
2016/08/19 20:44:01
Done.
Wez
2016/08/19 23:12:10
This class is a pure LocationProvider proxy - it d
CJ
2016/08/22 20:28:08
I agree with moving it over to device/geolocation.
| |
19 public: | |
20 BlimpLocationProvider(); | |
21 ~BlimpLocationProvider() override; | |
22 | |
23 // LocationProvider implemenation. | |
24 void SetUpdateCallback( | |
25 const LocationProviderUpdateCallback& callback) override; | |
26 bool StartProvider(bool enable_high_accuracy) override; | |
27 void StopProvider() override; | |
28 const device::Geoposition& GetPosition() override; | |
29 void OnPermissionGranted() override; | |
30 | |
31 private: | |
32 void OnLocationUpdate(const device::Geoposition& new_position); | |
Kevin M
2016/08/19 17:51:37
Comment this method
CJ
2016/08/19 20:44:01
Done.
| |
33 | |
34 std::unique_ptr<device::LocationProvider> location_provider_; | |
35 LocationProvider::LocationProviderUpdateCallback feature_update_callback_; | |
36 | |
37 DISALLOW_COPY_AND_ASSIGN(BlimpLocationProvider); | |
38 }; | |
39 | |
40 } // namespace client | |
41 } // namespace blimp | |
42 | |
43 #endif // BLIMP_CLIENT_CORE_GEOLOCATION_BLIMP_LOCATION_PROVIDER_H_ | |
OLD | NEW |