| 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 #include "device/geolocation/location_provider_android.h" | 5 #include "device/geolocation/location_provider_android.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "device/geolocation/geoposition.h" | 9 #include "device/geolocation/geoposition.h" |
| 10 #include "device/geolocation/location_api_adapter_android.h" | 10 #include "device/geolocation/location_api_adapter_android.h" |
| 11 | 11 |
| 12 namespace device { | 12 namespace device { |
| 13 | 13 |
| 14 // LocationProviderAndroid | 14 // LocationProviderAndroid |
| 15 LocationProviderAndroid::LocationProviderAndroid() { | 15 LocationProviderAndroid::LocationProviderAndroid() {} |
| 16 } | |
| 17 | 16 |
| 18 LocationProviderAndroid::~LocationProviderAndroid() { | 17 LocationProviderAndroid::~LocationProviderAndroid() { |
| 19 StopProvider(); | 18 StopProvider(); |
| 20 } | 19 } |
| 21 | 20 |
| 22 void LocationProviderAndroid::NotifyNewGeoposition( | 21 void LocationProviderAndroid::NotifyNewGeoposition( |
| 23 const Geoposition& position) { | 22 const Geoposition& position) { |
| 24 last_position_ = position; | 23 last_position_ = position; |
| 25 NotifyCallback(last_position_); | 24 NotifyCallback(last_position_); |
| 26 } | 25 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 44 void LocationProviderAndroid::OnPermissionGranted() { | 43 void LocationProviderAndroid::OnPermissionGranted() { |
| 45 // Nothing to do here. | 44 // Nothing to do here. |
| 46 } | 45 } |
| 47 | 46 |
| 48 // static | 47 // static |
| 49 std::unique_ptr<LocationProvider> NewSystemLocationProvider() { | 48 std::unique_ptr<LocationProvider> NewSystemLocationProvider() { |
| 50 return base::WrapUnique(new LocationProviderAndroid); | 49 return base::WrapUnique(new LocationProviderAndroid); |
| 51 } | 50 } |
| 52 | 51 |
| 53 } // namespace device | 52 } // namespace device |
| OLD | NEW |