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

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

Issue 2893053002: md-settings: wrap lock screen dialogs in dom-if. (Closed)
Patch Set: Fixed patch set 1 errors. Created 3 years, 6 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 (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 13 matching lines...) Expand all
24 properties: { 24 properties: {
25 /** 25 /**
26 * The list of fingerprint objects. 26 * The list of fingerprint objects.
27 * @private {!Array<string>} 27 * @private {!Array<string>}
28 */ 28 */
29 fingerprints_: { 29 fingerprints_: {
30 type: Array, 30 type: Array,
31 value: function() { 31 value: function() {
32 return []; 32 return [];
33 } 33 }
34 } 34 },
35
36 /** @private */
37 showSetupFingerprintDialog_: Boolean,
35 }, 38 },
36 39
37 /** @private {?settings.FingerprintBrowserProxy} */ 40 /** @private {?settings.FingerprintBrowserProxy} */
38 browserProxy_: null, 41 browserProxy_: null,
39 42
40 /** @override */ 43 /** @override */
41 attached: function() { 44 attached: function() {
42 this.addWebUIListener( 45 this.addWebUIListener(
43 'on-fingerprint-attempt-received', this.onAttemptReceived_.bind(this)); 46 'on-fingerprint-attempt-received', this.onAttemptReceived_.bind(this));
44 this.addWebUIListener('on-screen-locked', this.onScreenLocked_.bind(this)); 47 this.addWebUIListener('on-screen-locked', this.onScreenLocked_.bind(this));
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 if (success) 141 if (success)
139 this.updateFingerprintsList_(); 142 this.updateFingerprintsList_();
140 }.bind(this)); 143 }.bind(this));
141 }, 144 },
142 145
143 /** 146 /**
144 * Opens the setup fingerprint dialog. 147 * Opens the setup fingerprint dialog.
145 * @private 148 * @private
146 */ 149 */
147 openAddFingerprintDialog_: function() { 150 openAddFingerprintDialog_: function() {
148 this.$.setupFingerprint.open(); 151 this.showSetupFingerprintDialog_ = true;
149 }, 152 },
150 153
151 /** @private */ 154 /** @private */
152 onSetupFingerprintDialogClose_: function() { 155 onSetupFingerprintDialogClose_: function() {
156 this.showSetupFingerprintDialog_ = false;
153 cr.ui.focusWithoutInk(assert(this.$$('#addFingerprint'))); 157 cr.ui.focusWithoutInk(assert(this.$$('#addFingerprint')));
154 this.browserProxy_.startAuthentication(); 158 this.browserProxy_.startAuthentication();
155 }, 159 },
156 160
157 /** 161 /**
158 * Close the setup fingerprint dialog when the screen is unlocked. 162 * Close the setup fingerprint dialog when the screen is unlocked.
159 * @param {boolean} screenIsLocked 163 * @param {boolean} screenIsLocked
160 * @private 164 * @private
161 */ 165 */
162 onScreenLocked_: function(screenIsLocked) { 166 onScreenLocked_: function(screenIsLocked) {
163 if (!screenIsLocked && 167 if (!screenIsLocked &&
164 settings.getCurrentRoute() == settings.Route.FINGERPRINT) { 168 settings.getCurrentRoute() == settings.Route.FINGERPRINT) {
165 this.$.setupFingerprint.close(); 169 this.onSetupFingerprintDialogClose_();
166 } 170 }
167 }, 171 },
168 }); 172 });
169 })(); 173 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698