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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 var Page = cr.ui.pageManager.Page; | 6 var Page = cr.ui.pageManager.Page; |
7 var PageManager = cr.ui.pageManager.PageManager; | 7 var PageManager = cr.ui.pageManager.PageManager; |
8 | 8 |
9 /** | 9 /** |
10 * QuickUnlockConfigureOverlay class | 10 * QuickUnlockConfigureOverlay class |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 }, | 58 }, |
59 | 59 |
60 /** | 60 /** |
61 * Called when polymer has been loaded and the dialog should be displayed. | 61 * Called when polymer has been loaded and the dialog should be displayed. |
62 * @private | 62 * @private |
63 */ | 63 */ |
64 onPolymerLoaded_: function() { | 64 onPolymerLoaded_: function() { |
65 settings.navigateTo(settings.Route.LOCK_SCREEN); | 65 settings.navigateTo(settings.Route.LOCK_SCREEN); |
66 var lockScreen = document.querySelector('settings-lock-screen'); | 66 var lockScreen = document.querySelector('settings-lock-screen'); |
67 | 67 |
68 var checkbox = | 68 var checkbox = lockScreen.root.querySelector('div.settings-box'); |
stevenjb (google-dont-use)
2017/02/23 17:10:57
Why this selector change? It seems fragile. It was
sammiequon
2017/02/23 22:31:04
Yeah, I noticed it was not working while working o
| |
69 lockScreen.root.querySelector( | |
70 'div.settings-box.single-column.screen-lock'); | |
71 checkbox.hidden = true; | 69 checkbox.hidden = true; |
72 | 70 |
71 // The fingerprint settings on options is always hidden. | |
72 var fingerprintDiv = lockScreen.root.querySelector('#fingerprintDiv'); | |
73 fingerprintDiv.hidden = true; | |
74 | |
73 var passwordPrompt = lockScreen.root. | 75 var passwordPrompt = lockScreen.root. |
74 querySelector('settings-password-prompt-dialog'); | 76 querySelector('settings-password-prompt-dialog'); |
75 passwordPrompt.addEventListener('close', function() { | 77 passwordPrompt.addEventListener('close', function() { |
76 if (!lockScreen.setModes_) { | 78 if (!lockScreen.setModes_) { |
77 QuickUnlockConfigureOverlay.dismiss(); | 79 QuickUnlockConfigureOverlay.dismiss(); |
78 } | 80 } |
79 }.bind(this)); | 81 }.bind(this)); |
80 }, | 82 }, |
81 }; | 83 }; |
82 | 84 |
83 QuickUnlockConfigureOverlay.dismiss = function() { | 85 QuickUnlockConfigureOverlay.dismiss = function() { |
84 PageManager.closeOverlay(); | 86 PageManager.closeOverlay(); |
85 }; | 87 }; |
86 | 88 |
87 // Export | 89 // Export |
88 return { | 90 return { |
89 QuickUnlockConfigureOverlay: QuickUnlockConfigureOverlay | 91 QuickUnlockConfigureOverlay: QuickUnlockConfigureOverlay |
90 }; | 92 }; |
91 }); | 93 }); |
OLD | NEW |