OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file declares a CoreLocation provider that runs on Mac OS X (10.6). | 5 // This file declares a CoreLocation provider that runs on Mac OS X (10.6). |
6 // Public for testing only - for normal usage this header should not be | 6 // Public for testing only - for normal usage this header should not be |
7 // required, as location_provider.h declares the needed factory function. | 7 // required, as location_provider.h declares the needed factory function. |
8 | 8 |
9 #ifndef CONTENT_BROWSER_GEOLOCATION_CORE_LOCATION_PROVIDER_MAC_H_ | 9 #ifndef CONTENT_BROWSER_GEOLOCATION_CORE_LOCATION_PROVIDER_MAC_H_ |
10 #define CONTENT_BROWSER_GEOLOCATION_CORE_LOCATION_PROVIDER_MAC_H_ | 10 #define CONTENT_BROWSER_GEOLOCATION_CORE_LOCATION_PROVIDER_MAC_H_ |
11 #pragma once | |
12 | 11 |
13 #include "content/browser/geolocation/location_provider.h" | 12 #include "content/browser/geolocation/location_provider.h" |
14 #include "content/public/common/geoposition.h" | 13 #include "content/public/common/geoposition.h" |
15 | 14 |
16 class CoreLocationDataProviderMac; | 15 class CoreLocationDataProviderMac; |
17 | 16 |
18 class CoreLocationProviderMac : public LocationProviderBase { | 17 class CoreLocationProviderMac : public LocationProviderBase { |
19 public: | 18 public: |
20 explicit CoreLocationProviderMac(); | 19 explicit CoreLocationProviderMac(); |
21 virtual ~CoreLocationProviderMac(); | 20 virtual ~CoreLocationProviderMac(); |
22 | 21 |
23 // LocationProvider | 22 // LocationProvider |
24 virtual bool StartProvider(bool high_accuracy) OVERRIDE; | 23 virtual bool StartProvider(bool high_accuracy) OVERRIDE; |
25 virtual void StopProvider() OVERRIDE; | 24 virtual void StopProvider() OVERRIDE; |
26 virtual void GetPosition(content::Geoposition* position) OVERRIDE; | 25 virtual void GetPosition(content::Geoposition* position) OVERRIDE; |
27 | 26 |
28 // Receives new positions and calls UpdateListeners | 27 // Receives new positions and calls UpdateListeners |
29 void SetPosition(content::Geoposition* position); | 28 void SetPosition(content::Geoposition* position); |
30 | 29 |
31 private: | 30 private: |
32 bool is_updating_; | 31 bool is_updating_; |
33 CoreLocationDataProviderMac* data_provider_; | 32 CoreLocationDataProviderMac* data_provider_; |
34 content::Geoposition position_; | 33 content::Geoposition position_; |
35 }; | 34 }; |
36 | 35 |
37 #endif // CONTENT_BROWSER_GEOLOCATION_CORE_LOCATION_PROVIDER_MAC_H_ | 36 #endif // CONTENT_BROWSER_GEOLOCATION_CORE_LOCATION_PROVIDER_MAC_H_ |
OLD | NEW |