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

Side by Side Diff: chrome/browser/resources/help/channel_change_page.js

Issue 443553002: Typecheck chrome://help using CompilerPass.java, everything except dependency to options (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: fixed one nit Created 6 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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('help', function() { 5 cr.define('help', function() {
6 var Page = cr.ui.pageManager.Page; 6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager; 7 var PageManager = cr.ui.pageManager.PageManager;
8 8
9 /** 9 /**
10 * Encapsulated handling of the channel change overlay. 10 * Encapsulated handling of the channel change overlay.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 var options = this.getAllChannelOptions_(); 87 var options = this.getAllChannelOptions_();
88 for (var i = 0; i < options.length; i++) { 88 for (var i = 0; i < options.length; i++) {
89 var option = options[i]; 89 var option = options[i];
90 if (option.checked) 90 if (option.checked)
91 option.focus(); 91 option.focus();
92 } 92 }
93 }, 93 },
94 94
95 /** 95 /**
96 * Returns the list of all radio buttons responsible for channel selection. 96 * Returns the list of all radio buttons responsible for channel selection.
97 * @return {Array.<HTMLInputElement>} Array of radio buttons 97 * @return {NodeList} Array of radio buttons
98 * @private 98 * @private
99 */ 99 */
100 getAllChannelOptions_: function() { 100 getAllChannelOptions_: function() {
101 return this.pageDiv.querySelectorAll('input[type="radio"]'); 101 return this.pageDiv.querySelectorAll('input[type="radio"]');
102 }, 102 },
103 103
104 /** 104 /**
105 * Returns value of the selected option. 105 * Returns value of the selected option.
106 * @return {string} Selected channel name or null, if neither 106 * @return {?string} Selected channel name or null, if neither
107 * option is selected. 107 * option is selected.
108 * @private 108 * @private
109 */ 109 */
110 getSelectedOption_: function() { 110 getSelectedOption_: function() {
111 var options = this.getAllChannelOptions_(); 111 var options = this.getAllChannelOptions_();
112 for (var i = 0; i < options.length; i++) { 112 for (var i = 0; i < options.length; i++) {
113 var option = options[i]; 113 var option = options[i];
114 if (option.checked) 114 if (option.checked)
115 return option.value; 115 return option.value;
116 } 116 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 ChannelChangePage.isPageReady = function() { 256 ChannelChangePage.isPageReady = function() {
257 return ChannelChangePage.getInstance().isPageReady_(); 257 return ChannelChangePage.getInstance().isPageReady_();
258 }; 258 };
259 259
260 // Export 260 // Export
261 return { 261 return {
262 ChannelChangePage: ChannelChangePage 262 ChannelChangePage: ChannelChangePage
263 }; 263 };
264 }); 264 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/help/compiled_resources.gyp » ('j') | ui/webui/resources/js/cr/ui/bubble.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698