| 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 Offline message screen implementation. | 6 * @fileoverview Offline message screen implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 cr.define('login', function() { | 9 cr.define('login', function() { |
| 10 /** | 10 /** |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 var screen = $('tpm-error-message'); | 21 var screen = $('tpm-error-message'); |
| 22 TPMErrorMessageScreen.decorate(screen); | 22 TPMErrorMessageScreen.decorate(screen); |
| 23 Oobe.getInstance().registerScreen(screen); | 23 Oobe.getInstance().registerScreen(screen); |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 TPMErrorMessageScreen.prototype = { | 26 TPMErrorMessageScreen.prototype = { |
| 27 __proto__: HTMLDivElement.prototype, | 27 __proto__: HTMLDivElement.prototype, |
| 28 | 28 |
| 29 /** @override */ | 29 /** @override */ |
| 30 decorate: function() { | 30 decorate: function() { |
| 31 } | 31 }, |
| 32 |
| 33 /** |
| 34 * Buttons in oobe wizard's button strip. |
| 35 * @type {array} Array of Buttons. |
| 36 */ |
| 37 get buttons() { |
| 38 var rebootButton = this.ownerDocument.createElement('button'); |
| 39 rebootButton.id = 'reboot-button'; |
| 40 rebootButton.textContent = |
| 41 loadTimeData.getString('errorTpmFailureRebootButton'); |
| 42 rebootButton.addEventListener('click', function() { |
| 43 chrome.send('rebootSystem'); |
| 44 }); |
| 45 return [rebootButton]; |
| 46 }, |
| 32 }; | 47 }; |
| 33 | 48 |
| 34 /** | 49 /** |
| 35 * Show TPM screen. | 50 * Show TPM screen. |
| 36 */ | 51 */ |
| 37 TPMErrorMessageScreen.show = function() { | 52 TPMErrorMessageScreen.show = function() { |
| 38 Oobe.showScreen({id: SCREEN_TPM_ERROR}); | 53 Oobe.showScreen({id: SCREEN_TPM_ERROR}); |
| 39 }; | 54 }; |
| 40 | 55 |
| 41 return { | 56 return { |
| 42 TPMErrorMessageScreen: TPMErrorMessageScreen | 57 TPMErrorMessageScreen: TPMErrorMessageScreen |
| 43 }; | 58 }; |
| 44 }); | 59 }); |
| OLD | NEW |