OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_PUBLIC_PROVIDER_CHROME_BROWSER_GEOLOCATION_UPDATER_H | 5 #ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_GEOLOCATION_UPDATER_H |
6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_GEOLOCATION_UPDATER_H | 6 #define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_GEOLOCATION_UPDATER_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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 namespace ios { | 50 namespace ios { |
51 | 51 |
52 class GeolocationUpdaterProvider { | 52 class GeolocationUpdaterProvider { |
53 public: | 53 public: |
54 GeolocationUpdaterProvider(); | 54 GeolocationUpdaterProvider(); |
55 virtual ~GeolocationUpdaterProvider(); | 55 virtual ~GeolocationUpdaterProvider(); |
56 | 56 |
57 // Creates a new GeolocationUpdater. | 57 // Creates a new GeolocationUpdater. |
58 // The returned object is retained and it is the responsability of the caller | 58 // The returned object is retained and it is the responsability of the caller |
59 // to release it. | 59 // to release it. |
60 virtual id<GeolocationUpdater> CreateGeolocationUpdater(bool enabled); | 60 virtual id<GeolocationUpdater> CreateGeolocationUpdater(bool enabled) |
| 61 NS_RETURNS_RETAINED; |
61 | 62 |
62 // Notification names: | 63 // Notification names: |
63 | 64 |
64 // Name of NSNotificationCenter notification posted on user location update. | 65 // Name of NSNotificationCenter notification posted on user location update. |
65 // Passes a |CLLocation| for the new location in the userInfo dictionary with | 66 // Passes a |CLLocation| for the new location in the userInfo dictionary with |
66 // the key returned by GetUpdateNewLocationKey(). | 67 // the key returned by GetUpdateNewLocationKey(). |
67 virtual NSString* GetUpdateNotificationName(); | 68 virtual NSString* GetUpdateNotificationName(); |
68 // Name of NSNotificationCenter notification posted on when the location | 69 // Name of NSNotificationCenter notification posted on when the location |
69 // manager's stops. | 70 // manager's stops. |
70 virtual NSString* GetStopNotificationName(); | 71 virtual NSString* GetStopNotificationName(); |
71 // Name of NSNotificationCenter notification posted when the location | 72 // Name of NSNotificationCenter notification posted when the location |
72 // manager's authorization status changes. For example when the user turns | 73 // manager's authorization status changes. For example when the user turns |
73 // off Locations Services in Settings. The new status is passed as a | 74 // off Locations Services in Settings. The new status is passed as a |
74 // |NSNumber| representing the |CLAuthorizationStatus| enum value. | 75 // |NSNumber| representing the |CLAuthorizationStatus| enum value. |
75 virtual NSString* GetAuthorizationChangeNotificationName(); | 76 virtual NSString* GetAuthorizationChangeNotificationName(); |
76 | 77 |
77 // Notification keys: | 78 // Notification keys: |
78 | 79 |
79 // Key used in the userInfo dictionaries of this class' notifications. | 80 // Key used in the userInfo dictionaries of this class' notifications. |
80 // Contains a |CLLocation *| and is used in the update notification. | 81 // Contains a |CLLocation *| and is used in the update notification. |
81 virtual NSString* GetUpdateNewLocationKey(); | 82 virtual NSString* GetUpdateNewLocationKey(); |
82 | 83 |
83 private: | 84 private: |
84 DISALLOW_COPY_AND_ASSIGN(GeolocationUpdaterProvider); | 85 DISALLOW_COPY_AND_ASSIGN(GeolocationUpdaterProvider); |
85 }; | 86 }; |
86 | 87 |
87 } // namespace ios | 88 } // namespace ios |
88 | 89 |
89 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_GEOLOCATION_UPDATER_H | 90 #endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_GEOLOCATION_UPDATER_H |
OLD | NEW |