Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: chrome/browser/resources/options/about_page.js

Issue 3858002: Show "Update Chrome OS" in the wrench menu, when the update image is ready. (Closed)
Patch Set: bubble Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 * Encapsulated handling of about page. 9 * Encapsulated handling of about page.
10 */ 10 */
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 $('osVersion1').textContent = versionString; 42 $('osVersion1').textContent = versionString;
43 }, 43 },
44 44
45 updateStatus_: function(message) { 45 updateStatus_: function(message) {
46 $('updateStatus').textContent = message; 46 $('updateStatus').textContent = message;
47 }, 47 },
48 48
49 updateEnable_: function(enable) { 49 updateEnable_: function(enable) {
50 $('checkNow').disabled = !enable; 50 $('checkNow').disabled = !enable;
51 }, 51 },
52
53 // Changes the "check now" button to "restart now" button.
54 changeToRestartButton_: function() {
55 $('checkNow').textContent = localStrings.getString('restart_now');
56 $('checkNow').disabled = false;
57 $('checkNow').onclick = function(event) {
58 chrome.send('RestartNow');
59 };
60 },
52 }; 61 };
53 62
54 AboutPage.updateOSVersionCallback = function(versionString) { 63 AboutPage.updateOSVersionCallback = function(versionString) {
55 AboutPage.getInstance().updateOSVersion_(versionString); 64 AboutPage.getInstance().updateOSVersion_(versionString);
56 }; 65 };
57 66
58 AboutPage.updateStatusCallback = function(message) { 67 AboutPage.updateStatusCallback = function(message) {
59 AboutPage.getInstance().updateStatus_(message); 68 AboutPage.getInstance().updateStatus_(message);
60 }; 69 };
61 70
62 AboutPage.updateEnableCallback = function(enable) { 71 AboutPage.updateEnableCallback = function(enable) {
63 AboutPage.getInstance().updateEnable_(enable); 72 AboutPage.getInstance().updateEnable_(enable);
64 }; 73 };
65 74
66 AboutPage.setUpdateImage = function(state) { 75 AboutPage.setUpdateImage = function(state) {
67 $('updateIcon').className= 'update-icon ' + state; 76 $('updateIcon').className= 'update-icon ' + state;
68 }; 77 };
69 78
79 AboutPage.changeToRestartButton = function() {
80 AboutPage.getInstance().changeToRestartButton_();
81 };
82
70 // Export 83 // Export
71 return { 84 return {
72 AboutPage: AboutPage 85 AboutPage: AboutPage
73 }; 86 };
74 87
75 }); 88 });
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/options/about_page_handler.cc ('k') | chrome/browser/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698