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

Side by Side Diff: chrome/browser/resources/settings/people_page/lock_screen.js

Issue 2676763002: MD Settings: Put fingerprints on its own subpage. (Closed)
Patch Set: Fixed patch set 1 errors. Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-lock-screen' allows the user to change how they unlock their 7 * 'settings-lock-screen' allows the user to change how they unlock their
8 * device. 8 * device.
9 * 9 *
10 * Example: 10 * Example:
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 }, 76 },
77 77
78 /** selectedUnlockType is defined in LockStateBehavior. */ 78 /** selectedUnlockType is defined in LockStateBehavior. */
79 observers: ['selectedUnlockTypeChanged_(selectedUnlockType)'], 79 observers: ['selectedUnlockTypeChanged_(selectedUnlockType)'],
80 80
81 /** @override */ 81 /** @override */
82 attached: function() { 82 attached: function() {
83 // currentRouteChanged is not called during the initial navigation. If the 83 // currentRouteChanged is not called during the initial navigation. If the
84 // user navigates directly to the lockScreen page, we still want to show the 84 // user navigates directly to the lockScreen page, we still want to show the
85 // password prompt page. 85 // password prompt page.
86 this.currentRouteChanged(); 86 this.currentRouteChanged(settings.Route.LOCK_SCREEN,
87 settings.Route.LOCK_SCREEN);
87 }, 88 },
88 89
89 /** 90 /**
90 * Overridden from settings.RouteObserverBehavior. 91 * Overridden from settings.RouteObserverBehavior.
92 * @param {!settings.Route} newRoute
93 * @param {!settings.Route} oldRoute
91 * @protected 94 * @protected
92 */ 95 */
93 currentRouteChanged: function() { 96 currentRouteChanged: function(newRoute, oldRoute) {
94 if (settings.getCurrentRoute() == settings.Route.LOCK_SCREEN && 97 if (newRoute == settings.Route.LOCK_SCREEN && !this.setModes_) {
95 !this.setModes_) {
96 this.$.passwordPrompt.open(); 98 this.$.passwordPrompt.open();
97 } else { 99 } else if (newRoute != settings.Route.FINGERPRINT &&
100 oldRoute != settings.Route.FINGERPRINT) {
98 // If the user navigated away from the lock screen settings page they will 101 // If the user navigated away from the lock screen settings page they will
99 // have to re-enter their password. 102 // have to re-enter their password. An exception is if they are navigating
103 // to or from the fingerprint subpage.
100 this.setModes_ = undefined; 104 this.setModes_ = undefined;
101 } 105 }
102 }, 106 },
103 107
104 /** 108 /**
105 * Called when the unlock type has changed. 109 * Called when the unlock type has changed.
106 * @param {!string} selected The current unlock type. 110 * @param {!string} selected The current unlock type.
107 * @private 111 * @private
108 */ 112 */
109 selectedUnlockTypeChanged_: function(selected) { 113 selectedUnlockTypeChanged_: function(selected) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 160
157 /** 161 /**
158 * @param {!Event} e 162 * @param {!Event} e
159 * @private 163 * @private
160 */ 164 */
161 onConfigurePin_: function(e) { 165 onConfigurePin_: function(e) {
162 e.preventDefault(); 166 e.preventDefault();
163 this.$.setupPin.open(); 167 this.$.setupPin.open();
164 this.writeUma_(LockScreenProgress.CHOOSE_PIN_OR_PASSWORD); 168 this.writeUma_(LockScreenProgress.CHOOSE_PIN_OR_PASSWORD);
165 }, 169 },
170
171 /** @private */
172 onEditFingerprints_: function() {
173 settings.navigateTo(settings.Route.FINGERPRINT);
174 },
166 }); 175 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698