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 #ifndef CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_ANDROID_H_ |
6 #define CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_ANDROID_H_ | 6 #define CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_ANDROID_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/compiler_specific.h" |
9 #include "content/browser/geolocation/location_provider.h" | 9 #include "content/browser/geolocation/location_provider.h" |
10 #include "content/public/common/geoposition.h" | 10 #include "content/public/common/geoposition.h" |
11 | 11 |
12 class AndroidLocationApiAdapter; | 12 class AndroidLocationApiAdapter; |
13 struct Geoposition; | 13 struct Geoposition; |
14 | 14 |
15 // Location provider for Android using the platform provider over JNI. | 15 // Location provider for Android using the platform provider over JNI. |
16 class LocationProviderAndroid : public LocationProviderBase { | 16 class LocationProviderAndroid : public LocationProviderBase { |
17 public: | 17 public: |
18 LocationProviderAndroid(); | 18 LocationProviderAndroid(); |
19 virtual ~LocationProviderAndroid(); | 19 virtual ~LocationProviderAndroid(); |
20 | 20 |
21 // Called by the AndroidLocationApiAdapter. | 21 // Called by the AndroidLocationApiAdapter. |
22 void NotifyNewGeoposition(const content::Geoposition& position); | 22 void NotifyNewGeoposition(const content::Geoposition& position); |
23 | 23 |
24 // LocationProviderBase. | 24 // LocationProviderBase. |
25 virtual bool StartProvider(bool high_accuracy) OVERRIDE; | 25 virtual bool StartProvider(bool high_accuracy) OVERRIDE; |
26 virtual void StopProvider() OVERRIDE; | 26 virtual void StopProvider() OVERRIDE; |
27 virtual void GetPosition(content::Geoposition* position) OVERRIDE; | 27 virtual void GetPosition(content::Geoposition* position) OVERRIDE; |
28 virtual void UpdatePosition() OVERRIDE; | 28 virtual void UpdatePosition() OVERRIDE; |
29 virtual void OnPermissionGranted() OVERRIDE; | 29 virtual void OnPermissionGranted() OVERRIDE; |
30 | 30 |
31 private: | 31 private: |
32 content::Geoposition last_position_; | 32 content::Geoposition last_position_; |
33 }; | 33 }; |
34 | 34 |
35 #endif // CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_ANDROID_H_ | 35 #endif // CONTENT_BROWSER_GEOLOCATION_LOCATION_PROVIDER_ANDROID_H_ |
OLD | NEW |