Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 IOS_CHROME_BROWSER_GEOLOCATION_LOCATION_MANAGER_H_ | 5 #ifndef IOS_CHROME_BROWSER_GEOLOCATION_LOCATION_MANAGER_H_ |
| 6 #define IOS_CHROME_BROWSER_GEOLOCATION_LOCATION_MANAGER_H_ | 6 #define IOS_CHROME_BROWSER_GEOLOCATION_LOCATION_MANAGER_H_ |
| 7 | 7 |
| 8 #import <CoreLocation/CoreLocation.h> | 8 #import <CoreLocation/CoreLocation.h> |
| 9 #import <Foundation/Foundation.h> | 9 #import <Foundation/Foundation.h> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 22 | 22 |
| 23 // Manages fetching and updating the current device location. | 23 // Manages fetching and updating the current device location. |
| 24 @interface LocationManager : NSObject | 24 @interface LocationManager : NSObject |
| 25 | 25 |
| 26 // The application’s authorization status for using location services. This | 26 // The application’s authorization status for using location services. This |
| 27 // proxies |[CLLocationManager authorizationStatus]|, so that we can write unit | 27 // proxies |[CLLocationManager authorizationStatus]|, so that we can write unit |
| 28 // tests for client classes by mocking this class. | 28 // tests for client classes by mocking this class. |
| 29 @property(nonatomic, readonly) CLAuthorizationStatus authorizationStatus; | 29 @property(nonatomic, readonly) CLAuthorizationStatus authorizationStatus; |
| 30 | 30 |
| 31 // Returns the most recently fetched location. | 31 // Returns the most recently fetched location. |
| 32 @property(nonatomic, readonly) CLLocation* currentLocation; | 32 @property(weak, nonatomic, readonly) CLLocation* currentLocation; |
|
sdefresne
2016/11/25 10:16:46
This is backed by a scoped_nsobject<>. I think it
stkhapugin
2016/11/25 14:57:16
Done.
| |
| 33 | 33 |
| 34 // The delegate object for this instance of LocationManager. | 34 // The delegate object for this instance of LocationManager. |
| 35 @property(nonatomic, assign) id<LocationManagerDelegate> delegate; | 35 @property(nonatomic, weak) id<LocationManagerDelegate> delegate; |
| 36 | 36 |
| 37 // Boolean value indicating whether location services are enabled on the | 37 // Boolean value indicating whether location services are enabled on the |
| 38 // device. This proxies |[CLLocationManager locationServicesEnabled]|, so that | 38 // device. This proxies |[CLLocationManager locationServicesEnabled]|, so that |
| 39 // we can write unit tests for client classes by mocking this class. | 39 // we can write unit tests for client classes by mocking this class. |
| 40 @property(nonatomic, readonly) BOOL locationServicesEnabled; | 40 @property(nonatomic, readonly) BOOL locationServicesEnabled; |
| 41 | 41 |
| 42 // Starts updating device location if needed. | 42 // Starts updating device location if needed. |
| 43 - (void)startUpdatingLocation; | 43 - (void)startUpdatingLocation; |
| 44 | 44 |
| 45 // Stops updating device location. | 45 // Stops updating device location. |
| 46 - (void)stopUpdatingLocation; | 46 - (void)stopUpdatingLocation; |
| 47 | 47 |
| 48 @end | 48 @end |
| 49 | 49 |
| 50 #endif // IOS_CHROME_BROWSER_GEOLOCATION_LOCATION_MANAGER_H_ | 50 #endif // IOS_CHROME_BROWSER_GEOLOCATION_LOCATION_MANAGER_H_ |
| OLD | NEW |