| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_ | 5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_ | 6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" |
| 10 |
| 9 struct Geoposition; | 11 struct Geoposition; |
| 10 | 12 |
| 11 // This interface is implemented by observers of GeolocationProvider as | 13 // This interface is implemented by observers of GeolocationProvider as |
| 12 // well as GeolocationProvider itself as an observer of GeolocationArbitrator. | 14 // well as GeolocationProvider itself as an observer of GeolocationArbitrator. |
| 13 class GeolocationObserver { | 15 class GeolocationObserver { |
| 14 public: | 16 public: |
| 15 // This will be called whenever the 'best available' location is updated, | 17 // This will be called whenever the 'best available' location is updated, |
| 16 // or when an error is encountered meaning no location data will be | 18 // or when an error is encountered meaning no location data will be |
| 17 // available in the forseeable future. | 19 // available in the forseeable future. |
| 18 virtual void OnLocationUpdate(const Geoposition& position) = 0; | 20 virtual void OnLocationUpdate(const Geoposition& position) = 0; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 39 it != options_map.end(); ++it) { | 41 it != options_map.end(); ++it) { |
| 40 if (it->second.use_high_accuracy) | 42 if (it->second.use_high_accuracy) |
| 41 return GeolocationObserverOptions(true); | 43 return GeolocationObserverOptions(true); |
| 42 } | 44 } |
| 43 return GeolocationObserverOptions(false); | 45 return GeolocationObserverOptions(false); |
| 44 } | 46 } |
| 45 | 47 |
| 46 bool use_high_accuracy; | 48 bool use_high_accuracy; |
| 47 }; | 49 }; |
| 48 | 50 |
| 49 #endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_ | 51 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_ |
| OLD | NEW |