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 CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ |
6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ | 6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 class CONTENT_EXPORT GeolocationProviderImpl | 34 class CONTENT_EXPORT GeolocationProviderImpl |
35 : public NON_EXPORTED_BASE(GeolocationProvider), | 35 : public NON_EXPORTED_BASE(GeolocationProvider), |
36 public base::Thread { | 36 public base::Thread { |
37 public: | 37 public: |
38 // GeolocationProvider implementation: | 38 // GeolocationProvider implementation: |
39 virtual void AddLocationUpdateCallback(const LocationUpdateCallback& callback, | 39 virtual void AddLocationUpdateCallback(const LocationUpdateCallback& callback, |
40 bool use_high_accuracy) OVERRIDE; | 40 bool use_high_accuracy) OVERRIDE; |
41 virtual bool RemoveLocationUpdateCallback( | 41 virtual bool RemoveLocationUpdateCallback( |
42 const LocationUpdateCallback& callback) OVERRIDE; | 42 const LocationUpdateCallback& callback) OVERRIDE; |
43 virtual void UserDidOptIntoLocationServices() OVERRIDE; | 43 virtual void UserDidOptIntoLocationServices() OVERRIDE; |
| 44 virtual void PauseAllLocationUpdateCallbacks() OVERRIDE; |
| 45 virtual void ResumeAllLocationUpdateCallbacks() OVERRIDE; |
44 | 46 |
45 bool LocationServicesOptedIn() const; | 47 bool LocationServicesOptedIn() const; |
46 | 48 |
47 // Overrides the location for automation/testing. Suppresses any further | 49 // Overrides the location for automation/testing. Suppresses any further |
48 // updates from the actual providers and sends an update with the overridden | 50 // updates from the actual providers and sends an update with the overridden |
49 // position to all registered clients. | 51 // position to all registered clients. |
50 void OverrideLocationForTesting(const Geoposition& override_position); | 52 void OverrideLocationForTesting(const Geoposition& override_position); |
51 | 53 |
52 // Callback from the LocationArbitrator. Public for testing. | 54 // Callback from the LocationArbitrator. Public for testing. |
53 void OnLocationUpdate(const Geoposition& position); | 55 void OnLocationUpdate(const Geoposition& position); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 106 |
105 // Only to be used on the geolocation thread. | 107 // Only to be used on the geolocation thread. |
106 LocationArbitrator* arbitrator_; | 108 LocationArbitrator* arbitrator_; |
107 | 109 |
108 DISALLOW_COPY_AND_ASSIGN(GeolocationProviderImpl); | 110 DISALLOW_COPY_AND_ASSIGN(GeolocationProviderImpl); |
109 }; | 111 }; |
110 | 112 |
111 } // namespace content | 113 } // namespace content |
112 | 114 |
113 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ | 115 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ |
OLD | NEW |