Index: blimp/engine/feature/geolocation/engine_geolocation_feature.cc |
diff --git a/blimp/engine/feature/geolocation/engine_geolocation_feature.cc b/blimp/engine/feature/geolocation/engine_geolocation_feature.cc |
index 768d3d5d742d0823f77f98bb01084a5f48d56038..5e8e9e804dba5ce9ea51916455acc0928bd6ff01 100644 |
--- a/blimp/engine/feature/geolocation/engine_geolocation_feature.cc |
+++ b/blimp/engine/feature/geolocation/engine_geolocation_feature.cc |
@@ -12,15 +12,15 @@ |
#include "blimp/common/create_blimp_message.h" |
#include "blimp/common/proto/blimp_message.pb.h" |
#include "blimp/common/proto/geolocation.pb.h" |
-#include "content/public/browser/geolocation_delegate.h" |
-#include "content/public/browser/location_provider.h" |
-#include "content/public/common/geoposition.h" |
+#include "device/geolocation/geolocation_delegate.h" |
+#include "device/geolocation/location_provider.h" |
+#include "device/geolocation/geoposition.h" |
#include "net/base/net_errors.h" |
namespace blimp { |
namespace engine { |
namespace { |
-class BlimpGeolocationDelegate : public content::GeolocationDelegate { |
+class BlimpGeolocationDelegate : public device::GeolocationDelegate { |
public: |
explicit BlimpGeolocationDelegate( |
base::WeakPtr<BlimpLocationProvider::Delegate> feature_delegate) { |
@@ -29,7 +29,7 @@ class BlimpGeolocationDelegate : public content::GeolocationDelegate { |
bool UseNetworkLocationProviders() final { return false; } |
- std::unique_ptr<content::LocationProvider> OverrideSystemLocationProvider() |
+ std::unique_ptr<device::LocationProvider> OverrideSystemLocationProvider() |
final { |
return base::WrapUnique(new BlimpLocationProvider(feature_delegate_)); |
} |
@@ -40,21 +40,21 @@ class BlimpGeolocationDelegate : public content::GeolocationDelegate { |
DISALLOW_COPY_AND_ASSIGN(BlimpGeolocationDelegate); |
}; |
-content::Geoposition::ErrorCode ConvertErrorCode( |
+device::Geoposition::ErrorCode ConvertErrorCode( |
const GeolocationErrorMessage::ErrorCode& error_code) { |
switch (error_code) { |
case GeolocationErrorMessage::PERMISSION_DENIED: |
- return content::Geoposition::ErrorCode::ERROR_CODE_PERMISSION_DENIED; |
+ return device::Geoposition::ErrorCode::ERROR_CODE_PERMISSION_DENIED; |
case GeolocationErrorMessage::POSITION_UNAVAILABLE: |
- return content::Geoposition::ErrorCode::ERROR_CODE_POSITION_UNAVAILABLE; |
+ return device::Geoposition::ErrorCode::ERROR_CODE_POSITION_UNAVAILABLE; |
case GeolocationErrorMessage::TIMEOUT: |
- return content::Geoposition::ErrorCode::ERROR_CODE_TIMEOUT; |
+ return device::Geoposition::ErrorCode::ERROR_CODE_TIMEOUT; |
} |
} |
-content::Geoposition ConvertLocationMessage( |
+device::Geoposition ConvertLocationMessage( |
const GeolocationCoordinatesMessage& coordinates) { |
- content::Geoposition output; |
+ device::Geoposition output; |
output.latitude = coordinates.latitude(); |
output.longitude = coordinates.longitude(); |
output.altitude = coordinates.altitude(); |
@@ -63,7 +63,7 @@ content::Geoposition ConvertLocationMessage( |
output.heading = coordinates.heading(); |
output.speed = coordinates.speed(); |
output.timestamp = base::Time::Now(); |
- output.error_code = content::Geoposition::ErrorCode::ERROR_CODE_NONE; |
+ output.error_code = device::Geoposition::ErrorCode::ERROR_CODE_NONE; |
return output; |
} |
@@ -79,7 +79,7 @@ void EngineGeolocationFeature::set_outgoing_message_processor( |
outgoing_message_processor_ = std::move(message_processor); |
} |
-content::GeolocationDelegate* |
+device::GeolocationDelegate* |
EngineGeolocationFeature::CreateGeolocationDelegate() { |
return new BlimpGeolocationDelegate(weak_factory_.GetWeakPtr()); |
} |
@@ -95,14 +95,14 @@ void EngineGeolocationFeature::ProcessMessage( |
case GeolocationMessage::kCoordinates: { |
const GeolocationCoordinatesMessage& location = |
geolocation_message.coordinates(); |
- content::Geoposition output = ConvertLocationMessage(location); |
+ device::Geoposition output = ConvertLocationMessage(location); |
NotifyCallback(output); |
break; |
} |
case GeolocationMessage::kError: { |
const GeolocationErrorMessage& error_message = |
geolocation_message.error(); |
- content::Geoposition output; |
+ device::Geoposition output; |
output.error_message = error_message.error_message(); |
output.error_code = ConvertErrorCode(error_message.error_code()); |
NotifyCallback(output); |
@@ -119,7 +119,7 @@ void EngineGeolocationFeature::ProcessMessage( |
} |
void EngineGeolocationFeature::NotifyCallback( |
- const content::Geoposition& position) { |
+ const device::Geoposition& position) { |
geoposition_received_callback_.Run(position); |
} |