| 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 Oobe reset screen implementation. | 6 * @fileoverview Oobe reset screen implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 cr.define('oobe', function() { | 9 cr.define('oobe', function() { |
| 10 /** | 10 /** |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 resetButton.textContent = localStrings.getString('resetButton'); | 50 resetButton.textContent = localStrings.getString('resetButton'); |
| 51 resetButton.addEventListener('click', function(e) { | 51 resetButton.addEventListener('click', function(e) { |
| 52 chrome.send('resetOnReset'); | 52 chrome.send('resetOnReset'); |
| 53 e.stopPropagation(); | 53 e.stopPropagation(); |
| 54 }); | 54 }); |
| 55 buttons.push(resetButton); | 55 buttons.push(resetButton); |
| 56 | 56 |
| 57 var cancelButton = this.ownerDocument.createElement('button'); | 57 var cancelButton = this.ownerDocument.createElement('button'); |
| 58 cancelButton.id = 'reset-cancel-button'; | 58 cancelButton.id = 'reset-cancel-button'; |
| 59 cancelButton.textContent = localStrings.getString('cancelButton'); | 59 cancelButton.textContent = localStrings.getString('cancelButton'); |
| 60 cancelButton.autofocus = true; |
| 60 cancelButton.addEventListener('click', function(e) { | 61 cancelButton.addEventListener('click', function(e) { |
| 61 chrome.send('resetOnCancel'); | 62 chrome.send('resetOnCancel'); |
| 62 e.stopPropagation(); | 63 e.stopPropagation(); |
| 63 }); | 64 }); |
| 64 buttons.push(cancelButton); | 65 buttons.push(cancelButton); |
| 65 | 66 |
| 66 return buttons; | 67 return buttons; |
| 67 }, | 68 }, |
| 68 | 69 |
| 69 /** | 70 /** |
| 70 * Cancels the reset and drops the user back to the login screen. | 71 * Cancels the reset and drops the user back to the login screen. |
| 71 */ | 72 */ |
| 72 cancel: function() { | 73 cancel: function() { |
| 73 chrome.send('resetOnCancel'); | 74 chrome.send('resetOnCancel'); |
| 74 }, | 75 }, |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 return { | 78 return { |
| 78 ResetScreen: ResetScreen | 79 ResetScreen: ResetScreen |
| 79 }; | 80 }; |
| 80 }); | 81 }); |
| OLD | NEW |