| 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 eula screen implementation. | 6 * @fileoverview Oobe eula screen implementation. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 cr.define('oobe', function() { | 9 cr.define('oobe', function() { |
| 10 /** | 10 /** |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 backButton.textContent = localStrings.getString('back'); | 53 backButton.textContent = localStrings.getString('back'); |
| 54 backButton.addEventListener('click', function(e) { | 54 backButton.addEventListener('click', function(e) { |
| 55 chrome.send('eulaOnExit', [false, $('usage-stats').checked]); | 55 chrome.send('eulaOnExit', [false, $('usage-stats').checked]); |
| 56 e.stopPropagation(); | 56 e.stopPropagation(); |
| 57 }); | 57 }); |
| 58 buttons.push(backButton); | 58 buttons.push(backButton); |
| 59 | 59 |
| 60 var acceptButton = this.ownerDocument.createElement('button'); | 60 var acceptButton = this.ownerDocument.createElement('button'); |
| 61 acceptButton.id = 'accept-button'; | 61 acceptButton.id = 'accept-button'; |
| 62 acceptButton.textContent = localStrings.getString('acceptAgreement'); | 62 acceptButton.textContent = localStrings.getString('acceptAgreement'); |
| 63 acceptButton.autofocus = true; |
| 63 acceptButton.addEventListener('click', function(e) { | 64 acceptButton.addEventListener('click', function(e) { |
| 64 chrome.send('eulaOnExit', [true, $('usage-stats').checked]); | 65 chrome.send('eulaOnExit', [true, $('usage-stats').checked]); |
| 65 e.stopPropagation(); | 66 e.stopPropagation(); |
| 66 }); | 67 }); |
| 67 buttons.push(acceptButton); | 68 buttons.push(acceptButton); |
| 68 | 69 |
| 69 return buttons; | 70 return buttons; |
| 70 }, | 71 }, |
| 71 | 72 |
| 72 /** | 73 /** |
| 73 * Updates localized content of the screen that is not updated via template. | 74 * Updates localized content of the screen that is not updated via template. |
| 74 */ | 75 */ |
| 75 updateLocalizedContent: function() { | 76 updateLocalizedContent: function() { |
| 76 if ($('cros-eula-frame').src != '') | 77 if ($('cros-eula-frame').src != '') |
| 77 $('cros-eula-frame').src = $('cros-eula-frame').src; | 78 $('cros-eula-frame').src = $('cros-eula-frame').src; |
| 78 if ($('oem-eula-frame').src != '') | 79 if ($('oem-eula-frame').src != '') |
| 79 $('oem-eula-frame').src = $('oem-eula-frame').src; | 80 $('oem-eula-frame').src = $('oem-eula-frame').src; |
| 80 } | 81 } |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 return { | 84 return { |
| 84 EulaScreen: EulaScreen | 85 EulaScreen: EulaScreen |
| 85 }; | 86 }; |
| 86 }); | 87 }); |
| OLD | NEW |