OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ | 5 #ifndef DEVICE_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ |
6 #define DEVICE_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ | 6 #define DEVICE_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 class DEVICE_GEOLOCATION_EXPORT GeolocationProviderImpl | 29 class DEVICE_GEOLOCATION_EXPORT GeolocationProviderImpl |
30 : public NON_EXPORTED_BASE(GeolocationProvider), | 30 : public NON_EXPORTED_BASE(GeolocationProvider), |
31 public base::Thread { | 31 public base::Thread { |
32 public: | 32 public: |
33 // GeolocationProvider implementation: | 33 // GeolocationProvider implementation: |
34 std::unique_ptr<GeolocationProvider::Subscription> AddLocationUpdateCallback( | 34 std::unique_ptr<GeolocationProvider::Subscription> AddLocationUpdateCallback( |
35 const LocationUpdateCallback& callback, | 35 const LocationUpdateCallback& callback, |
36 bool enable_high_accuracy) override; | 36 bool enable_high_accuracy) override; |
37 void UserDidOptIntoLocationServices() override; | 37 void UserDidOptIntoLocationServices() override; |
| 38 bool HighAccuracyLocationInUse() override; |
38 void OverrideLocationForTesting(const Geoposition& position) override; | 39 void OverrideLocationForTesting(const Geoposition& position) override; |
39 | 40 |
40 // Callback from the LocationArbitrator. Public for testing. | 41 // Callback from the LocationArbitrator. Public for testing. |
41 void OnLocationUpdate(const LocationProvider* provider, | 42 void OnLocationUpdate(const LocationProvider* provider, |
42 const Geoposition& position); | 43 const Geoposition& position); |
43 | 44 |
44 // Gets a pointer to the singleton instance of the location relayer, which | 45 // Gets a pointer to the singleton instance of the location relayer, which |
45 // is in turn bound to the browser's global context objects. This must only be | 46 // is in turn bound to the browser's global context objects. This must only be |
46 // called on the UI thread so that the GeolocationProviderImpl is always | 47 // called on the UI thread so that the GeolocationProviderImpl is always |
47 // instantiated on the same thread. Ownership is NOT returned. | 48 // instantiated on the same thread. Ownership is NOT returned. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 99 |
99 // Only to be used on the geolocation thread. | 100 // Only to be used on the geolocation thread. |
100 std::unique_ptr<LocationProvider> arbitrator_; | 101 std::unique_ptr<LocationProvider> arbitrator_; |
101 | 102 |
102 DISALLOW_COPY_AND_ASSIGN(GeolocationProviderImpl); | 103 DISALLOW_COPY_AND_ASSIGN(GeolocationProviderImpl); |
103 }; | 104 }; |
104 | 105 |
105 } // namespace device | 106 } // namespace device |
106 | 107 |
107 #endif // DEVICE_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ | 108 #endif // DEVICE_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ |
OLD | NEW |