| 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"> | 
| 11 /** | 11 /** | 
| 12  * @typedef {{ | 12  * @typedef {{ | 
| 13  *   text: string, | 13  *   text: string, | 
| 14  *   url: string, | 14  *   url: string, | 
| 15  * }} | 15  * }} | 
| 16  */ | 16  */ | 
| 17 var RegulatoryInfo; | 17 var RegulatoryInfo; | 
| 18 | 18 | 
| 19 /** | 19 /** | 
| 20  * @typedef {{ | 20  * @typedef {{ | 
|  | 21  *   currentChannel: string, | 
|  | 22  *   targetChannel: string, | 
|  | 23  *   canChangeChannel: boolean, | 
|  | 24  * }} | 
|  | 25  */ | 
|  | 26 var ChannelInfo; | 
|  | 27 | 
|  | 28 /** | 
|  | 29  * @typedef {{ | 
| 21  *   arcVersion: string, | 30  *   arcVersion: string, | 
| 22  *   osFirmware: string, | 31  *   osFirmware: string, | 
| 23  *   osVersion: string, | 32  *   osVersion: string, | 
| 24  * }} | 33  * }} | 
| 25  */ | 34  */ | 
| 26 var VersionInfo; | 35 var VersionInfo; | 
| 27 | 36 | 
| 28 /** | 37 /** | 
| 29  * Enumeration of all possible browser channels. | 38  * Enumeration of all possible browser channels. | 
| 30  * @enum {string} | 39  * @enum {string} | 
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 123      * Checks for available update and applies if it exists. | 132      * Checks for available update and applies if it exists. | 
| 124      */ | 133      */ | 
| 125     requestUpdate: function() {}, | 134     requestUpdate: function() {}, | 
| 126 | 135 | 
| 127     /** | 136     /** | 
| 128      * @param {!BrowserChannel} channel | 137      * @param {!BrowserChannel} channel | 
| 129      * @param {boolean} isPowerwashAllowed | 138      * @param {boolean} isPowerwashAllowed | 
| 130      */ | 139      */ | 
| 131     setChannel: function(channel, isPowerwashAllowed) {}, | 140     setChannel: function(channel, isPowerwashAllowed) {}, | 
| 132 | 141 | 
| 133     /** @return {!Promise<!BrowserChannel>} */ | 142     /** @return {!Promise<!ChannelInfo>} */ | 
| 134     getCurrentChannel: function() {}, | 143     getChannelInfo: function() {}, | 
| 135 |  | 
| 136     /** @return {!Promise<!BrowserChannel>} */ |  | 
| 137     getTargetChannel: function() {}, |  | 
| 138 | 144 | 
| 139     /** @return {!Promise<!VersionInfo>} */ | 145     /** @return {!Promise<!VersionInfo>} */ | 
| 140     getVersionInfo: function() {}, | 146     getVersionInfo: function() {}, | 
| 141 | 147 | 
| 142     /** @return {!Promise<?RegulatoryInfo>} */ | 148     /** @return {!Promise<?RegulatoryInfo>} */ | 
| 143     getRegulatoryInfo: function() {}, | 149     getRegulatoryInfo: function() {}, | 
| 144 </if> | 150 </if> | 
| 145   }; | 151   }; | 
| 146 | 152 | 
| 147   /** | 153   /** | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 179     requestUpdate: function() { | 185     requestUpdate: function() { | 
| 180       chrome.send('requestUpdate'); | 186       chrome.send('requestUpdate'); | 
| 181     }, | 187     }, | 
| 182 | 188 | 
| 183     /** @override */ | 189     /** @override */ | 
| 184     setChannel: function(channel, isPowerwashAllowed) { | 190     setChannel: function(channel, isPowerwashAllowed) { | 
| 185       chrome.send('setChannel', [channel, isPowerwashAllowed]); | 191       chrome.send('setChannel', [channel, isPowerwashAllowed]); | 
| 186     }, | 192     }, | 
| 187 | 193 | 
| 188     /** @override */ | 194     /** @override */ | 
| 189     getCurrentChannel: function() { | 195     getChannelInfo: function() { | 
| 190       return cr.sendWithPromise('getCurrentChannel'); | 196       return cr.sendWithPromise('getChannelInfo'); | 
| 191     }, | 197     }, | 
| 192 | 198 | 
| 193     /** @override */ | 199     /** @override */ | 
| 194     getTargetChannel: function() { |  | 
| 195       return cr.sendWithPromise('getTargetChannel'); |  | 
| 196     }, |  | 
| 197 |  | 
| 198     /** @override */ |  | 
| 199     getVersionInfo: function() { | 200     getVersionInfo: function() { | 
| 200       return cr.sendWithPromise('getVersionInfo'); | 201       return cr.sendWithPromise('getVersionInfo'); | 
| 201     }, | 202     }, | 
| 202 | 203 | 
| 203     /** @override */ | 204     /** @override */ | 
| 204     getRegulatoryInfo: function() { | 205     getRegulatoryInfo: function() { | 
| 205       return cr.sendWithPromise('getRegulatoryInfo'); | 206       return cr.sendWithPromise('getRegulatoryInfo'); | 
| 206     } | 207     } | 
| 207 </if> | 208 </if> | 
| 208   }; | 209   }; | 
| 209 | 210 | 
| 210   return { | 211   return { | 
| 211     AboutPageBrowserProxy: AboutPageBrowserProxy, | 212     AboutPageBrowserProxy: AboutPageBrowserProxy, | 
| 212     AboutPageBrowserProxyImpl: AboutPageBrowserProxyImpl, | 213     AboutPageBrowserProxyImpl: AboutPageBrowserProxyImpl, | 
| 213     browserChannelToI18nId: browserChannelToI18nId, | 214     browserChannelToI18nId: browserChannelToI18nId, | 
| 214     isTargetChannelMoreStable: isTargetChannelMoreStable, | 215     isTargetChannelMoreStable: isTargetChannelMoreStable, | 
| 215   }; | 216   }; | 
| 216 }); | 217 }); | 
| OLD | NEW | 
|---|