summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/options/about_page.js
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-11-18 18:32:45 +0000
committerBen Murdoch <benm@google.com>2010-11-18 18:38:07 +0000
commit513209b27ff55e2841eac0e4120199c23acce758 (patch)
treeaeba30bb08c5f47c57003544e378a377c297eee6 /chrome/browser/resources/options/about_page.js
parent164f7496de0fbee436b385a79ead9e3cb81a50c1 (diff)
downloadexternal_chromium-513209b27ff55e2841eac0e4120199c23acce758.zip
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.gz
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.bz2
Merge Chromium at r65505: Initial merge by git.
Change-Id: I31d8f1d8cd33caaf7f47ffa7350aef42d5fbdb45
Diffstat (limited to 'chrome/browser/resources/options/about_page.js')
-rw-r--r--chrome/browser/resources/options/about_page.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/chrome/browser/resources/options/about_page.js b/chrome/browser/resources/options/about_page.js
index a6490a3..8276057 100644
--- a/chrome/browser/resources/options/about_page.js
+++ b/chrome/browser/resources/options/about_page.js
@@ -32,6 +32,15 @@ cr.define('options', function() {
$('aboutPageMoreInfo').classList.remove('hidden');
};
+ if (cr.commandLine.options['--bwsi']) {
+ $('channelSelect').disabled = true;
+ } else {
+ $('channelSelect').onchange = function(event) {
+ var channel = event.target.value;
+ chrome.send('SetReleaseTrack', [channel]);
+ };
+ }
+
// Notify the handler that the page is ready.
chrome.send('PageReady');
},
@@ -49,6 +58,26 @@ cr.define('options', function() {
updateEnable_: function(enable) {
$('checkNow').disabled = !enable;
},
+
+ // Updates the selected option in 'channelSelect' <select> element.
+ updateSelectedOption_: function(value) {
+ var options = $('channelSelect').querySelectorAll('option');
+ for (var i = 0; i < options.length; i++) {
+ var option = options[i];
+ if (option.value == value) {
+ option.selected = true;
+ }
+ }
+ },
+
+ // Changes the "check now" button to "restart now" button.
+ changeToRestartButton_: function() {
+ $('checkNow').textContent = localStrings.getString('restart_now');
+ $('checkNow').disabled = false;
+ $('checkNow').onclick = function(event) {
+ chrome.send('RestartNow');
+ };
+ },
};
AboutPage.updateOSVersionCallback = function(versionString) {
@@ -63,10 +92,18 @@ cr.define('options', function() {
AboutPage.getInstance().updateEnable_(enable);
};
+ AboutPage.updateSelectedOptionCallback = function(value) {
+ AboutPage.getInstance().updateSelectedOption_(value);
+ };
+
AboutPage.setUpdateImage = function(state) {
$('updateIcon').className= 'update-icon ' + state;
};
+ AboutPage.changeToRestartButton = function() {
+ AboutPage.getInstance().changeToRestartButton_();
+ };
+
// Export
return {
AboutPage: AboutPage