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

Unified Diff: third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js

Issue 1917543002: DevTools: Update styles for sensors drawer panel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: UI update for sensors panel Created 4 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/devtools/front_end/emulation/Geolocation.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js b/third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js
index 208ecdc2c6eda8924cd87acd225926875505b4f2..c0ec25e9b923eb1fd27dffa4387c89ceace1ea76 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/Geolocation.js
@@ -74,8 +74,8 @@ WebInspector.Geolocation.parseUserInput = function(latitudeString, longitudeStri
var latitude = isLatitudeValid ? parseFloat(latitudeString) : -1;
var longitude = isLongitudeValid ? parseFloat(longitudeString) : -1;
-
- return new WebInspector.Geolocation(latitude, longitude, errorStatus ? "PositionUnavailable" : "");
+ var error = errorStatus ? WebInspector.Geolocation.Error.PositionUnavailable : WebInspector.Geolocation.Error.None;
+ return new WebInspector.Geolocation(latitude, longitude, error);
}
/**
@@ -95,3 +95,8 @@ WebInspector.Geolocation.longitudeValidator = function(value)
{
return !value || (/^([+-]?[\d]+(\.\d+)?|[+-]?\.\d+)$/.test(value) && value >= -180 && value <= 180);
}
+
+WebInspector.Geolocation.Error = {
lushnikov 2016/04/23 00:19:46 /** @enum {string} */
luoe 2016/04/25 19:26:41 Done.
+ None: "",
lushnikov 2016/04/23 00:19:46 None: "None",
luoe 2016/04/25 19:26:41 Okay. I've also updated another line from: if (th
+ PositionUnavailable: "PositionUnavailable"
+}

Powered by Google App Engine
This is Rietveld 408576698