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

Unified Diff: chrome/browser/resources/settings/people_page/lock_screen.js

Issue 2973243002: Adding pref to store the user-selected proximity threshold. (Closed)
Patch Set: Addressing DEPS issues Created 3 years, 5 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: chrome/browser/resources/settings/people_page/lock_screen.js
diff --git a/chrome/browser/resources/settings/people_page/lock_screen.js b/chrome/browser/resources/settings/people_page/lock_screen.js
index f5b62a7980d04b2c8fd21871d1b603a0ba95829a..4c046e29b46d895d93c0823f13055af2b327c1df 100644
--- a/chrome/browser/resources/settings/people_page/lock_screen.js
+++ b/chrome/browser/resources/settings/people_page/lock_screen.js
@@ -14,6 +14,18 @@
* </settings-lock-screen>
*/
+/**
+ * Possible values of the proximity threshould displayed to the user.
+ * This should be kept in sync with the enum defined here:
+ * components/proximity_auth/proximity_monitor_impl.cc
+ */
+settings.EasyUnlockProximityThreshold = {
+ VERY_CLOSE: 0,
+ CLOSE: 1,
+ FAR: 2,
+ VERY_FAR: 3,
+};
+
Polymer({
is: 'settings-lock-screen',
@@ -118,6 +130,36 @@ Polymer({
readOnly: true,
},
+ /**
+ * Returns the proximity threshold mapping to be displayed in the
+ * threshold selector dropdown menu.
stevenjb 2017/07/17 16:43:37 * @type {DropdownMenuOptionList} (You will need t
sacomoto 2017/07/20 19:50:15 Done.
+ */
+ easyUnlockProximityThresholdMapping_: {
+ type: Array,
+ value: function() {
+ return [
+ {
+ value: settings.EasyUnlockProximityThreshold.VERY_CLOSE,
+ name:
+ loadTimeData.getString('easyUnlockProximityThresholdVeryClose')
+ },
+ {
+ value: settings.EasyUnlockProximityThreshold.CLOSE,
+ name: loadTimeData.getString('easyUnlockProximityThresholdClose')
+ },
+ {
+ value: settings.EasyUnlockProximityThreshold.FAR,
+ name: loadTimeData.getString('easyUnlockProximityThresholdFar')
+ },
+ {
+ value: settings.EasyUnlockProximityThreshold.VERY_FAR,
+ name: loadTimeData.getString('easyUnlockProximityThresholdVeryFar')
+ }
+ ];
+ },
+ readOnly: true,
+ },
+
/** @private */
showEasyUnlockTurnOffDialog_: {
type: Boolean,

Powered by Google App Engine
This is Rietveld 408576698