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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 this.fingerprints_ = fingerprintInfo.fingerprintsList.slice(); | 119 this.fingerprints_ = fingerprintInfo.fingerprintsList.slice(); |
120 this.$$('.action-button').disabled = fingerprintInfo.isMaxed; | 120 this.$$('.action-button').disabled = fingerprintInfo.isMaxed; |
121 }, | 121 }, |
122 | 122 |
123 /** | 123 /** |
124 * Deletes a fingerprint from |fingerprints_|. | 124 * Deletes a fingerprint from |fingerprints_|. |
125 * @param {!{model: !{index: !number}}} e | 125 * @param {!{model: !{index: !number}}} e |
126 * @private | 126 * @private |
127 */ | 127 */ |
128 onFingerprintDeleteTapped_: function(e) { | 128 onFingerprintDeleteTapped_: function(e) { |
129 this.browserProxy_.removeEnrollment(e.model.index).then(function(success) { | 129 this.browserProxy_.removeEnrollment(e.model.index).then(success => { |
130 if (success) | 130 if (success) |
131 this.updateFingerprintsList_(); | 131 this.updateFingerprintsList_(); |
132 }.bind(this)); | 132 }); |
133 }, | 133 }, |
134 | 134 |
135 /** | 135 /** |
136 * @param {!{model: !{index: !number, item: !string}}} e | 136 * @param {!{model: !{index: !number, item: !string}}} e |
137 * @private | 137 * @private |
138 */ | 138 */ |
139 onFingerprintLabelChanged_: function(e) { | 139 onFingerprintLabelChanged_: function(e) { |
140 this.browserProxy_.changeEnrollmentLabel(e.model.index, e.model.item) | 140 this.browserProxy_.changeEnrollmentLabel(e.model.index, e.model.item) |
141 .then(function(success) { | 141 .then(success => { |
142 if (success) | 142 if (success) |
143 this.updateFingerprintsList_(); | 143 this.updateFingerprintsList_(); |
144 }.bind(this)); | 144 }); |
145 }, | 145 }, |
146 | 146 |
147 /** | 147 /** |
148 * Opens the setup fingerprint dialog. | 148 * Opens the setup fingerprint dialog. |
149 * @private | 149 * @private |
150 */ | 150 */ |
151 openAddFingerprintDialog_: function() { | 151 openAddFingerprintDialog_: function() { |
152 this.showSetupFingerprintDialog_ = true; | 152 this.showSetupFingerprintDialog_ = true; |
153 }, | 153 }, |
154 | 154 |
(...skipping 10 matching lines...) Expand all Loading... |
165 * @private | 165 * @private |
166 */ | 166 */ |
167 onScreenLocked_: function(screenIsLocked) { | 167 onScreenLocked_: function(screenIsLocked) { |
168 if (!screenIsLocked && | 168 if (!screenIsLocked && |
169 settings.getCurrentRoute() == settings.routes.FINGERPRINT) { | 169 settings.getCurrentRoute() == settings.routes.FINGERPRINT) { |
170 this.onSetupFingerprintDialogClose_(); | 170 this.onSetupFingerprintDialogClose_(); |
171 } | 171 } |
172 }, | 172 }, |
173 }); | 173 }); |
174 })(); | 174 })(); |
OLD | NEW |