| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * The number of milliseconds used for showing a message. | 9 * The number of milliseconds used for showing a message. |
| 10 * @type {number} | 10 * @type {number} |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // Notify the handler that the page is ready. | 70 // Notify the handler that the page is ready. |
| 71 chrome.send('PageReady'); | 71 chrome.send('PageReady'); |
| 72 }, | 72 }, |
| 73 | 73 |
| 74 // Update the Default Browsers section based on the current state. | 74 // Update the Default Browsers section based on the current state. |
| 75 updateOSVersion_: function(versionString) { | 75 updateOSVersion_: function(versionString) { |
| 76 $('osVersion0').textContent = versionString; | 76 $('osVersion0').textContent = versionString; |
| 77 $('osVersion1').textContent = versionString; | 77 $('osVersion1').textContent = versionString; |
| 78 }, | 78 }, |
| 79 | 79 |
| 80 updateOSFirmware_: function(firmwareString) { |
| 81 $('osFirmware0').textContent = firmwareString; |
| 82 $('osFirmware1').textContent = firmwareString; |
| 83 }, |
| 84 |
| 80 /** | 85 /** |
| 81 * Updates the status message like "Checking for update...". | 86 * Updates the status message like "Checking for update...". |
| 82 * @param {string} message The message to be shown. | 87 * @param {string} message The message to be shown. |
| 83 * @param {boolean} insertDelay show the message for a while. | 88 * @param {boolean} insertDelay show the message for a while. |
| 84 * @private | 89 * @private |
| 85 */ | 90 */ |
| 86 updateStatus_: function(message, insertDelay) { | 91 updateStatus_: function(message, insertDelay) { |
| 87 // Add the message to the queue with delay if needed. | 92 // Add the message to the queue with delay if needed. |
| 88 // The delay is inserted so users can read the message. | 93 // The delay is inserted so users can read the message. |
| 89 var delayMs = insertDelay ? MESSAGE_DELAY_MS : 0; | 94 var delayMs = insertDelay ? MESSAGE_DELAY_MS : 0; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 $('checkNow').onclick = function(event) { | 174 $('checkNow').onclick = function(event) { |
| 170 chrome.send('RestartNow'); | 175 chrome.send('RestartNow'); |
| 171 }; | 176 }; |
| 172 }, | 177 }, |
| 173 }; | 178 }; |
| 174 | 179 |
| 175 AboutPage.updateOSVersionCallback = function(versionString) { | 180 AboutPage.updateOSVersionCallback = function(versionString) { |
| 176 AboutPage.getInstance().updateOSVersion_(versionString); | 181 AboutPage.getInstance().updateOSVersion_(versionString); |
| 177 }; | 182 }; |
| 178 | 183 |
| 184 AboutPage.updateOSFirmwareCallback = function(firmwareString) { |
| 185 AboutPage.getInstance().updateOSFirmware_(firmwareString); |
| 186 }; |
| 187 |
| 179 AboutPage.updateStatusCallback = function(message, insertDelay) { | 188 AboutPage.updateStatusCallback = function(message, insertDelay) { |
| 180 AboutPage.getInstance().updateStatus_(message, insertDelay); | 189 AboutPage.getInstance().updateStatus_(message, insertDelay); |
| 181 }; | 190 }; |
| 182 | 191 |
| 183 AboutPage.updateEnableCallback = function(enable) { | 192 AboutPage.updateEnableCallback = function(enable) { |
| 184 AboutPage.getInstance().updateEnable_(enable); | 193 AboutPage.getInstance().updateEnable_(enable); |
| 185 }; | 194 }; |
| 186 | 195 |
| 187 AboutPage.updateSelectedOptionCallback = function(value) { | 196 AboutPage.updateSelectedOptionCallback = function(value) { |
| 188 AboutPage.getInstance().updateSelectedOption_(value); | 197 AboutPage.getInstance().updateSelectedOption_(value); |
| 189 }; | 198 }; |
| 190 | 199 |
| 191 AboutPage.setUpdateImage = function(state) { | 200 AboutPage.setUpdateImage = function(state) { |
| 192 $('updateIcon').className= 'update-icon ' + state; | 201 $('updateIcon').className= 'update-icon ' + state; |
| 193 }; | 202 }; |
| 194 | 203 |
| 195 AboutPage.changeToRestartButton = function() { | 204 AboutPage.changeToRestartButton = function() { |
| 196 AboutPage.getInstance().changeToRestartButton_(); | 205 AboutPage.getInstance().changeToRestartButton_(); |
| 197 }; | 206 }; |
| 198 | 207 |
| 199 // Export | 208 // Export |
| 200 return { | 209 return { |
| 201 AboutPage: AboutPage | 210 AboutPage: AboutPage |
| 202 }; | 211 }; |
| 203 | 212 |
| 204 }); | 213 }); |
| OLD | NEW |