Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Unified Diff: third_party/WebKit/Source/modules/geolocation/Geolocation.cpp

Issue 2809843002: Geolocation: rename Geoposition to Position to follow Spec (Closed)
Patch Set: position-string-expected.txt Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
index 1bf384733706f7a510088a610b0d5111ae15e6c3..b582878c5353f294a9eaf1cf5bb5f2fd28baf543 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
@@ -52,8 +52,7 @@ const char kFailedToStartServiceErrorMessage[] =
const char kFramelessDocumentErrorMessage[] =
"Geolocation cannot be used in frameless documents";
-Geoposition* CreateGeoposition(
- const device::mojom::blink::Geoposition& position) {
+Position* CreatePosition(const device::mojom::blink::Geoposition& position) {
Coordinates* coordinates = Coordinates::Create(
position.latitude, position.longitude,
// Lowest point on land is at approximately -400 meters.
@@ -61,8 +60,8 @@ Geoposition* CreateGeoposition(
position.altitude_accuracy >= 0., position.altitude_accuracy,
position.heading >= 0. && position.heading <= 360., position.heading,
position.speed >= 0., position.speed);
- return Geoposition::Create(coordinates,
- ConvertSecondsToDOMTimeStamp(position.timestamp));
+ return Position::Create(coordinates,
+ ConvertSecondsToDOMTimeStamp(position.timestamp));
}
PositionError* CreatePositionError(
@@ -337,7 +336,7 @@ void Geolocation::SendError(GeoNotifierVector& notifiers,
}
void Geolocation::SendPosition(GeoNotifierVector& notifiers,
- Geoposition* position) {
+ Position* position) {
for (GeoNotifier* notifier : notifiers)
notifier->RunSuccessCallback(position);
}
@@ -537,7 +536,7 @@ void Geolocation::OnPositionUpdated(
device::mojom::blink::GeopositionPtr position) {
disconnected_geolocation_service_ = false;
if (position->valid) {
- last_position_ = CreateGeoposition(*position);
+ last_position_ = CreatePosition(*position);
PositionChanged();
} else {
HandleError(

Powered by Google App Engine
This is Rietveld 408576698