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

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

Issue 2809783004: Revert of Geolocation: rename Geoposition to Position to follow Spec (Closed)
Patch Set: 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 b582878c5353f294a9eaf1cf5bb5f2fd28baf543..1bf384733706f7a510088a610b0d5111ae15e6c3 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
@@ -52,7 +52,8 @@
const char kFramelessDocumentErrorMessage[] =
"Geolocation cannot be used in frameless documents";
-Position* CreatePosition(const device::mojom::blink::Geoposition& position) {
+Geoposition* CreateGeoposition(
+ const device::mojom::blink::Geoposition& position) {
Coordinates* coordinates = Coordinates::Create(
position.latitude, position.longitude,
// Lowest point on land is at approximately -400 meters.
@@ -60,8 +61,8 @@
position.altitude_accuracy >= 0., position.altitude_accuracy,
position.heading >= 0. && position.heading <= 360., position.heading,
position.speed >= 0., position.speed);
- return Position::Create(coordinates,
- ConvertSecondsToDOMTimeStamp(position.timestamp));
+ return Geoposition::Create(coordinates,
+ ConvertSecondsToDOMTimeStamp(position.timestamp));
}
PositionError* CreatePositionError(
@@ -336,7 +337,7 @@
}
void Geolocation::SendPosition(GeoNotifierVector& notifiers,
- Position* position) {
+ Geoposition* position) {
for (GeoNotifier* notifier : notifiers)
notifier->RunSuccessCallback(position);
}
@@ -536,7 +537,7 @@
device::mojom::blink::GeopositionPtr position) {
disconnected_geolocation_service_ = false;
if (position->valid) {
- last_position_ = CreatePosition(*position);
+ last_position_ = CreateGeoposition(*position);
PositionChanged();
} else {
HandleError(

Powered by Google App Engine
This is Rietveld 408576698