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

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

Issue 1631223003: [DevTools] Do not use OverridesSupport anywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/DeviceModeModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
index e90169c98464a6246ccfaf2679946565b80553ae..4688650b6bd27e9777110cfc862d2a5c8d75b41a 100644
--- a/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/emulation/DeviceModeModel.js
@@ -95,6 +95,17 @@ WebInspector.DeviceModeModel.deviceSizeValidator = function(value)
return WebInspector.UIString("Value must be positive integer");
}
+/**
+ * @param {string} value
+ * @return {string}
+ */
+WebInspector.DeviceModeModel.deviceScaleFactorValidator = function(value)
+{
+ if (!value || (/^[\d]+(\.\d+)?|\.\d+$/.test(value) && value >= 0 && value <= 10))
+ return "";
+ return WebInspector.UIString("Value must be non-negative float");
+}
+
WebInspector.DeviceModeModel._touchEventsScriptIdSymbol = Symbol("DeviceModeModel.touchEventsScriptIdSymbol");
WebInspector.DeviceModeModel._defaultMobileUserAgent = "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36";
WebInspector.DeviceModeModel._defaultMobileScaleFactor = 2;

Powered by Google App Engine
This is Rietveld 408576698