OLD | NEW |
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 (function() { | 5 (function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * The duration in ms of a background flash when a user touches the fingerprint | 9 * The duration in ms of a background flash when a user touches the fingerprint |
10 * sensor on this page. | 10 * sensor on this page. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 this.browserProxy_.endCurrentAuthentication(); | 55 this.browserProxy_.endCurrentAuthentication(); |
56 }, | 56 }, |
57 | 57 |
58 /** | 58 /** |
59 * Overridden from settings.RouteObserverBehavior. | 59 * Overridden from settings.RouteObserverBehavior. |
60 * @param {!settings.Route} newRoute | 60 * @param {!settings.Route} newRoute |
61 * @param {!settings.Route} oldRoute | 61 * @param {!settings.Route} oldRoute |
62 * @protected | 62 * @protected |
63 */ | 63 */ |
64 currentRouteChanged: function(newRoute, oldRoute) { | 64 currentRouteChanged: function(newRoute, oldRoute) { |
65 if (newRoute != settings.Route.FINGERPRINT) { | 65 if (newRoute != settings.routes.FINGERPRINT) { |
66 if (this.browserProxy_) | 66 if (this.browserProxy_) |
67 this.browserProxy_.endCurrentAuthentication(); | 67 this.browserProxy_.endCurrentAuthentication(); |
68 } else if (oldRoute == settings.Route.LOCK_SCREEN) { | 68 } else if (oldRoute == settings.routes.LOCK_SCREEN) { |
69 // Start fingerprint authentication when going from LOCK_SCREEN to | 69 // Start fingerprint authentication when going from LOCK_SCREEN to |
70 // FINGERPRINT page. | 70 // FINGERPRINT page. |
71 this.browserProxy_.startAuthentication(); | 71 this.browserProxy_.startAuthentication(); |
72 } | 72 } |
73 }, | 73 }, |
74 | 74 |
75 /** | 75 /** |
76 * Sends a ripple when the user taps the sensor with a registered fingerprint. | 76 * Sends a ripple when the user taps the sensor with a registered fingerprint. |
77 * @param {!settings.FingerprintAttempt} fingerprintAttempt | 77 * @param {!settings.FingerprintAttempt} fingerprintAttempt |
78 * @private | 78 * @private |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 this.browserProxy_.startAuthentication(); | 159 this.browserProxy_.startAuthentication(); |
160 }, | 160 }, |
161 | 161 |
162 /** | 162 /** |
163 * Close the setup fingerprint dialog when the screen is unlocked. | 163 * Close the setup fingerprint dialog when the screen is unlocked. |
164 * @param {boolean} screenIsLocked | 164 * @param {boolean} screenIsLocked |
165 * @private | 165 * @private |
166 */ | 166 */ |
167 onScreenLocked_: function(screenIsLocked) { | 167 onScreenLocked_: function(screenIsLocked) { |
168 if (!screenIsLocked && | 168 if (!screenIsLocked && |
169 settings.getCurrentRoute() == settings.Route.FINGERPRINT) { | 169 settings.getCurrentRoute() == settings.routes.FINGERPRINT) { |
170 this.onSetupFingerprintDialogClose_(); | 170 this.onSetupFingerprintDialogClose_(); |
171 } | 171 } |
172 }, | 172 }, |
173 }); | 173 }); |
174 })(); | 174 })(); |
OLD | NEW |