| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "blimp/engine/feature/geolocation/engine_geolocation_feature.h" | 5 #include "blimp/engine/feature/geolocation/engine_geolocation_feature.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 public: | 24 public: |
| 25 explicit BlimpGeolocationDelegate( | 25 explicit BlimpGeolocationDelegate( |
| 26 base::WeakPtr<BlimpLocationProvider::Delegate> feature_delegate) { | 26 base::WeakPtr<BlimpLocationProvider::Delegate> feature_delegate) { |
| 27 feature_delegate_ = feature_delegate; | 27 feature_delegate_ = feature_delegate; |
| 28 } | 28 } |
| 29 | 29 |
| 30 bool UseNetworkLocationProviders() final { return false; } | 30 bool UseNetworkLocationProviders() final { return false; } |
| 31 | 31 |
| 32 std::unique_ptr<device::LocationProvider> OverrideSystemLocationProvider() | 32 std::unique_ptr<device::LocationProvider> OverrideSystemLocationProvider() |
| 33 final { | 33 final { |
| 34 return base::WrapUnique(new BlimpLocationProvider(feature_delegate_)); | 34 return base::MakeUnique<BlimpLocationProvider>(feature_delegate_); |
| 35 } | 35 } |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 base::WeakPtr<BlimpLocationProvider::Delegate> feature_delegate_; | 38 base::WeakPtr<BlimpLocationProvider::Delegate> feature_delegate_; |
| 39 | 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(BlimpGeolocationDelegate); | 40 DISALLOW_COPY_AND_ASSIGN(BlimpGeolocationDelegate); |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 device::Geoposition::ErrorCode ConvertErrorCode( | 43 device::Geoposition::ErrorCode ConvertErrorCode( |
| 44 const GeolocationErrorMessage::ErrorCode& error_code) { | 44 const GeolocationErrorMessage::ErrorCode& error_code) { |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 net::CompletionCallback()); | 148 net::CompletionCallback()); |
| 149 } | 149 } |
| 150 | 150 |
| 151 void EngineGeolocationFeature::SetUpdateCallback( | 151 void EngineGeolocationFeature::SetUpdateCallback( |
| 152 const GeopositionReceivedCallback& callback) { | 152 const GeopositionReceivedCallback& callback) { |
| 153 geoposition_received_callback_ = callback; | 153 geoposition_received_callback_ = callback; |
| 154 } | 154 } |
| 155 | 155 |
| 156 } // namespace engine | 156 } // namespace engine |
| 157 } // namespace blimp | 157 } // namespace blimp |
| OLD | NEW |