| 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 'settings-about-page' contains version and OS related | 6 * @fileoverview 'settings-about-page' contains version and OS related |
| 7 * information. | 7 * information. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-about-page', | 10 is: 'settings-about-page', |
| 11 | 11 |
| 12 behaviors: [WebUIListenerBehavior, MainPageBehavior, I18nBehavior], | 12 behaviors: [WebUIListenerBehavior, MainPageBehavior, I18nBehavior], |
| 13 | 13 |
| 14 properties: { | 14 properties: { |
| 15 /** @private {?UpdateStatusChangedEvent} */ | 15 /** @private {?UpdateStatusChangedEvent} */ |
| 16 currentUpdateStatusEvent_: { | 16 currentUpdateStatusEvent_: { |
| 17 type: Object, | 17 type: Object, |
| 18 value: {message: '', progress: 0, status: UpdateStatus.DISABLED}, | 18 value: {message: '', progress: 0, status: UpdateStatus.DISABLED}, |
| 19 }, | 19 }, |
| 20 | 20 |
| 21 <if expr="chromeos"> | 21 /* <if expr="chromeos"> */ |
| 22 /** @private */ | 22 /** @private */ |
| 23 hasCheckedForUpdates_: { | 23 hasCheckedForUpdates_: { |
| 24 type: Boolean, | 24 type: Boolean, |
| 25 value: false, | 25 value: false, |
| 26 }, | 26 }, |
| 27 | 27 |
| 28 /** @private {!BrowserChannel} */ | 28 /** @private {!BrowserChannel} */ |
| 29 currentChannel_: String, | 29 currentChannel_: String, |
| 30 | 30 |
| 31 /** @private {!BrowserChannel} */ | 31 /** @private {!BrowserChannel} */ |
| 32 targetChannel_: String, | 32 targetChannel_: String, |
| 33 | 33 |
| 34 /** @private {?RegulatoryInfo} */ | 34 /** @private {?RegulatoryInfo} */ |
| 35 regulatoryInfo_: Object, | 35 regulatoryInfo_: Object, |
| 36 </if> | 36 /* </if> */ |
| 37 | 37 |
| 38 <if expr="_google_chrome and is_macosx"> | 38 /* <if expr="_google_chrome and is_macosx"> */ |
| 39 /** @private {!PromoteUpdaterStatus} */ | 39 /** @private {!PromoteUpdaterStatus} */ |
| 40 promoteUpdaterStatus_: Object, | 40 promoteUpdaterStatus_: Object, |
| 41 </if> | 41 /* </if> */ |
| 42 | 42 |
| 43 /** @private {!{obsolete: boolean, endOfLine: boolean}} */ | 43 /** @private {!{obsolete: boolean, endOfLine: boolean}} */ |
| 44 obsoleteSystemInfo_: { | 44 obsoleteSystemInfo_: { |
| 45 type: Object, | 45 type: Object, |
| 46 value: function() { | 46 value: function() { |
| 47 return { | 47 return { |
| 48 obsolete: loadTimeData.getBoolean('aboutObsoleteNowOrSoon'), | 48 obsolete: loadTimeData.getBoolean('aboutObsoleteNowOrSoon'), |
| 49 endOfLine: loadTimeData.getBoolean('aboutObsoleteEndOfTheLine'), | 49 endOfLine: loadTimeData.getBoolean('aboutObsoleteEndOfTheLine'), |
| 50 }; | 50 }; |
| 51 }, | 51 }, |
| 52 }, | 52 }, |
| 53 | 53 |
| 54 /** @private */ | 54 /** @private */ |
| 55 showUpdateStatus_: Boolean, | 55 showUpdateStatus_: Boolean, |
| 56 | 56 |
| 57 /** @private */ | 57 /** @private */ |
| 58 showButtonContainer_: Boolean, | 58 showButtonContainer_: Boolean, |
| 59 | 59 |
| 60 /** @private */ | 60 /** @private */ |
| 61 showRelaunch_: Boolean, | 61 showRelaunch_: Boolean, |
| 62 | 62 |
| 63 <if expr="chromeos"> | 63 /* <if expr="chromeos"> */ |
| 64 /** @private */ | 64 /** @private */ |
| 65 showRelaunchAndPowerwash_: { | 65 showRelaunchAndPowerwash_: { |
| 66 type: Boolean, | 66 type: Boolean, |
| 67 computed: 'computeShowRelaunchAndPowerwash_(' + | 67 computed: 'computeShowRelaunchAndPowerwash_(' + |
| 68 'currentUpdateStatusEvent_, targetChannel_)', | 68 'currentUpdateStatusEvent_, targetChannel_)', |
| 69 }, | 69 }, |
| 70 | 70 |
| 71 /** @private */ | 71 /** @private */ |
| 72 showCheckUpdates_: { | 72 showCheckUpdates_: { |
| 73 type: Boolean, | 73 type: Boolean, |
| 74 computed: 'computeShowCheckUpdates_(currentUpdateStatusEvent_)', | 74 computed: 'computeShowCheckUpdates_(currentUpdateStatusEvent_)', |
| 75 }, | 75 }, |
| 76 </if> | 76 /* </if> */ |
| 77 }, | 77 }, |
| 78 | 78 |
| 79 observers: [ | 79 observers: [ |
| 80 <if expr="not chromeos"> | 80 /* <if expr="not chromeos"> */ |
| 81 'updateShowUpdateStatus_(' + | 81 'updateShowUpdateStatus_(' + |
| 82 'obsoleteSystemInfo_, currentUpdateStatusEvent_)', | 82 'obsoleteSystemInfo_, currentUpdateStatusEvent_)', |
| 83 'updateShowRelaunch_(currentUpdateStatusEvent_)', | 83 'updateShowRelaunch_(currentUpdateStatusEvent_)', |
| 84 'updateShowButtonContainer_(showRelaunch_)', | 84 'updateShowButtonContainer_(showRelaunch_)', |
| 85 </if> | 85 /* </if> */ |
| 86 | 86 |
| 87 <if expr="chromeos"> | 87 /* <if expr="chromeos"> */ |
| 88 'updateShowUpdateStatus_(' + | 88 'updateShowUpdateStatus_(' + |
| 89 'obsoleteSystemInfo_, currentUpdateStatusEvent_,' + | 89 'obsoleteSystemInfo_, currentUpdateStatusEvent_,' + |
| 90 'hasCheckedForUpdates_)', | 90 'hasCheckedForUpdates_)', |
| 91 'updateShowRelaunch_(currentUpdateStatusEvent_, targetChannel_,' + | 91 'updateShowRelaunch_(currentUpdateStatusEvent_, targetChannel_,' + |
| 92 'currentChannel_)', | 92 'currentChannel_)', |
| 93 'updateShowButtonContainer_(' + | 93 'updateShowButtonContainer_(' + |
| 94 'showRelaunch_, showRelaunchAndPowerwash_, showCheckUpdates_)', | 94 'showRelaunch_, showRelaunchAndPowerwash_, showCheckUpdates_)', |
| 95 </if> | 95 /* </if> */ |
| 96 ], | 96 ], |
| 97 | 97 |
| 98 | 98 |
| 99 /** @private {?settings.AboutPageBrowserProxy} */ | 99 /** @private {?settings.AboutPageBrowserProxy} */ |
| 100 aboutBrowserProxy_: null, | 100 aboutBrowserProxy_: null, |
| 101 | 101 |
| 102 /** @private {?settings.LifetimeBrowserProxy} */ | 102 /** @private {?settings.LifetimeBrowserProxy} */ |
| 103 lifetimeBrowserProxy_: null, | 103 lifetimeBrowserProxy_: null, |
| 104 | 104 |
| 105 /** @override */ | 105 /** @override */ |
| 106 attached: function() { | 106 attached: function() { |
| 107 this.aboutBrowserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance(); | 107 this.aboutBrowserProxy_ = settings.AboutPageBrowserProxyImpl.getInstance(); |
| 108 this.aboutBrowserProxy_.pageReady(); | 108 this.aboutBrowserProxy_.pageReady(); |
| 109 | 109 |
| 110 this.lifetimeBrowserProxy_ = | 110 this.lifetimeBrowserProxy_ = |
| 111 settings.LifetimeBrowserProxyImpl.getInstance(); | 111 settings.LifetimeBrowserProxyImpl.getInstance(); |
| 112 | 112 |
| 113 <if expr="chromeos"> | 113 /* <if expr="chromeos"> */ |
| 114 this.addEventListener('target-channel-changed', function(e) { | 114 this.addEventListener('target-channel-changed', function(e) { |
| 115 this.targetChannel_ = e.detail; | 115 this.targetChannel_ = e.detail; |
| 116 }.bind(this)); | 116 }.bind(this)); |
| 117 | 117 |
| 118 this.aboutBrowserProxy_.getChannelInfo().then(function(info) { | 118 this.aboutBrowserProxy_.getChannelInfo().then(function(info) { |
| 119 this.currentChannel_ = info.currentChannel; | 119 this.currentChannel_ = info.currentChannel; |
| 120 this.targetChannel_ = info.targetChannel; | 120 this.targetChannel_ = info.targetChannel; |
| 121 this.startListening_(); | 121 this.startListening_(); |
| 122 }.bind(this)); | 122 }.bind(this)); |
| 123 | 123 |
| 124 this.aboutBrowserProxy_.getRegulatoryInfo().then(function(info) { | 124 this.aboutBrowserProxy_.getRegulatoryInfo().then(function(info) { |
| 125 this.regulatoryInfo_ = info; | 125 this.regulatoryInfo_ = info; |
| 126 }.bind(this)); | 126 }.bind(this)); |
| 127 </if> | 127 /* </if> */ |
| 128 <if expr="not chromeos"> | 128 /* <if expr="not chromeos"> */ |
| 129 this.startListening_(); | 129 this.startListening_(); |
| 130 </if> | 130 /* </if> */ |
| 131 }, | 131 }, |
| 132 | 132 |
| 133 /** @private */ | 133 /** @private */ |
| 134 startListening_: function() { | 134 startListening_: function() { |
| 135 this.addWebUIListener( | 135 this.addWebUIListener( |
| 136 'update-status-changed', | 136 'update-status-changed', this.onUpdateStatusChanged_.bind(this)); |
| 137 this.onUpdateStatusChanged_.bind(this)); | 137 /* <if expr="_google_chrome and is_macosx"> */ |
| 138 <if expr="_google_chrome and is_macosx"> | |
| 139 this.addWebUIListener( | 138 this.addWebUIListener( |
| 140 'promotion-state-changed', | 139 'promotion-state-changed', |
| 141 this.onPromoteUpdaterStatusChanged_.bind(this)); | 140 this.onPromoteUpdaterStatusChanged_.bind(this)); |
| 142 </if> | 141 /* </if> */ |
| 143 this.aboutBrowserProxy_.refreshUpdateStatus(); | 142 this.aboutBrowserProxy_.refreshUpdateStatus(); |
| 144 }, | 143 }, |
| 145 | 144 |
| 146 /** | 145 /** |
| 147 * @param {!UpdateStatusChangedEvent} event | 146 * @param {!UpdateStatusChangedEvent} event |
| 148 * @private | 147 * @private |
| 149 */ | 148 */ |
| 150 onUpdateStatusChanged_: function(event) { | 149 onUpdateStatusChanged_: function(event) { |
| 151 <if expr="chromeos"> | 150 /* <if expr="chromeos"> */ |
| 152 if (event.status == UpdateStatus.CHECKING) | 151 if (event.status == UpdateStatus.CHECKING) |
| 153 this.hasCheckedForUpdates_ = true; | 152 this.hasCheckedForUpdates_ = true; |
| 154 </if> | 153 /* </if> */ |
| 155 this.currentUpdateStatusEvent_ = event; | 154 this.currentUpdateStatusEvent_ = event; |
| 156 }, | 155 }, |
| 157 | 156 |
| 158 <if expr="_google_chrome and is_macosx"> | 157 /* <if expr="_google_chrome and is_macosx"> */ |
| 159 /** | 158 /** |
| 160 * @param {!PromoteUpdaterStatus} status | 159 * @param {!PromoteUpdaterStatus} status |
| 161 * @private | 160 * @private |
| 162 */ | 161 */ |
| 163 onPromoteUpdaterStatusChanged_: function(status) { | 162 onPromoteUpdaterStatusChanged_: function(status) { |
| 164 this.promoteUpdaterStatus_ = status; | 163 this.promoteUpdaterStatus_ = status; |
| 165 }, | 164 }, |
| 166 | 165 |
| 167 /** | 166 /** |
| 168 * If #promoteUpdater isn't disabled, trigger update promotion. | 167 * If #promoteUpdater isn't disabled, trigger update promotion. |
| 169 * @private | 168 * @private |
| 170 */ | 169 */ |
| 171 onPromoteUpdaterTap_: function() { | 170 onPromoteUpdaterTap_: function() { |
| 172 // This is necessary because #promoteUpdater is not a button, so by default | 171 // This is necessary because #promoteUpdater is not a button, so by default |
| 173 // disable doesn't do anything. | 172 // disable doesn't do anything. |
| 174 if (this.promoteUpdaterStatus_.disabled) | 173 if (this.promoteUpdaterStatus_.disabled) |
| 175 return; | 174 return; |
| 176 this.aboutBrowserProxy_.promoteUpdater(); | 175 this.aboutBrowserProxy_.promoteUpdater(); |
| 177 }, | 176 }, |
| 178 | 177 |
| 179 /** | 178 /** |
| 180 * @param {!Event} event | 179 * @param {!Event} event |
| 181 * @private | 180 * @private |
| 182 */ | 181 */ |
| 183 onLearnMoreTap_: function(event) { | 182 onLearnMoreTap_: function(event) { |
| 184 // Stop the propagation of events, so that clicking on links inside | 183 // Stop the propagation of events, so that clicking on links inside |
| 185 // actionable items won't trigger action. | 184 // actionable items won't trigger action. |
| 186 event.stopPropagation(); | 185 event.stopPropagation(); |
| 187 }, | 186 }, |
| 188 </if> | 187 /* </if> */ |
| 189 | 188 |
| 190 /** @private */ | 189 /** @private */ |
| 191 onHelpTap_: function() { | 190 onHelpTap_: function() { |
| 192 this.aboutBrowserProxy_.openHelpPage(); | 191 this.aboutBrowserProxy_.openHelpPage(); |
| 193 }, | 192 }, |
| 194 | 193 |
| 195 /** @private */ | 194 /** @private */ |
| 196 onRelaunchTap_: function() { | 195 onRelaunchTap_: function() { |
| 197 this.lifetimeBrowserProxy_.relaunch(); | 196 this.lifetimeBrowserProxy_.relaunch(); |
| 198 }, | 197 }, |
| 199 | 198 |
| 200 /** @private */ | 199 /** @private */ |
| 201 updateShowUpdateStatus_: function() { | 200 updateShowUpdateStatus_: function() { |
| 202 <if expr="chromeos"> | 201 /* <if expr="chromeos"> */ |
| 203 // Assume the "updated" status is stale if we haven't checked yet. | 202 // Assume the "updated" status is stale if we haven't checked yet. |
| 204 if (this.currentUpdateStatusEvent_.status == UpdateStatus.UPDATED && | 203 if (this.currentUpdateStatusEvent_.status == UpdateStatus.UPDATED && |
| 205 !this.hasCheckedForUpdates_) { | 204 !this.hasCheckedForUpdates_) { |
| 206 this.showUpdateStatus_ = false; | 205 this.showUpdateStatus_ = false; |
| 207 return; | 206 return; |
| 208 } | 207 } |
| 209 </if> | 208 /* </if> */ |
| 210 this.showUpdateStatus_ = | 209 this.showUpdateStatus_ = |
| 211 this.currentUpdateStatusEvent_.status != UpdateStatus.DISABLED && | 210 this.currentUpdateStatusEvent_.status != UpdateStatus.DISABLED && |
| 212 !this.obsoleteSystemInfo_.endOfLine; | 211 !this.obsoleteSystemInfo_.endOfLine; |
| 213 }, | 212 }, |
| 214 | 213 |
| 215 /** | 214 /** |
| 216 * Hide the button container if all buttons are hidden, otherwise the | 215 * Hide the button container if all buttons are hidden, otherwise the |
| 217 * container displayes an unwanted border (see secondary-action class). | 216 * container displayes an unwanted border (see secondary-action class). |
| 218 * @private | 217 * @private |
| 219 */ | 218 */ |
| 220 updateShowButtonContainer_: function() { | 219 updateShowButtonContainer_: function() { |
| 221 <if expr="not chromeos"> | 220 /* <if expr="not chromeos"> */ |
| 222 this.showButtonContainer_ = this.showRelaunch_; | 221 this.showButtonContainer_ = this.showRelaunch_; |
| 223 </if> | 222 /* </if> */ |
| 224 <if expr="chromeos"> | 223 /* <if expr="chromeos"> */ |
| 225 this.showButtonContainer_ = this.showRelaunch_ || | 224 this.showButtonContainer_ = this.showRelaunch_ || |
| 226 this.showRelaunchAndPowerwash_ || this.showCheckUpdates_; | 225 this.showRelaunchAndPowerwash_ || this.showCheckUpdates_; |
| 227 </if> | 226 /* </if> */ |
| 228 }, | 227 }, |
| 229 | 228 |
| 230 /** @private */ | 229 /** @private */ |
| 231 updateShowRelaunch_: function() { | 230 updateShowRelaunch_: function() { |
| 232 <if expr="not chromeos"> | 231 /* <if expr="not chromeos"> */ |
| 233 this.showRelaunch_ = this.checkStatus_(UpdateStatus.NEARLY_UPDATED); | 232 this.showRelaunch_ = this.checkStatus_(UpdateStatus.NEARLY_UPDATED); |
| 234 </if> | 233 /* </if> */ |
| 235 <if expr="chromeos"> | 234 /* <if expr="chromeos"> */ |
| 236 this.showRelaunch_ = this.checkStatus_(UpdateStatus.NEARLY_UPDATED) && | 235 this.showRelaunch_ = this.checkStatus_(UpdateStatus.NEARLY_UPDATED) && |
| 237 !this.isTargetChannelMoreStable_(); | 236 !this.isTargetChannelMoreStable_(); |
| 238 </if> | 237 /* </if> */ |
| 239 }, | 238 }, |
| 240 | 239 |
| 241 /** | 240 /** |
| 242 * @return {string} | 241 * @return {string} |
| 243 * @private | 242 * @private |
| 244 */ | 243 */ |
| 245 getUpdateStatusMessage_: function() { | 244 getUpdateStatusMessage_: function() { |
| 246 switch (this.currentUpdateStatusEvent_.status) { | 245 switch (this.currentUpdateStatusEvent_.status) { |
| 247 case UpdateStatus.CHECKING: | 246 case UpdateStatus.CHECKING: |
| 248 return this.i18n('aboutUpgradeCheckStarted'); | 247 return this.i18n('aboutUpgradeCheckStarted'); |
| 249 case UpdateStatus.NEARLY_UPDATED: | 248 case UpdateStatus.NEARLY_UPDATED: |
| 250 <if expr="chromeos"> | 249 /* <if expr="chromeos"> */ |
| 251 if (this.currentChannel_ != this.targetChannel_) | 250 if (this.currentChannel_ != this.targetChannel_) |
| 252 return this.i18n('aboutUpgradeSuccessChannelSwitch'); | 251 return this.i18n('aboutUpgradeSuccessChannelSwitch'); |
| 253 </if> | 252 /* </if> */ |
| 254 return this.i18n('aboutUpgradeRelaunch'); | 253 return this.i18n('aboutUpgradeRelaunch'); |
| 255 case UpdateStatus.UPDATED: | 254 case UpdateStatus.UPDATED: |
| 256 return this.i18n('aboutUpgradeUpToDate'); | 255 return this.i18n('aboutUpgradeUpToDate'); |
| 257 case UpdateStatus.UPDATING: | 256 case UpdateStatus.UPDATING: |
| 258 assert(typeof this.currentUpdateStatusEvent_.progress == 'number'); | 257 assert(typeof this.currentUpdateStatusEvent_.progress == 'number'); |
| 259 var progressPercent = this.currentUpdateStatusEvent_.progress + '%'; | 258 var progressPercent = this.currentUpdateStatusEvent_.progress + '%'; |
| 260 | 259 |
| 261 <if expr="chromeos"> | 260 /* <if expr="chromeos"> */ |
| 262 if (this.currentChannel_ != this.targetChannel_) { | 261 if (this.currentChannel_ != this.targetChannel_) { |
| 263 return this.i18n('aboutUpgradeUpdatingChannelSwitch', | 262 return this.i18n( |
| 263 'aboutUpgradeUpdatingChannelSwitch', |
| 264 this.i18n(settings.browserChannelToI18nId(this.targetChannel_)), | 264 this.i18n(settings.browserChannelToI18nId(this.targetChannel_)), |
| 265 progressPercent); | 265 progressPercent); |
| 266 } | 266 } |
| 267 </if> | 267 /* </if> */ |
| 268 if (this.currentUpdateStatusEvent_.progress > 0) { | 268 if (this.currentUpdateStatusEvent_.progress > 0) { |
| 269 // NOTE(dbeam): some platforms (i.e. Mac) always send 0% while | 269 // NOTE(dbeam): some platforms (i.e. Mac) always send 0% while |
| 270 // updating (they don't support incremental upgrade progress). Though | 270 // updating (they don't support incremental upgrade progress). Though |
| 271 // it's certainly quite possible to validly end up here with 0% on | 271 // it's certainly quite possible to validly end up here with 0% on |
| 272 // platforms that support incremental progress, nobody really likes | 272 // platforms that support incremental progress, nobody really likes |
| 273 // seeing that they're 0% done with something. | 273 // seeing that they're 0% done with something. |
| 274 return this.i18n('aboutUpgradeUpdatingPercent', progressPercent); | 274 return this.i18n('aboutUpgradeUpdatingPercent', progressPercent); |
| 275 } | 275 } |
| 276 return this.i18n('aboutUpgradeUpdating'); | 276 return this.i18n('aboutUpgradeUpdating'); |
| 277 default: | 277 default: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 292 if (this.obsoleteSystemInfo_.endOfLine) | 292 if (this.obsoleteSystemInfo_.endOfLine) |
| 293 return 'settings:error'; | 293 return 'settings:error'; |
| 294 | 294 |
| 295 switch (this.currentUpdateStatusEvent_.status) { | 295 switch (this.currentUpdateStatusEvent_.status) { |
| 296 case UpdateStatus.DISABLED_BY_ADMIN: | 296 case UpdateStatus.DISABLED_BY_ADMIN: |
| 297 return 'cr:domain'; | 297 return 'cr:domain'; |
| 298 case UpdateStatus.FAILED: | 298 case UpdateStatus.FAILED: |
| 299 return 'settings:error'; | 299 return 'settings:error'; |
| 300 case UpdateStatus.UPDATED: | 300 case UpdateStatus.UPDATED: |
| 301 case UpdateStatus.NEARLY_UPDATED: | 301 case UpdateStatus.NEARLY_UPDATED: |
| 302 return 'settings:check-circle'; | 302 return 'settings:check-circle'; |
| 303 default: | 303 default: |
| 304 return null; | 304 return null; |
| 305 } | 305 } |
| 306 }, | 306 }, |
| 307 | 307 |
| 308 /** | 308 /** |
| 309 * @return {?string} | 309 * @return {?string} |
| 310 * @private | 310 * @private |
| 311 */ | 311 */ |
| 312 getIconSrc_: function() { | 312 getIconSrc_: function() { |
| 313 if (this.obsoleteSystemInfo_.endOfLine) | 313 if (this.obsoleteSystemInfo_.endOfLine) |
| 314 return null; | 314 return null; |
| 315 | 315 |
| 316 switch (this.currentUpdateStatusEvent_.status) { | 316 switch (this.currentUpdateStatusEvent_.status) { |
| 317 case UpdateStatus.CHECKING: | 317 case UpdateStatus.CHECKING: |
| 318 case UpdateStatus.UPDATING: | 318 case UpdateStatus.UPDATING: |
| 319 return 'chrome://resources/images/throbber_small.svg'; | 319 return 'chrome://resources/images/throbber_small.svg'; |
| 320 default: | 320 default: |
| 321 return null; | 321 return null; |
| 322 } | 322 } |
| 323 }, | 323 }, |
| 324 | 324 |
| 325 /** | 325 /** |
| 326 * @param {!UpdateStatus} status | 326 * @param {!UpdateStatus} status |
| 327 * @return {boolean} | 327 * @return {boolean} |
| 328 * @private | 328 * @private |
| 329 */ | 329 */ |
| 330 checkStatus_: function(status) { | 330 checkStatus_: function(status) { |
| 331 return this.currentUpdateStatusEvent_.status == status; | 331 return this.currentUpdateStatusEvent_.status == status; |
| 332 }, | 332 }, |
| 333 | 333 |
| 334 <if expr="chromeos"> | 334 /* <if expr="chromeos"> */ |
| 335 /** | 335 /** |
| 336 * @return {boolean} | 336 * @return {boolean} |
| 337 * @private | 337 * @private |
| 338 */ | 338 */ |
| 339 isTargetChannelMoreStable_: function() { | 339 isTargetChannelMoreStable_: function() { |
| 340 assert(this.currentChannel_.length > 0); | 340 assert(this.currentChannel_.length > 0); |
| 341 assert(this.targetChannel_.length > 0); | 341 assert(this.targetChannel_.length > 0); |
| 342 return settings.isTargetChannelMoreStable( | 342 return settings.isTargetChannelMoreStable( |
| 343 this.currentChannel_, this.targetChannel_); | 343 this.currentChannel_, this.targetChannel_); |
| 344 }, | 344 }, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 this.checkStatus_(UpdateStatus.FAILED); | 377 this.checkStatus_(UpdateStatus.FAILED); |
| 378 }, | 378 }, |
| 379 | 379 |
| 380 /** | 380 /** |
| 381 * @return {boolean} | 381 * @return {boolean} |
| 382 * @private | 382 * @private |
| 383 */ | 383 */ |
| 384 shouldShowRegulatoryInfo_: function() { | 384 shouldShowRegulatoryInfo_: function() { |
| 385 return this.regulatoryInfo_ !== null; | 385 return this.regulatoryInfo_ !== null; |
| 386 }, | 386 }, |
| 387 </if> | 387 /* </if> */ |
| 388 | 388 |
| 389 /** @private */ | 389 /** @private */ |
| 390 onProductLogoTap_: function() { | 390 onProductLogoTap_: function() { |
| 391 this.$['product-logo'].animate({ | 391 this.$['product-logo'].animate( |
| 392 transform: ['none', 'rotate(-10turn)'], | 392 { |
| 393 }, { | 393 transform: ['none', 'rotate(-10turn)'], |
| 394 duration: 500, | 394 }, |
| 395 easing: 'cubic-bezier(1, 0, 0, 1)', | 395 { |
| 396 }); | 396 duration: 500, |
| 397 easing: 'cubic-bezier(1, 0, 0, 1)', |
| 398 }); |
| 397 }, | 399 }, |
| 398 | 400 |
| 399 <if expr="_google_chrome"> | 401 /* <if expr="_google_chrome"> */ |
| 400 /** @private */ | 402 /** @private */ |
| 401 onReportIssueTap_: function() { | 403 onReportIssueTap_: function() { |
| 402 this.aboutBrowserProxy_.openFeedbackDialog(); | 404 this.aboutBrowserProxy_.openFeedbackDialog(); |
| 403 }, | 405 }, |
| 404 </if> | 406 /* </if> */ |
| 405 }); | 407 }); |
| OLD | NEW |