| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 Device reset screen implementation. | 6 * @fileoverview Device reset screen implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 login.createScreen('ResetScreen', 'reset', function() { | 9 login.createScreen('ResetScreen', 'reset', function() { |
| 10 return { | 10 return { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 }); | 61 }); |
| 62 buttons.push(cancelButton); | 62 buttons.push(cancelButton); |
| 63 | 63 |
| 64 return buttons; | 64 return buttons; |
| 65 }, | 65 }, |
| 66 | 66 |
| 67 /** | 67 /** |
| 68 * Returns a control which should receive an initial focus. | 68 * Returns a control which should receive an initial focus. |
| 69 */ | 69 */ |
| 70 get defaultControl() { | 70 get defaultControl() { |
| 71 return $('reset-cancel-button'); | 71 return $('reset-button'); |
| 72 }, | 72 }, |
| 73 | 73 |
| 74 /** | 74 /** |
| 75 * Cancels the reset and drops the user back to the login screen. | 75 * Cancels the reset and drops the user back to the login screen. |
| 76 */ | 76 */ |
| 77 cancel: function() { | 77 cancel: function() { |
| 78 chrome.send('cancelOnReset'); | 78 chrome.send('cancelOnReset'); |
| 79 }, | 79 }, |
| 80 | 80 |
| 81 /** | 81 /** |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 * @param {bool} can_rollback. If Rollback is available on reset screen. | 145 * @param {bool} can_rollback. If Rollback is available on reset screen. |
| 146 * @private | 146 * @private |
| 147 */ | 147 */ |
| 148 setRollbackAvailable_: function(show_rollback) { | 148 setRollbackAvailable_: function(show_rollback) { |
| 149 this.classList.toggle('norollback', !show_rollback); | 149 this.classList.toggle('norollback', !show_rollback); |
| 150 this.showRollback = show_rollback; | 150 this.showRollback = show_rollback; |
| 151 }, | 151 }, |
| 152 | 152 |
| 153 updateViewOnRollbackCall: function() { | 153 updateViewOnRollbackCall: function() { |
| 154 this.classList.add('revert-promise'); | 154 this.classList.add('revert-promise'); |
| 155 this.announceAccessibleMessage_( |
| 156 loadTimeData.getString('resetRevertSpinnerMessage')); |
| 155 } | 157 } |
| 156 }; | 158 }; |
| 157 }); | 159 }); |
| OLD | NEW |