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 /** | 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
144 this.fingerprintBrowserProxy_ = | 144 this.fingerprintBrowserProxy_ = |
145 settings.FingerprintBrowserProxyImpl.getInstance(); | 145 settings.FingerprintBrowserProxyImpl.getInstance(); |
146 | 146 |
147 if (this.easyUnlockAllowed_) { | 147 if (this.easyUnlockAllowed_) { |
148 this.addWebUIListener( | 148 this.addWebUIListener( |
149 'easy-unlock-enabled-status', | 149 'easy-unlock-enabled-status', |
150 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); | 150 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); |
151 this.easyUnlockBrowserProxy_.getEnabledStatus().then( | 151 this.easyUnlockBrowserProxy_.getEnabledStatus().then( |
152 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); | 152 this.handleEasyUnlockEnabledStatusChanged_.bind(this)); |
153 } | 153 } |
154 | |
155 // PaperRadioButton's content area's width is only as long as the text in | |
156 // it's content, but we want the set up link to be on the rightmost of the | |
157 // box, so modify the css of the PaperRadioButton's content parent. | |
158 var radioButtons = this.shadowRoot.querySelectorAll('paper-radio-button'); | |
159 radioButtons.forEach(function(radioButton) { | |
160 var radioLabel = radioButton.shadowRoot.querySelector('#radioLabel'); | |
Dan Beam
2017/04/17 21:58:36
nah, don't do this
| |
161 radioLabel.style.display = 'flex'; | |
162 radioLabel.style.width = '100%'; | |
163 }); | |
sammiequon
2017/04/14 23:43:52
Steven, since this is similar to https://coderevie
stevenjb
2017/04/17 17:18:20
You are correct in that I would really prefer to a
| |
154 }, | 164 }, |
155 | 165 |
156 /** | 166 /** |
157 * Overridden from settings.RouteObserverBehavior. | 167 * Overridden from settings.RouteObserverBehavior. |
158 * @param {!settings.Route} newRoute | 168 * @param {!settings.Route} newRoute |
159 * @param {!settings.Route} oldRoute | 169 * @param {!settings.Route} oldRoute |
160 * @protected | 170 * @protected |
161 */ | 171 */ |
162 currentRouteChanged: function(newRoute, oldRoute) { | 172 currentRouteChanged: function(newRoute, oldRoute) { |
163 if (newRoute == settings.Route.LOCK_SCREEN && | 173 if (newRoute == settings.Route.LOCK_SCREEN && |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
211 this.$$('#unlockType').focus(); | 221 this.$$('#unlockType').focus(); |
212 }, | 222 }, |
213 | 223 |
214 /** @private */ | 224 /** @private */ |
215 onPinSetupDone_: function() { | 225 onPinSetupDone_: function() { |
216 this.$.setupPin.close(); | 226 this.$.setupPin.close(); |
217 }, | 227 }, |
218 | 228 |
219 /** @private */ | 229 /** @private */ |
220 onSetupPinClosed_: function() { | 230 onSetupPinClosed_: function() { |
221 this.$$('#setupPinLink').focus(); | 231 this.$$('#setupPinButton').focus(); |
222 }, | 232 }, |
223 | 233 |
224 /** | 234 /** |
225 * Returns true if the setup pin section should be shown. | 235 * Returns true if the setup pin section should be shown. |
226 * @param {!string} selectedUnlockType The current unlock type. Used to let | 236 * @param {!string} selectedUnlockType The current unlock type. Used to let |
227 * Polymer know about the dependency. | 237 * Polymer know about the dependency. |
228 * @private | 238 * @private |
229 */ | 239 */ |
230 showConfigurePinButton_: function(selectedUnlockType) { | 240 showConfigurePinButton_: function(selectedUnlockType) { |
231 return selectedUnlockType === LockScreenUnlockType.PIN_PASSWORD; | 241 return selectedUnlockType === LockScreenUnlockType.PIN_PASSWORD; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
320 /** | 330 /** |
321 * @param {boolean} easyUnlockEnabled | 331 * @param {boolean} easyUnlockEnabled |
322 * @param {boolean} proximityDetectionAllowed | 332 * @param {boolean} proximityDetectionAllowed |
323 * @private | 333 * @private |
324 */ | 334 */ |
325 getShowEasyUnlockToggle_: function( | 335 getShowEasyUnlockToggle_: function( |
326 easyUnlockEnabled, proximityDetectionAllowed) { | 336 easyUnlockEnabled, proximityDetectionAllowed) { |
327 return easyUnlockEnabled && proximityDetectionAllowed; | 337 return easyUnlockEnabled && proximityDetectionAllowed; |
328 }, | 338 }, |
329 }); | 339 }); |
OLD | NEW |