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 <include src="../uber/uber_utils.js"> | 5 <include src="../uber/uber_utils.js"> |
6 | 6 |
7 cr.define('help', function() { | 7 cr.define('help', function() { |
8 var localStrings = new LocalStrings(); | 8 var localStrings = new LocalStrings(); |
9 | 9 |
10 /** | 10 /** |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 option.selected = true; | 206 option.selected = true; |
207 } | 207 } |
208 }, | 208 }, |
209 | 209 |
210 /** | 210 /** |
211 * @private | 211 * @private |
212 */ | 212 */ |
213 setReleaseChannel_: function(channel) { | 213 setReleaseChannel_: function(channel) { |
214 chrome.send('setReleaseTrack', [channel]); | 214 chrome.send('setReleaseTrack', [channel]); |
215 }, | 215 }, |
| 216 |
| 217 /** |
| 218 * Sets the value of the "Last Updated" field of the "More Info" section. |
| 219 * @param {String} lastUpdated The date of the last update. |
| 220 * @private |
| 221 */ |
| 222 setLastUpdated_: function(lastUpdated) { |
| 223 $('last-updated').textContent = lastUpdated; |
| 224 }, |
216 }; | 225 }; |
217 | 226 |
218 HelpPage.setUpdateStatus = function(status, message) { | 227 HelpPage.setUpdateStatus = function(status, message) { |
219 HelpPage.getInstance().setUpdateStatus_(status, message); | 228 HelpPage.getInstance().setUpdateStatus_(status, message); |
220 }; | 229 }; |
221 | 230 |
222 HelpPage.setProgress = function(progress) { | 231 HelpPage.setProgress = function(progress) { |
223 HelpPage.getInstance().setProgress_(progress); | 232 HelpPage.getInstance().setProgress_(progress); |
224 }; | 233 }; |
225 | 234 |
(...skipping 18 matching lines...) Expand all Loading... |
244 }; | 253 }; |
245 | 254 |
246 HelpPage.updateEnableReleaseChannel = function(enabled) { | 255 HelpPage.updateEnableReleaseChannel = function(enabled) { |
247 HelpPage.getInstance().updateEnableReleaseChannel_(enabled); | 256 HelpPage.getInstance().updateEnableReleaseChannel_(enabled); |
248 }; | 257 }; |
249 | 258 |
250 HelpPage.setReleaseChannel = function(channel) { | 259 HelpPage.setReleaseChannel = function(channel) { |
251 HelpPage.getInstance().setReleaseChannel_(channel); | 260 HelpPage.getInstance().setReleaseChannel_(channel); |
252 }; | 261 }; |
253 | 262 |
| 263 HelpPage.setLastUpdated = function(lastUpdated) { |
| 264 HelpPage.getInstance().setLastUpdated_(lastUpdated); |
| 265 } |
| 266 |
254 // Export | 267 // Export |
255 return { | 268 return { |
256 HelpPage: HelpPage | 269 HelpPage: HelpPage |
257 }; | 270 }; |
258 }); | 271 }); |
259 | 272 |
260 /** | 273 /** |
261 * onload listener to initialize the HelpPage. | 274 * onload listener to initialize the HelpPage. |
262 */ | 275 */ |
263 window.onload = function() { | 276 window.onload = function() { |
264 help.HelpPage.getInstance().initialize(); | 277 help.HelpPage.getInstance().initialize(); |
265 }; | 278 }; |
OLD | NEW |