Revert "Fix broken channel icon in chrome://help on CrOS" and try again
[chromium-blink-merge.git] / ios / chrome / browser / geolocation / location_manager.h
blob1af7b5cb64fbc750c2589d21f53c5be09266e62c
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
3 // found in the LICENSE file.
5 #ifndef IOS_CHROME_BROWSER_GEOLOCATION_LOCATION_MANAGER_H_
6 #define IOS_CHROME_BROWSER_GEOLOCATION_LOCATION_MANAGER_H_
8 #import <CoreLocation/CoreLocation.h>
9 #import <Foundation/Foundation.h>
11 @class LocationManager;
13 // Defines the methods to be implemented by a delegate of a LocationManager
14 // instance.
15 @protocol LocationManagerDelegate
17 // Notifies the delegate that the application's authorization status changed.
18 - (void)locationManagerDidChangeAuthorizationStatus:
19 (LocationManager*)locationManager;
21 @end
23 // Manages fetching and updating the current device location.
24 @interface LocationManager : NSObject
26 // The application’s authorization status for using location services. This
27 // proxies |[CLLocationManager authorizationStatus]|, so that we can write unit
28 // tests for client classes by mocking this class.
29 @property(nonatomic, readonly) CLAuthorizationStatus authorizationStatus;
31 // Returns the most recently fetched location.
32 @property(nonatomic, readonly) CLLocation* currentLocation;
34 // The delegate object for this instance of LocationManager.
35 @property(nonatomic, assign) id<LocationManagerDelegate> delegate;
37 // Boolean value indicating whether location services are enabled on the
38 // device. This proxies |[CLLocationManager locationServicesEnabled]|, so that
39 // we can write unit tests for client classes by mocking this class.
40 @property(nonatomic, readonly) BOOL locationServicesEnabled;
42 // Starts updating device location if needed.
43 - (void)startUpdatingLocation;
45 // Stops updating device location.
46 - (void)stopUpdatingLocation;
48 @end
50 #endif // IOS_CHROME_BROWSER_GEOLOCATION_LOCATION_MANAGER_H_