Index: ios/chrome/browser/geolocation/location_manager.h |
diff --git a/ios/chrome/browser/geolocation/location_manager.h b/ios/chrome/browser/geolocation/location_manager.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1af7b5cb64fbc750c2589d21f53c5be09266e62c |
--- /dev/null |
+++ b/ios/chrome/browser/geolocation/location_manager.h |
@@ -0,0 +1,50 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef IOS_CHROME_BROWSER_GEOLOCATION_LOCATION_MANAGER_H_ |
+#define IOS_CHROME_BROWSER_GEOLOCATION_LOCATION_MANAGER_H_ |
+ |
+#import <CoreLocation/CoreLocation.h> |
+#import <Foundation/Foundation.h> |
+ |
+@class LocationManager; |
+ |
+// Defines the methods to be implemented by a delegate of a LocationManager |
+// instance. |
+@protocol LocationManagerDelegate |
+ |
+// Notifies the delegate that the application's authorization status changed. |
+- (void)locationManagerDidChangeAuthorizationStatus: |
+ (LocationManager*)locationManager; |
+ |
+@end |
+ |
+// Manages fetching and updating the current device location. |
+@interface LocationManager : NSObject |
+ |
+// The application’s authorization status for using location services. This |
+// proxies |[CLLocationManager authorizationStatus]|, so that we can write unit |
+// tests for client classes by mocking this class. |
+@property(nonatomic, readonly) CLAuthorizationStatus authorizationStatus; |
+ |
+// Returns the most recently fetched location. |
+@property(nonatomic, readonly) CLLocation* currentLocation; |
+ |
+// The delegate object for this instance of LocationManager. |
+@property(nonatomic, assign) id<LocationManagerDelegate> delegate; |
+ |
+// Boolean value indicating whether location services are enabled on the |
+// device. This proxies |[CLLocationManager locationServicesEnabled]|, so that |
+// we can write unit tests for client classes by mocking this class. |
+@property(nonatomic, readonly) BOOL locationServicesEnabled; |
+ |
+// Starts updating device location if needed. |
+- (void)startUpdatingLocation; |
+ |
+// Stops updating device location. |
+- (void)stopUpdatingLocation; |
+ |
+@end |
+ |
+#endif // IOS_CHROME_BROWSER_GEOLOCATION_LOCATION_MANAGER_H_ |