Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 /** | 5 /** |
| 6 * @fileoverview A helper object used from the "About" section to interact with | 6 * @fileoverview A helper object used from the "About" section to interact with |
| 7 * the browser. | 7 * the browser. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 // <if expr="chromeos"> | 10 // <if expr="chromeos"> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 * @enum {string} | 51 * @enum {string} |
| 52 */ | 52 */ |
| 53 var UpdateStatus = { | 53 var UpdateStatus = { |
| 54 CHECKING: 'checking', | 54 CHECKING: 'checking', |
| 55 UPDATING: 'updating', | 55 UPDATING: 'updating', |
| 56 NEARLY_UPDATED: 'nearly_updated', | 56 NEARLY_UPDATED: 'nearly_updated', |
| 57 UPDATED: 'updated', | 57 UPDATED: 'updated', |
| 58 FAILED: 'failed', | 58 FAILED: 'failed', |
| 59 DISABLED: 'disabled', | 59 DISABLED: 'disabled', |
| 60 DISABLED_BY_ADMIN: 'disabled_by_admin', | 60 DISABLED_BY_ADMIN: 'disabled_by_admin', |
| 61 NEED_PERMISSION_TO_UPDATE: 'need_permission_to_update', | |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 // <if expr="_google_chrome and is_macosx"> | 64 // <if expr="_google_chrome and is_macosx"> |
| 64 /** | 65 /** |
| 65 * @typedef {{ | 66 * @typedef {{ |
| 66 * hidden: boolean, | 67 * hidden: boolean, |
| 67 * disabled: boolean, | 68 * disabled: boolean, |
| 68 * actionable: boolean, | 69 * actionable: boolean, |
| 69 * text: (string|undefined) | 70 * text: (string|undefined) |
| 70 * }} | 71 * }} |
| 71 */ | 72 */ |
| 72 var PromoteUpdaterStatus; | 73 var PromoteUpdaterStatus; |
| 73 // </if> | 74 // </if> |
| 74 | 75 |
| 75 /** | 76 /** |
| 76 * @typedef {{ | 77 * @typedef {{ |
| 77 * status: !UpdateStatus, | 78 * status: !UpdateStatus, |
| 78 * progress: (number|undefined), | 79 * progress: (number|undefined), |
| 79 * message: (string|undefined), | 80 * message: (string|undefined), |
| 80 * connectionTypes: (string|undefined), | 81 * connectionTypes: (string|undefined), |
|
stevenjb
2017/05/11 17:20:15
It looks like this now has 'version' and 'size' pr
weidongg
2017/05/11 18:09:29
Done.
| |
| 81 * }} | 82 * }} |
| 82 */ | 83 */ |
| 83 var UpdateStatusChangedEvent; | 84 var UpdateStatusChangedEvent; |
| 84 | 85 |
| 85 cr.define('settings', function() { | 86 cr.define('settings', function() { |
| 86 /** | 87 /** |
| 87 * @param {!BrowserChannel} channel | 88 * @param {!BrowserChannel} channel |
| 88 * @return {string} | 89 * @return {string} |
| 89 */ | 90 */ |
| 90 function browserChannelToI18nId(channel) { | 91 function browserChannelToI18nId(channel) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 140 openFeedbackDialog: function() {}, | 141 openFeedbackDialog: function() {}, |
| 141 // </if> | 142 // </if> |
| 142 | 143 |
| 143 // <if expr="chromeos"> | 144 // <if expr="chromeos"> |
| 144 /** | 145 /** |
| 145 * Checks for available update and applies if it exists. | 146 * Checks for available update and applies if it exists. |
| 146 */ | 147 */ |
| 147 requestUpdate: function() {}, | 148 requestUpdate: function() {}, |
| 148 | 149 |
| 149 /** | 150 /** |
| 151 * Checks for the update with specified version and size and applies over | |
| 152 * cellular. | |
|
stevenjb
2017/05/11 17:20:15
Maybe provide a brief explanation of why/how size
weidongg
2017/05/11 18:09:30
Done.
| |
| 153 * @param {string} target_version | |
| 154 * @param {string} target_size | |
| 155 */ | |
| 156 requestUpdateOverCellular: function(target_version, target_size) {}, | |
| 157 | |
| 158 /** | |
| 150 * @param {!BrowserChannel} channel | 159 * @param {!BrowserChannel} channel |
| 151 * @param {boolean} isPowerwashAllowed | 160 * @param {boolean} isPowerwashAllowed |
| 152 */ | 161 */ |
| 153 setChannel: function(channel, isPowerwashAllowed) {}, | 162 setChannel: function(channel, isPowerwashAllowed) {}, |
| 154 | 163 |
| 155 /** @return {!Promise<!ChannelInfo>} */ | 164 /** @return {!Promise<!ChannelInfo>} */ |
| 156 getChannelInfo: function() {}, | 165 getChannelInfo: function() {}, |
| 157 | 166 |
| 158 /** @return {!Promise<!VersionInfo>} */ | 167 /** @return {!Promise<!VersionInfo>} */ |
| 159 getVersionInfo: function() {}, | 168 getVersionInfo: function() {}, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 }, | 216 }, |
| 208 // </if> | 217 // </if> |
| 209 | 218 |
| 210 // <if expr="chromeos"> | 219 // <if expr="chromeos"> |
| 211 /** @override */ | 220 /** @override */ |
| 212 requestUpdate: function() { | 221 requestUpdate: function() { |
| 213 chrome.send('requestUpdate'); | 222 chrome.send('requestUpdate'); |
| 214 }, | 223 }, |
| 215 | 224 |
| 216 /** @override */ | 225 /** @override */ |
| 226 requestUpdateOverCellular: function(target_version, target_size) { | |
| 227 chrome.send('requestUpdateOverCellular', [target_version, target_size]); | |
| 228 }, | |
| 229 | |
| 230 /** @override */ | |
| 217 setChannel: function(channel, isPowerwashAllowed) { | 231 setChannel: function(channel, isPowerwashAllowed) { |
| 218 chrome.send('setChannel', [channel, isPowerwashAllowed]); | 232 chrome.send('setChannel', [channel, isPowerwashAllowed]); |
| 219 }, | 233 }, |
| 220 | 234 |
| 221 /** @override */ | 235 /** @override */ |
| 222 getChannelInfo: function() { | 236 getChannelInfo: function() { |
| 223 return cr.sendWithPromise('getChannelInfo'); | 237 return cr.sendWithPromise('getChannelInfo'); |
| 224 }, | 238 }, |
| 225 | 239 |
| 226 /** @override */ | 240 /** @override */ |
| 227 getVersionInfo: function() { | 241 getVersionInfo: function() { |
| 228 return cr.sendWithPromise('getVersionInfo'); | 242 return cr.sendWithPromise('getVersionInfo'); |
| 229 }, | 243 }, |
| 230 | 244 |
| 231 /** @override */ | 245 /** @override */ |
| 232 getRegulatoryInfo: function() { | 246 getRegulatoryInfo: function() { |
| 233 return cr.sendWithPromise('getRegulatoryInfo'); | 247 return cr.sendWithPromise('getRegulatoryInfo'); |
| 234 } | 248 } |
| 235 // </if> | 249 // </if> |
| 236 }; | 250 }; |
| 237 | 251 |
| 238 return { | 252 return { |
| 239 AboutPageBrowserProxy: AboutPageBrowserProxy, | 253 AboutPageBrowserProxy: AboutPageBrowserProxy, |
| 240 AboutPageBrowserProxyImpl: AboutPageBrowserProxyImpl, | 254 AboutPageBrowserProxyImpl: AboutPageBrowserProxyImpl, |
| 241 browserChannelToI18nId: browserChannelToI18nId, | 255 browserChannelToI18nId: browserChannelToI18nId, |
| 242 isTargetChannelMoreStable: isTargetChannelMoreStable, | 256 isTargetChannelMoreStable: isTargetChannelMoreStable, |
| 243 }; | 257 }; |
| 244 }); | 258 }); |
| OLD | NEW |