Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: ios/chrome/browser/geolocation/location_manager.h

Issue 1103293002: [iOS] Upstream iOS geolocation code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_
« no previous file with comments | « ios/chrome/browser/geolocation/CLLocation+XGeoHeaderTest.mm ('k') | ios/chrome/browser/geolocation/location_manager.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698